+2006-06-14 Tim-Philipp Müller <tim at centricular dot net>
+
+ * ext/ogg/Makefile.am:
+ * ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
+ Extract language tags from ogm subtitle streams, so that
+ the subtitle menu choices are labelled correctly in
+ Totem (fixes #344708).
+
2006-06-14 Wim Taymans <wim@fluendo.com>
Patch by: Alessandro Decina <alessandro at nnva dot org>
libgstogg_la_CFLAGS = $(GST_CFLAGS) $(OGG_CFLAGS)
libgstogg_la_LIBADD = \
$(top_builddir)/gst-libs/gst/riff/libgstriff-$(GST_MAJORMINOR).la \
+ $(top_builddir)/gst-libs/gst/tag/libgsttag-$(GST_MAJORMINOR).la \
$(GST_BASE_LIBS) \
$(OGG_LIBS)
libgstogg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
#include <string.h>
#include <gst/gst.h>
+#include <gst/tag/tag.h>
#include <gst/riff/riff-media.h>
GST_DEBUG_CATEGORY_STATIC (gst_ogm_parse_debug);
}
break;
}
- case 0x03:
- /* comment - unused */
+ case 0x03:{
+ /* vorbis comment - need to extract the tags ourself for subtitle
+ * streams since we want to know the language and there won't be a
+ * decoder to do this for us like with vorbis */
+ if (ogm->hdr.streamtype[0] == 't') {
+ GstTagList *tags;
+
+ tags = gst_tag_list_from_vorbiscomment_buffer (buffer,
+ (guint8 *) "\003vorbis", 7, NULL);
+
+ if (tags) {
+ GST_DEBUG_OBJECT (ogm, "tags = %" GST_PTR_FORMAT, tags);
+ gst_element_found_tags_for_pad (GST_ELEMENT (ogm), ogm->srcpad, tags);
+ } else {
+ GST_DEBUG_OBJECT (ogm, "failed to extract tags from vorbis comment");
+ }
+ }
break;
+ }
default:
if ((data[0] & 0x01) == 0) {
/* data - push on */
xsize = (xsize << 8) | data[n];
}
- GST_DEBUG_OBJECT (ogm,
+ GST_LOG_OBJECT (ogm,
"[0x%02x] samples: %d, hdrbytes: %d, datasize: %d",
data[0], xsize, len, size - len - 1);
+
sbuf = gst_buffer_create_sub (buf, len + 1, size - len - 1);
if (GST_BUFFER_OFFSET_END_IS_VALID (buf)) {
ogm->next_granulepos = GST_BUFFER_OFFSET_END (buf);