qtmux: Implement the preset interface.
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Fri, 26 Jun 2015 18:13:17 +0000 (20:13 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 1 Sep 2016 10:16:49 +0000 (13:16 +0300)
+ And provide a "youtube" preset, which based on
https://support.google.com/youtube/answer/1722171 sets
faststart to True.

https://bugzilla.gnome.org/show_bug.cgi?id=751559

gst/isomp4/GstQTMux.prs [new file with mode: 0644]
gst/isomp4/Makefile.am
gst/isomp4/gstqtmux.c

diff --git a/gst/isomp4/GstQTMux.prs b/gst/isomp4/GstQTMux.prs
new file mode 100644 (file)
index 0000000..be1e644
--- /dev/null
@@ -0,0 +1,6 @@
+[_presets_]
+version=1.6.0
+element-name=GstQTMux
+
+[Profile YouTube]
+faststart=true
index 8cfdd15..2e560a2 100644 (file)
@@ -18,6 +18,9 @@ libgstisomp4_la_SOURCES = isomp4-plugin.c gstrtpxqtdepay.c \
        properties.c gstqtmuxmap.c gstisoff.c
 libgstisomp4_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
 
+presetdir = $(datadir)/gstreamer-$(GST_API_VERSION)/presets
+preset_DATA = GstQTMux.prs
+
 noinst_HEADERS = \
        qtatomparser.h   \
        qtdemux.h        \
@@ -38,4 +41,5 @@ noinst_HEADERS = \
 
 EXTRA_DIST = \
        gstqtmux-doc.c \
-       gstqtmux-doc.h
+       gstqtmux-doc.h \
+       $(preset_DATA)
index cf6633d..42d0a54 100644 (file)
@@ -4737,6 +4737,9 @@ gst_qt_mux_register (GstPlugin * plugin)
   static const GInterfaceInfo tag_xmp_writer_info = {
     NULL, NULL, NULL
   };
+  static const GInterfaceInfo preset_info = {
+    NULL, NULL, NULL
+  };
   GType type;
   GstQTMuxFormat format;
   GstQTMuxClassParams *params;
@@ -4775,6 +4778,7 @@ gst_qt_mux_register (GstPlugin * plugin)
     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);
+    g_type_add_interface_static (type, GST_TYPE_PRESET, &preset_info);
 
     if (!gst_element_register (plugin, prop->name, prop->rank, type))
       return FALSE;