mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
GESTrackEffect: Cleanup of the property lookup code
This commit is contained in:
parent
44795fe51c
commit
168c2d0327
1 changed files with 20 additions and 13 deletions
|
@ -94,12 +94,9 @@ ges_track_effect_get_props_hashtable (GESTrackObject * self)
|
||||||
GstIterator *it;
|
GstIterator *it;
|
||||||
GParamSpec **parray;
|
GParamSpec **parray;
|
||||||
GObjectClass *class;
|
GObjectClass *class;
|
||||||
guint i, nb_specs;
|
|
||||||
const gchar *klass;
|
const gchar *klass;
|
||||||
GstElementFactory *factory;
|
GstElementFactory *factory;
|
||||||
GstElement *child, *element;
|
GstElement *element;
|
||||||
gchar **categories, *categorie;
|
|
||||||
|
|
||||||
gboolean done = FALSE;
|
gboolean done = FALSE;
|
||||||
GHashTable *ret = NULL;
|
GHashTable *ret = NULL;
|
||||||
|
|
||||||
|
@ -117,17 +114,26 @@ ges_track_effect_get_props_hashtable (GESTrackObject * self)
|
||||||
* hashtable
|
* hashtable
|
||||||
* FIXME: Add a blacklist of properties */
|
* FIXME: Add a blacklist of properties */
|
||||||
it = gst_bin_iterate_recurse (GST_BIN (element));
|
it = gst_bin_iterate_recurse (GST_BIN (element));
|
||||||
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
switch (gst_iterator_next (it, &data)) {
|
switch (gst_iterator_next (it, &data)) {
|
||||||
case GST_ITERATOR_OK:
|
case GST_ITERATOR_OK:
|
||||||
child = GST_ELEMENT_CAST (data);
|
{
|
||||||
|
gchar **categories;
|
||||||
|
guint category;
|
||||||
|
GstElement *child = GST_ELEMENT_CAST (data);
|
||||||
|
|
||||||
factory = gst_element_get_factory (child);
|
factory = gst_element_get_factory (child);
|
||||||
klass = gst_element_factory_get_klass (factory);
|
klass = gst_element_factory_get_klass (factory);
|
||||||
|
|
||||||
|
GST_DEBUG ("Looking at element '%s' of klass '%s'",
|
||||||
|
GST_ELEMENT_NAME (child), klass);
|
||||||
|
|
||||||
categories = g_strsplit (klass, "/", 0);
|
categories = g_strsplit (klass, "/", 0);
|
||||||
|
|
||||||
i = 0;
|
for (category = 0; categories[category]; category++) {
|
||||||
for (categorie = categories[0]; categorie;) {
|
if (g_strcmp0 (categories[category], "Effect") == 0) {
|
||||||
if (g_strcmp0 (categorie, "Effect") == 0) {
|
guint i, nb_specs;
|
||||||
|
|
||||||
class = G_OBJECT_GET_CLASS (child);
|
class = G_OBJECT_GET_CLASS (child);
|
||||||
parray = g_object_class_list_properties (class, &nb_specs);
|
parray = g_object_class_list_properties (class, &nb_specs);
|
||||||
|
@ -139,18 +145,19 @@ ges_track_effect_get_props_hashtable (GESTrackObject * self)
|
||||||
}
|
}
|
||||||
g_free (parray);
|
g_free (parray);
|
||||||
|
|
||||||
GST_DEBUG ("%i configurable properties added to %p", child,
|
GST_DEBUG
|
||||||
nb_specs);
|
("%d configurable properties of '%s' added to property hashtable",
|
||||||
|
nb_specs, GST_ELEMENT_NAME (child));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
categorie = categories[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_strfreev (categories);
|
g_strfreev (categories);
|
||||||
gst_object_unref (child);
|
gst_object_unref (child);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case GST_ITERATOR_RESYNC:
|
case GST_ITERATOR_RESYNC:
|
||||||
|
/* FIXME, properly restart the process */
|
||||||
GST_DEBUG ("iterator resync");
|
GST_DEBUG ("iterator resync");
|
||||||
gst_iterator_resync (it);
|
gst_iterator_resync (it);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue