tsdemux: Create and send codec tag

Helps with applications that rely on presence of that tag for user-facing
information.

https://bugzilla.gnome.org/show_bug.cgi?id=702216
This commit is contained in:
Edward Hervey 2013-06-14 07:28:29 +02:00
parent b9124cad88
commit 069a497d19
2 changed files with 6 additions and 0 deletions

View 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)

View 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);
}