diff options
author | Matthieu Bouron <matthieu.bouron@collabora.com> | 2014-06-25 15:55:32 +0200 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-08-19 15:34:01 -0300 |
commit | 82fdb3aefcd2d2b642b97ced2d0475b39114a5ba (patch) | |
tree | f45cf47b293881959b41ea865e38b303eaf7987c /ext | |
parent | cb4fd36e7eb6c8331542a3eb9c040e6df400f068 (diff) | |
download | gstreamer-plugins-bad-82fdb3aefcd2d2b642b97ced2d0475b39114a5ba.tar.gz |
dashdemux: push language code tag
Language code tag is retrieved from the AdaptationSet language
property.
https://bugzilla.gnome.org/show_bug.cgi?id=732237
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dash/Makefile.am | 12 | ||||
-rw-r--r-- | ext/dash/gstdashdemux.c | 16 | ||||
-rw-r--r-- | ext/dash/gstdashdemux.h | 1 |
3 files changed, 27 insertions, 2 deletions
diff --git a/ext/dash/Makefile.am b/ext/dash/Makefile.am index 97d8623ec..32964bb15 100644 --- a/ext/dash/Makefile.am +++ b/ext/dash/Makefile.am @@ -13,10 +13,18 @@ noinst_HEADERS = \ gstdash_debug.h # compiler and linker flags used to compile this plugin, set in configure.ac -libgstdashdemux_la_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(LIBXML2_CFLAGS) +libgstdashdemux_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ + $(GST_BASE_CFLAGS) \ + $(GST_CFLAGS) \ + $(LIBXML2_CFLAGS) libgstdashdemux_la_LIBADD = \ $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la \ - $(GST_LIBS) $(GST_BASE_LIBS) $(LIBXML2_LIBS) + -lgsttag-$(GST_API_VERSION) \ + $(GST_BASE_LIBS) \ + $(GST_LIBS) \ + $(LIBXML2_LIBS) libgstdashdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdashdemux_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index a46e6ab4d..b23a3a0e6 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -696,6 +696,7 @@ gst_dash_demux_setup_all_streams (GstDashDemux * demux) GstCaps *caps; GstEvent *event; gchar *stream_id; + gchar *lang = NULL; active_stream = gst_mpdparser_get_active_stream_by_index (demux->client, i); if (active_stream == NULL) @@ -750,6 +751,21 @@ gst_dash_demux_setup_all_streams (GstDashDemux * demux) g_free (stream_id); gst_pad_push_event (stream->pad, gst_event_new_caps (caps)); + + if (active_stream->cur_adapt_set) { + lang = active_stream->cur_adapt_set->lang; + } + + if (lang) { + GstTagList *tags; + + if (gst_tag_check_language_code (lang)) + tags = gst_tag_list_new (GST_TAG_LANGUAGE_CODE, lang, NULL); + else + tags = gst_tag_list_new (GST_TAG_LANGUAGE_NAME, lang, NULL); + + gst_pad_push_event (stream->pad, gst_event_new_tag (tags)); + } } streams = g_slist_reverse (streams); diff --git a/ext/dash/gstdashdemux.h b/ext/dash/gstdashdemux.h index 4e3a3ed85..a6caabefd 100644 --- a/ext/dash/gstdashdemux.h +++ b/ext/dash/gstdashdemux.h @@ -34,6 +34,7 @@ #include <gst/base/gstadapter.h> #include <gst/base/gstdataqueue.h> #include "gstmpdparser.h" +#include <gst/tag/tag.h> #include <gst/uridownloader/gsturidownloader.h> G_BEGIN_DECLS |