projects
/
platform
/
upstream
/
gst-editing-services.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e4473e
)
ges: Allow setting children property using the set_object_arg format
author
Thibault Saunier
<tsaunier@igalia.com>
Thu, 20 Feb 2020 15:22:19 +0000
(12:22 -0300)
committer
Thibault Saunier
<tsaunier@igalia.com>
Tue, 25 Feb 2020 20:44:51 +0000
(17:44 -0300)
This make it much simpler for the user to set enum values and should not cause any issue
ges/ges-timeline-element.c
patch
|
blob
|
history
diff --git
a/ges/ges-timeline-element.c
b/ges/ges-timeline-element.c
index
4764cee
..
21ff79f
100644
(file)
--- a/
ges/ges-timeline-element.c
+++ b/
ges/ges-timeline-element.c
@@
-119,7
+119,11
@@
static void
_set_child_property (GESTimelineElement * self G_GNUC_UNUSED, GObject * child,
GParamSpec * pspec, GValue * value)
{
- g_object_set_property (child, pspec->name, value);
+ if (G_VALUE_TYPE (value) != pspec->value_type
+ && G_VALUE_TYPE (value) == G_TYPE_STRING)
+ gst_util_set_object_arg (child, pspec->name, g_value_get_string (value));
+ else
+ g_object_set_property (child, pspec->name, value);
}
static gboolean