Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for tags

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
commit 37bf3b5c5693c7af26d415c8c59e7d908a91d06a 1 parent 307d8e7
Felipe Contreras authored
Showing with 13 additions and 2 deletions.
  1. +2 −2 Makefile
  2. +11 −0 gstavdec.c
4 Makefile
View
@@ -5,8 +5,8 @@ LDFLAGS := -Wl,--no-undefined
override CFLAGS += -D_GNU_SOURCE
-GST_CFLAGS := $(shell pkg-config --cflags gstreamer-0.10)
-GST_LIBS := $(shell pkg-config --libs gstreamer-0.10)
+GST_CFLAGS := $(shell pkg-config --cflags gstreamer-0.10 gstreamer-tag-0.10)
+GST_LIBS := $(shell pkg-config --libs gstreamer-0.10 gstreamer-tag-0.10)
AVCODEC_CFLAGS := $(shell pkg-config --cflags libavcodec)
AVCODEC_LIBS := $(shell pkg-config --libs libavcodec)
11 gstavdec.c
View
@@ -11,6 +11,8 @@
#include "gstavdec.h"
#include "plugin.h"
+#include <gst/tag/tag.h>
+
#include <stdlib.h>
#include <string.h> /* for memcpy */
@@ -42,6 +44,14 @@ fixup_vorbis_headers(struct oggvorbis_private *priv,
return offset;
}
+static void
+handle_comment(GstAVDec *self, GstBuffer *buf)
+{
+ GstTagList *list;
+ list = gst_tag_list_from_vorbiscomment_buffer(buf, (guint8 *) "\003vorbis", 7, NULL);
+ gst_element_found_tags_for_pad(GST_ELEMENT(self), self->srcpad, list);
+}
+
static int
vorbis_header(GstAVDec *self,
GstBuffer *buf)
@@ -90,6 +100,7 @@ vorbis_header(GstAVDec *self,
}
else if (p[0] == 3) {
/* comment */
+ handle_comment(self, buf);
}
else {
/* extradata */
Please sign in to comment.
Something went wrong with that request. Please try again.