effect: Allow setting properties on any element specified by the user
authorThibault Saunier <tsaunier@igalia.com>
Fri, 20 Apr 2018 20:35:06 +0000 (17:35 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 20 Apr 2018 22:24:56 +0000 (19:24 -0300)
Those are the elements he cares about and we should expose their APIs
as is, event if they are not classified as effects. For example if
the user want to use a capsfilter as effect, he should be able to set
its caps.

ges/ges-effect.c

index eb9c9e5..d8d0ef5 100644 (file)
@@ -249,7 +249,8 @@ ges_effect_create_element (GESTrackElement * object)
 
   GError *error = NULL;
   GESEffect *self = GES_EFFECT (object);
-  const gchar *wanted_categories[] = { "Effect", NULL };
+  const gchar *blacklisted_factories[] =
+      { "audioconvert", "audioresample", "videoconvert", NULL };
 
   GESTrackType type = ges_track_element_get_track_type (object);
 
@@ -276,10 +277,8 @@ ges_effect_create_element (GESTrackElement * object)
     return NULL;
   }
 
-  GST_DEBUG ("Created effect %p", effect);
-
-  ges_track_element_add_children_props (object, effect, wanted_categories,
-      NULL, NULL);
+  ges_track_element_add_children_props (object, effect, NULL,
+      blacklisted_factories, NULL);
 
   return effect;
 }