gst-plugins-bad: jifmux: Add GstTagXmpWriter support

Thiago Sousa Santos thiagoss at kemper.freedesktop.org
Tue Mar 29 14:04:21 PDT 2011


Module: gst-plugins-bad
Branch: master
Commit: dfe64965d79a09c5c65f3a47a2c5673b6cf825f3
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=dfe64965d79a09c5c65f3a47a2c5673b6cf825f3

Author: Thiago Santos <thiago.sousa.santos at collabora.co.uk>
Date:   Mon Mar 21 10:57:05 2011 -0300

jifmux: Add GstTagXmpWriter support

Adds GstTagXmpWriter interface to jifmux element

---

 gst/jpegformat/Makefile.am |    4 ++--
 gst/jpegformat/gstjifmux.c |    8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gst/jpegformat/Makefile.am b/gst/jpegformat/Makefile.am
index 3ac11d7..244015b 100644
--- a/gst/jpegformat/Makefile.am
+++ b/gst/jpegformat/Makefile.am
@@ -5,8 +5,8 @@ libgstjpegformat_la_CFLAGS = \
     $(GST_PLUGINS_BASE_CFLAGS) \
     $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
 libgstjpegformat_la_LIBADD = \
-    $(GST_PLUGINS_BASE_LIBS) -lgsttag- at GST_MAJORMINOR@ \
-    $(GST_LIBS) $(GST_BASE_LIBS)
+    $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces- at GST_MAJORMINOR@ \
+    -lgsttag- at GST_MAJORMINOR@ $(GST_LIBS) $(GST_BASE_LIBS)
 libgstjpegformat_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstjpegformat_la_LIBTOOLFLAGS = --tag=disable-static
 
diff --git a/gst/jpegformat/gstjifmux.c b/gst/jpegformat/gstjifmux.c
index 5308969..e8e2c6e 100644
--- a/gst/jpegformat/gstjifmux.c
+++ b/gst/jpegformat/gstjifmux.c
@@ -58,6 +58,7 @@ gst-launch videotestsrc num-buffers=1 ! jpegenc ! taginject tags="comment=\"test
 #include <gst/base/gstbytereader.h>
 #include <gst/base/gstbytewriter.h>
 #include <gst/tag/tag.h>
+#include <gst/tag/xmpwriter.h>
 
 #include "gstjifmux.h"
 
@@ -118,8 +119,11 @@ static void
 gst_jif_type_init (GType type)
 {
   static const GInterfaceInfo tag_setter_info = { NULL, NULL, NULL };
+  static const GInterfaceInfo tag_xmp_writer_info = { NULL, NULL, NULL };
 
   g_type_add_interface_static (type, GST_TYPE_TAG_SETTER, &tag_setter_info);
+  g_type_add_interface_static (type, GST_TYPE_TAG_XMP_WRITER,
+      &tag_xmp_writer_info);
 
   GST_DEBUG_CATEGORY_INIT (jif_mux_debug, "jifmux", 0,
       "JPEG interchange format muxer");
@@ -570,7 +574,9 @@ gst_jif_mux_mangle_markers (GstJifMux * self)
   }
 
   /* add xmp */
-  xmp_data = gst_tag_list_to_xmp_buffer (tags, FALSE);
+  xmp_data =
+      gst_tag_xmp_writer_tag_list_to_xmp_buffer (GST_TAG_XMP_WRITER (self),
+      tags, FALSE);
   if (xmp_data) {
     guint8 *data, *xmp = GST_BUFFER_DATA (xmp_data);
     guint size = GST_BUFFER_SIZE (xmp_data);



More information about the gstreamer-commits mailing list