From 26928b3df09cf2fa36cd5ec19c37f11e7d140266 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 26 Jun 2015 20:13:17 +0200 Subject: [PATCH] qtmux: Implement the preset interface. + 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 | 6 ++++++ gst/isomp4/Makefile.am | 6 +++++- gst/isomp4/gstqtmux.c | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 gst/isomp4/GstQTMux.prs diff --git a/gst/isomp4/GstQTMux.prs b/gst/isomp4/GstQTMux.prs new file mode 100644 index 0000000000..be1e644564 --- /dev/null +++ b/gst/isomp4/GstQTMux.prs @@ -0,0 +1,6 @@ +[_presets_] +version=1.6.0 +element-name=GstQTMux + +[Profile YouTube] +faststart=true diff --git a/gst/isomp4/Makefile.am b/gst/isomp4/Makefile.am index 8cfdd15a3c..2e560a2d51 100644 --- a/gst/isomp4/Makefile.am +++ b/gst/isomp4/Makefile.am @@ -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) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index cf6633dc6a..42d0a547e1 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -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;