From: Thibault Saunier Date: Fri, 29 Apr 2016 14:36:00 +0000 (-0300) Subject: container: Handle setting children properties that need prefixing X-Git-Tag: 1.19.3~493^2~1015 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6b04061c89ca949357ba7f1a122e0f8733beff7;p=platform%2Fupstream%2Fgstreamer.git container: Handle setting children properties that need prefixing --- diff --git a/ges/ges-container.c b/ges/ges-container.c index 7c62305..cebaa3e 100644 --- a/ges/ges-container.c +++ b/ges/ges-container.c @@ -213,14 +213,15 @@ _ges_container_add_child_properties (GESContainer * container, for (i = 0; i < n_props; i++) { GObject *prop_child; + gchar *prop_name = g_strdup_printf ("%s::%s", + g_type_name (child_props[i]->owner_type), + child_props[i]->name); - if (ges_timeline_element_lookup_child (child, child_props[i]->name, - &prop_child, NULL)) { + if (ges_timeline_element_lookup_child (child, prop_name, &prop_child, NULL)) { ges_timeline_element_add_child_property (GES_TIMELINE_ELEMENT (container), child_props[i], prop_child); - } - + g_free (prop_name); g_param_spec_unref (child_props[i]); } @@ -239,14 +240,17 @@ _ges_container_remove_child_properties (GESContainer * container, for (i = 0; i < n_props; i++) { GObject *prop_child; + gchar *prop_name = g_strdup_printf ("%s::%s", + g_type_name (child_props[i]->owner_type), + child_props[i]->name); - if (ges_timeline_element_lookup_child (child, child_props[i]->name, - &prop_child, NULL)) { + if (ges_timeline_element_lookup_child (child, prop_name, &prop_child, NULL)) { ges_timeline_element_remove_child_property (GES_TIMELINE_ELEMENT (container), child_props[i]); } + g_free (prop_name); g_param_spec_unref (child_props[i]); } @@ -273,12 +277,14 @@ _lookup_child (GESTimelineElement * self, const gchar * prop_name, { GList *tmp; - for (tmp = GES_CONTAINER_CHILDREN (self); tmp; tmp = tmp->next) - _ges_container_add_child_properties (GES_CONTAINER (self), tmp->data); + /* FIXME Implement a synthax to precisely get properties by path */ + for (tmp = GES_CONTAINER_CHILDREN (self); tmp; tmp = tmp->next) { - return - GES_TIMELINE_ELEMENT_CLASS (ges_container_parent_class)->lookup_child - (self, prop_name, child, pspec); + if (ges_timeline_element_lookup_child (tmp->data, prop_name, child, pspec)) + return TRUE; + } + + return FALSE; } static GESTrackType