After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797027 - kmssink: add 'connector/plane-properties' prop
kmssink: add 'connector/plane-properties' prop
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-08-27 08:28 UTC by Guillaume Desmottes
Modified: 2018-08-29 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
kmssink: add 'connector-properties' prop (5.72 KB, patch)
2018-08-27 08:29 UTC, Guillaume Desmottes
none Details | Review
kmssink: Generalize setting DRM object properties (2.68 KB, patch)
2018-08-27 19:13 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
kmssink: Add 'plane-properties' property (3.84 KB, patch)
2018-08-27 19:13 UTC, Nicolas Dufresne (ndufresne)
none Details | Review
kmssink: add 'connector-properties' prop (5.96 KB, patch)
2018-08-29 16:03 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
kmssink: Generalize setting DRM object properties (2.68 KB, patch)
2018-08-29 16:04 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
kmssink: Add 'plane-properties' property (3.84 KB, patch)
2018-08-29 16:04 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
kmssink: Escape DRM property names (1.29 KB, patch)
2018-08-29 16:04 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
kmssink: Document possible advance usage (1.09 KB, patch)
2018-08-29 16:04 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Guillaume Desmottes 2018-08-27 08:28:44 UTC
.
Comment 1 Guillaume Desmottes 2018-08-27 08:29:07 UTC
Created attachment 373459 [details] [review]
kmssink: add 'connector-properties' prop

Can be used to pass custom connector properties to DRM.
Comment 2 Nicolas Dufresne (ndufresne) 2018-08-27 19:13:39 UTC
Created attachment 373463 [details] [review]
kmssink: Generalize setting DRM object properties
Comment 3 Nicolas Dufresne (ndufresne) 2018-08-27 19:13:44 UTC
Created attachment 373464 [details] [review]
kmssink: Add 'plane-properties' property

This is similar to 'connector-properties' but will change
selected plane properties instead.
Comment 4 Nicolas Dufresne (ndufresne) 2018-08-27 19:19:42 UTC
I've completed adding plane properties. One issue right now is that you cannot set all the properties, since the GstStructure deserializer does not allow spaces in field names.

An example such properties can be found on Intel DRM:
  "Broadcast RGB"
  "aspect ratio"

We should probably convert the names to some canonical names like we do in for V4L2 controls.
Comment 5 Guillaume Desmottes 2018-08-28 15:00:15 UTC
Review of attachment 373463 [details] [review]:

++
Comment 6 Guillaume Desmottes 2018-08-28 15:00:18 UTC
Review of attachment 373464 [details] [review]:

++
Comment 7 Guillaume Desmottes 2018-08-28 15:02:05 UTC
(In reply to Nicolas Dufresne (ndufresne) from comment #4)
> I've completed adding plane properties.

Thanks, feel free to squash our patches together.

> One issue right now is that you
> cannot set all the properties, since the GstStructure deserializer does not
> allow spaces in field names.

We could replace spaces with '-' or '_' ? We have the list of existing properties so can easily check if it actually exist.
Comment 8 Nicolas Dufresne (ndufresne) 2018-08-28 15:19:45 UTC
I think for simplicity I'll assume that a DRM driver dev won't be crazy enough to have two properties named like "my prop" and "my_prop" at the same time. This way I can just escape all strings and compare once.
Comment 9 Guillaume Desmottes 2018-08-28 15:20:55 UTC
Agreed, I think it's a fair assumption as well.
Comment 10 Víctor Manuel Jáquez Leal 2018-08-28 15:36:18 UTC
Review of attachment 373464 [details] [review]:

perhaps it would be a good idea to add in the commit message an example of this plane-properties, as reference for users
Comment 11 Víctor Manuel Jáquez Leal 2018-08-28 15:39:22 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #10)
> Review of attachment 373464 [details] [review] [review]:
> 
> perhaps it would be a good idea to add in the commit message an example of
> this plane-properties, as reference for users

and also for the connector-properties... or how to query the driver to get those.
Comment 12 Nicolas Dufresne (ndufresne) 2018-08-28 18:37:05 UTC
No problem, fyi, the propeties can be displayed running:

  modetest -M <driver-name>

No all properties makes sense in this context, but on our platform, we use the connector property to setup some SDI specific configuration. We use the plane properties to configure global alpha mostly, some platform have zorder settings.
Comment 13 Nicolas Dufresne (ndufresne) 2018-08-29 16:03:56 UTC
Created attachment 373496 [details] [review]
kmssink: add 'connector-properties' prop

Can be used to pass custom connector properties to DRM. Properties can
be enumerated using modetest tool. These properties can then be applied
with the following gst-launch-1.0 syntax. Note that the name of the
structure is ignored.

  ... ! kmssink connector-properties="s,props1=value,props2=value"
Comment 14 Nicolas Dufresne (ndufresne) 2018-08-29 16:04:01 UTC
Created attachment 373497 [details] [review]
kmssink: Generalize setting DRM object properties
Comment 15 Nicolas Dufresne (ndufresne) 2018-08-29 16:04:06 UTC
Created attachment 373498 [details] [review]
kmssink: Add 'plane-properties' property

This is similar to 'connector-properties' but will change
selected plane properties instead.
Comment 16 Nicolas Dufresne (ndufresne) 2018-08-29 16:04:10 UTC
Created attachment 373499 [details] [review]
kmssink: Escape DRM property names

This allow setting properties that contains spaces. The spaces are
replaced with '-'. As an example, one can set the connector proper
"scaling mode" with the following:

  ... ! kmssink connector-properties="s,scaling-mode=1"
Comment 17 Nicolas Dufresne (ndufresne) 2018-08-29 16:04:13 UTC
Created attachment 373500 [details] [review]
kmssink: Document possible advance usage

This adds a mention about modetest command line tool and adds an example
on how to use the connector/plane-properties.
Comment 18 Nicolas Dufresne (ndufresne) 2018-08-29 16:04:30 UTC
Attachment 373496 [details] pushed as 71ab97c - kmssink: add 'connector-properties' prop
Attachment 373497 [details] pushed as 203b41b - kmssink: Generalize setting DRM object properties
Attachment 373498 [details] pushed as 63dca26 - kmssink: Add 'plane-properties' property
Attachment 373499 [details] pushed as 2f30287 - kmssink: Escape DRM property names
Attachment 373500 [details] pushed as 531709e - kmssink: Document possible advance usage