tsdemux: Create and send codec tag
authorEdward Hervey <edward@collabora.com>
Fri, 14 Jun 2013 05:28:29 +0000 (07:28 +0200)
committerEdward Hervey <edward@collabora.com>
Tue, 23 Jul 2013 13:11:51 +0000 (15:11 +0200)
Helps with applications that rely on presence of that tag for user-facing
information.

https://bugzilla.gnome.org/show_bug.cgi?id=702216

gst/mpegtsdemux/Makefile.am
gst/mpegtsdemux/tsdemux.c

index 9fa5d4e..68e136b 100644 (file)
@@ -14,6 +14,7 @@ libgstmpegtsdemux_la_CFLAGS = \
 libgstmpegtsdemux_la_LIBADD = \
        $(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-$(GST_API_VERSION).la \
        $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) \
+       -lgstpbutils-@GST_API_VERSION@ \
        $(GST_BASE_LIBS) $(GST_LIBS)
 libgstmpegtsdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstmpegtsdemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
index 6c6149f..3c51fc3 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <glib.h>
 #include <gst/tag/tag.h>
+#include <gst/pbutils/pbutils.h>
 
 #include "mpegtsbase.h"
 #include "tsdemux.h"
@@ -998,6 +999,10 @@ done:
     gst_pad_push_event (pad, event);
     g_free (stream_id);
     gst_pad_set_caps (pad, caps);
+    if (!stream->taglist)
+      stream->taglist = gst_tag_list_new_empty ();
+    gst_pb_utils_add_codec_description_to_tag_list (stream->taglist, NULL,
+        caps);
     gst_pad_set_query_function (pad, gst_ts_demux_srcpad_query);
     gst_pad_set_event_function (pad, gst_ts_demux_srcpad_event);
   }