From e19a488bce6c33a26032bd67a012805d550f2a6b Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 22 Jun 2011 22:25:18 -0300 Subject: [PATCH] camerabin2: Set tagsetters to merge replace mode The default for tagsetters is to use merge keep mode, so tags would never be replaced and all captures would have the same tags. This commit watches all elements added into encodebin and sets all tagsetters to merge replace mode --- gst/camerabin2/gstcamerabin2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 62c9e2adf6..9e34989373 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -828,6 +828,12 @@ encodebin_element_added (GstElement * encodebin, GstElement * new_element, g_object_set (new_element, "skip-to-first", TRUE, NULL); } } + + if (gst_element_implements_interface (new_element, GST_TYPE_TAG_SETTER)) { + GstTagSetter *tagsetter = GST_TAG_SETTER (new_element); + + gst_tag_setter_set_tag_merge_mode (tagsetter, GST_TAG_MERGE_REPLACE); + } } #define VIDEO_PAD 1