mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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" https://bugzilla.gnome.org/show_bug.cgi?id=797027
This commit is contained in:
parent
63dca26fac
commit
2f30287b5f
1 changed files with 6 additions and 0 deletions
|
@ -573,6 +573,12 @@ set_drm_property (gint fd, guint32 object, guint32 object_type,
|
|||
drmModePropertyPtr property;
|
||||
|
||||
property = drmModeGetProperty (fd, properties->props[i]);
|
||||
|
||||
/* GstStructure parser limits the set of supported character, so we
|
||||
* replace the invalid characters with '-'. In DRM, this is generally
|
||||
* replacing spaces into '-'. */
|
||||
g_strcanon (property->name, G_CSET_a_2_z G_CSET_A_2_Z G_CSET_DIGITS, '-');
|
||||
|
||||
if (!strcmp (property->name, prop_name)) {
|
||||
drmModeObjectSetProperty (fd, object, object_type,
|
||||
property->prop_id, value);
|
||||
|
|
Loading…
Reference in a new issue