GNOME Bugzilla – Bug 797027
kmssink: add 'connector/plane-properties' prop
Last modified: 2018-08-29 16:10:10 UTC
.
Created attachment 373459 [details] [review] kmssink: add 'connector-properties' prop Can be used to pass custom connector properties to DRM.
Created attachment 373463 [details] [review] kmssink: Generalize setting DRM object properties
Created attachment 373464 [details] [review] kmssink: Add 'plane-properties' property This is similar to 'connector-properties' but will change selected plane properties instead.
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.
Review of attachment 373463 [details] [review]: ++
Review of attachment 373464 [details] [review]: ++
(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.
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.
Agreed, I think it's a fair assumption as well.
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
(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.
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.
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"
Created attachment 373497 [details] [review] kmssink: Generalize setting DRM object properties
Created attachment 373498 [details] [review] kmssink: Add 'plane-properties' property This is similar to 'connector-properties' but will change selected plane properties instead.
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"
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.
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