support for setting caps parameter for capsfilter element master
authorAshish Raj <ashish.raj@movial.com>
Fri, 17 Jul 2009 09:23:14 +0000 (12:23 +0300)
committerMikko Rasa <mikko.rasa@movial.fi>
Thu, 23 Jul 2009 07:29:28 +0000 (10:29 +0300)
src/octopus-backend-gst.c

index a904be5..5a2b974 100644 (file)
@@ -583,6 +583,7 @@ realize_element(OctopusRoute   *route,
   GstElement *gst_elem;
   GList      *iter;
   GSList     *iter2;
+  GstCaps    *caps;
 
   g_debug("Realizing element '%s'", oct_elem->name);
   gst_elem = gst_element_factory_make(oct_elem->name, oct_elem->endpoint);
@@ -614,6 +615,12 @@ realize_element(OctopusRoute   *route,
           g_object_set(G_OBJECT(gst_elem), param->name, FALSE, NULL);
       } else if(pspec->value_type == G_TYPE_STRING) {
         g_object_set(G_OBJECT(gst_elem), param->name, param->value, NULL);
+      } else if(pspec->value_type == GST_TYPE_CAPS) {
+        caps = gst_caps_from_string(param->value);
+        g_object_set(G_OBJECT(gst_elem), param->name, caps, NULL);
+        gst_caps_unref(caps);
+      } else {
+        g_debug("Unknown value type '%s' in property '%s' for element '%s'", g_type_name(pspec->value_type), param->name, oct_elem->name);
       }
     } else {
       g_debug("Unknown parameter '%s' specified for element '%s'", param->name, oct_elem->name);