camerabin: port tagsetter mode setting code
authorThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 12 Sep 2012 12:42:09 +0000 (09:42 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 12 Sep 2012 12:48:32 +0000 (09:48 -0300)
Check directly with GST_IS_TAG_SETTER instead of using the
deprecated GstImplementsInterface

Fixes the image tag setting unit test

gst/camerabin2/gstcamerabin2.c

index 697f21a7943dc4049755dd53fff1317256029650..f7c893b618b60e0504464cac57e1192fd0c8ee45 100644 (file)
@@ -1178,13 +1178,11 @@ encodebin_element_added (GstElement * encodebin, GstElement * new_element,
     }
   }
 
-  /* TODO porting
-     if (gst_element_implements_interface (new_element, GST_TYPE_TAG_SETTER)) {
-     GstTagSetter *tagsetter = GST_TAG_SETTER (new_element);
+  if (GST_IS_TAG_SETTER (new_element)) {
+    GstTagSetter *tagsetter = GST_TAG_SETTER (new_element);
 
-     gst_tag_setter_set_tag_merge_mode (tagsetter, GST_TAG_MERGE_REPLACE);
-     }
-   */
+    gst_tag_setter_set_tag_merge_mode (tagsetter, GST_TAG_MERGE_REPLACE);
+  }
 }
 
 #define VIDEO_PAD 1