From 42531337f5636768775a279fe694a5a567add17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 18 Apr 2011 18:08:30 -0400 Subject: [PATCH 1/8] rtpsession: Remove incomplete support for RTCP FIR Remove bits that were meant to suppport RTCP FIR https://bugzilla.gnome.org/show_bug.cgi?id=648160 --- gst/rtpmanager/gstrtpsession.c | 27 +++++---------------------- gst/rtpmanager/rtpsession.c | 5 +---- gst/rtpmanager/rtpsession.h | 3 +-- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 986b81a4d2..ebeb3fd9bc 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1390,38 +1390,21 @@ gst_rtp_session_request_remote_key_unit (GstRtpSession * rtpsession, caps = gst_rtp_session_get_caps_for_pt (rtpsession, payload); if (caps) { - gboolean fir, pli; const GstStructure *s = gst_caps_get_structure (caps, 0); + gboolean pli; - if (!gst_structure_get_boolean (s, "rtcp-fb-nack-fir", &fir)) - fir = FALSE; - - if (!gst_structure_get_boolean (s, "rtcp-fb-nack-pli", &pli)) - pli = FALSE; + pli = gst_structure_has_field (s, "rtcp-fb-nack-pli"); gst_caps_unref (caps); - if (!pli && !fir) - goto out; - - /* When we need all headers, use FIR if possible falling back to PLI if - * it's available */ - if (all_headers) { - /* 500 ms acceptable delay for urgent request is a guesstimate, it could - * be made configurable if needed - */ - /* If we don't have fir, fall back to pli */ - rtp_session_request_key_unit (rtpsession->priv->session, ssrc, fir); + if (pli) { + rtp_session_request_key_unit (rtpsession->priv->session, ssrc); rtp_session_request_early_rtcp (rtpsession->priv->session, - gst_clock_get_time (rtpsession->priv->sysclock), 500 * GST_MSECOND); - requested = TRUE; - } else if (pli) { - rtp_session_request_key_unit (rtpsession->priv->session, ssrc, FALSE); + gst_clock_get_time (rtpsession->priv->sysclock), 200 * GST_MSECOND); requested = TRUE; } } -out: return requested; } diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index e547352ed2..4852bdbaf6 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -3171,13 +3171,10 @@ dont_send: } void -rtp_session_request_key_unit (RTPSession * sess, guint32 ssrc, gboolean fir) +rtp_session_request_key_unit (RTPSession * sess, guint32 ssrc) { guint i; - if (fir) - return; - for (i = 0; i < sess->rtcp_pli_requests->len; i++) if (ssrc == g_array_index (sess->rtcp_pli_requests, guint32, i)) return; diff --git a/gst/rtpmanager/rtpsession.h b/gst/rtpmanager/rtpsession.h index 6dee1cbe28..93fd300d95 100644 --- a/gst/rtpmanager/rtpsession.h +++ b/gst/rtpmanager/rtpsession.h @@ -348,7 +348,6 @@ void rtp_session_request_early_rtcp (RTPSession * sess, GstClockT /* Notify session of a request for a new key unit */ void rtp_session_request_key_unit (RTPSession * sess, - guint32 ssrc, - gboolean fir); + guint32 ssrc); #endif /* __RTP_SESSION_H__ */ From 0671b2325e7b4256d474283b4d4fb1f3c9ea0169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 21 Apr 2011 22:51:52 +0100 Subject: [PATCH 2/8] quicktime: register 3gppmux element in addition to the misnamed gppmux --- gst/quicktime/gstqtmux.c | 7 ++++--- gst/quicktime/gstqtmuxmap.c | 21 ++++++++++++++++++++- gst/quicktime/gstqtmuxmap.h | 1 + 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/gst/quicktime/gstqtmux.c b/gst/quicktime/gstqtmux.c index 0bfbd97f6a..0b52e500f5 100644 --- a/gst/quicktime/gstqtmux.c +++ b/gst/quicktime/gstqtmux.c @@ -249,8 +249,9 @@ gst_qt_mux_base_init (gpointer g_class) /* construct the element details struct */ longname = g_strdup_printf ("%s Muxer", params->prop->long_name); - description = g_strdup_printf ("Multiplex audio and video into a %s file", - params->prop->long_name); + description = g_strdup_printf ("Multiplex audio and video into a %s file%s", + params->prop->long_name, + (params->prop->rank == GST_RANK_NONE) ? " (deprecated)" : ""); gst_element_class_set_details_simple (element_class, longname, "Codec/Muxer", description, "Thiago Sousa Santos "); @@ -3501,7 +3502,7 @@ gst_qt_mux_register (GstPlugin * plugin) g_type_add_interface_static (type, GST_TYPE_TAG_XMP_WRITER, &tag_xmp_writer_info); - if (!gst_element_register (plugin, prop->name, GST_RANK_PRIMARY, type)) + if (!gst_element_register (plugin, prop->name, prop->rank, type)) return FALSE; i++; diff --git a/gst/quicktime/gstqtmuxmap.c b/gst/quicktime/gstqtmuxmap.c index a14367ea7c..c3a0295ce3 100644 --- a/gst/quicktime/gstqtmuxmap.c +++ b/gst/quicktime/gstqtmuxmap.c @@ -147,6 +147,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { /* original QuickTime format; see Apple site (e.g. qtff.pdf) */ { GST_QT_MUX_FORMAT_QT, + GST_RANK_PRIMARY, "qtmux", "QuickTime", "GstQTMux", @@ -180,6 +181,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { * (supersedes original ISO 144996-1 mp41) */ { GST_QT_MUX_FORMAT_MP4, + GST_RANK_PRIMARY, "mp4mux", "MP4", "GstMP4Mux", @@ -193,6 +195,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { /* TODO add WMV/WMA support */ { GST_QT_MUX_FORMAT_ISML, + GST_RANK_PRIMARY, "ismlmux", "ISML", "GstISMLMux", @@ -205,6 +208,21 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { * (extended in 3GPP2 File Formats for Multimedia Services) */ { GST_QT_MUX_FORMAT_3GP, + GST_RANK_PRIMARY, + "3gppmux", + "3GPP", + "Gst3GPPMux", + GST_STATIC_CAPS ("video/quicktime, variant = (string) 3gpp"), + GST_STATIC_CAPS (H263_CAPS "; " MPEG4V_CAPS "; " H264_CAPS), + GST_STATIC_CAPS (AMR_CAPS "; " MP3_CAPS "; " AAC_CAPS) + } + , +#ifndef GST_REMOVE_DEPRECATED + /* 3GPP Technical Specification 26.244 V7.3.0 + * (extended in 3GPP2 File Formats for Multimedia Services) */ + { + GST_QT_MUX_FORMAT_3GP, + GST_RANK_NONE, "gppmux", "3GPP", "GstGPPMux", @@ -213,9 +231,11 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { GST_STATIC_CAPS (AMR_CAPS "; " MP3_CAPS "; " AAC_CAPS) } , +#endif /* ISO 15444-3: Motion-JPEG-2000 (also ISO base media extension) */ { GST_QT_MUX_FORMAT_MJ2, + GST_RANK_PRIMARY, "mj2mux", "MJ2", "GstMJ2Mux", @@ -228,7 +248,6 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { { GST_QT_MUX_FORMAT_NONE, } - , }; /* pretty static, but may turn out needed a few times */ diff --git a/gst/quicktime/gstqtmuxmap.h b/gst/quicktime/gstqtmuxmap.h index 767d62a4a7..f069a2f1dd 100644 --- a/gst/quicktime/gstqtmuxmap.h +++ b/gst/quicktime/gstqtmuxmap.h @@ -62,6 +62,7 @@ typedef enum _GstQTMuxFormat typedef struct _GstQTMuxFormatProp { GstQTMuxFormat format; + GstRank rank; const gchar *name; const gchar *long_name; const gchar *type_name; From 3346a53374135b8a58a50f2ff18e0ecaaf2272d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 21 Apr 2011 23:30:26 +0100 Subject: [PATCH 3/8] docs: add various qtmux variants to documentation --- docs/plugins/Makefile.am | 1 + .../gst-plugins-good-plugins-docs.sgml | 5 + .../gst-plugins-good-plugins-sections.txt | 38 +++ gst/quicktime/Makefile.am | 4 + gst/quicktime/gstqtmoovrecover.c | 8 +- gst/quicktime/gstqtmux-doc.c | 300 ++++++++++++++++++ gst/quicktime/gstqtmux-doc.h | 52 +++ 7 files changed, 405 insertions(+), 3 deletions(-) create mode 100644 gst/quicktime/gstqtmux-doc.c create mode 100644 gst/quicktime/gstqtmux-doc.h diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index b511a43f71..410123edc3 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -192,6 +192,7 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/multipart/multipartmux.h \ $(top_srcdir)/gst/quicktime/qtdemux.h \ $(top_srcdir)/gst/quicktime/gstqtmux.h \ + $(top_srcdir)/gst/quicktime/gstqtmux-doc.h \ $(top_srcdir)/gst/replaygain/gstrganalysis.h \ $(top_srcdir)/gst/replaygain/gstrglimiter.h \ $(top_srcdir)/gst/replaygain/gstrgvolume.h \ diff --git a/docs/plugins/gst-plugins-good-plugins-docs.sgml b/docs/plugins/gst-plugins-good-plugins-docs.sgml index fba35fd887..17584d7c72 100644 --- a/docs/plugins/gst-plugins-good-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-good-plugins-docs.sgml @@ -18,6 +18,7 @@ gst-plugins-good Elements + @@ -100,6 +101,7 @@ + @@ -107,8 +109,10 @@ + + @@ -135,6 +139,7 @@ + diff --git a/docs/plugins/gst-plugins-good-plugins-sections.txt b/docs/plugins/gst-plugins-good-plugins-sections.txt index d2b8f759e4..f3b4cd3c1e 100644 --- a/docs/plugins/gst-plugins-good-plugins-sections.txt +++ b/docs/plugins/gst-plugins-good-plugins-sections.txt @@ -1,3 +1,10 @@ +
+element-3gppmux +3gppmux +Gst3GPPMux + +
+
element-aacparse aacparse @@ -1196,6 +1203,13 @@ GstInterleaveFunc gst_interleave_get_type
+
+element-ismlmux +ismlmux +GstISMLMux + +
+
element-jackaudiosrc jackaudiosrc @@ -1300,6 +1314,13 @@ GST_IS_MATROSKA_DEMUX_CLASS gst_matroska_demux_plugin_init
+
+element-mj2mux +mj2mux +GstMJ2Mux + +
+
element-monoscope monoscope @@ -1328,6 +1349,13 @@ GST_TYPE_MPEG_AUDIO_PARSE gst_mpeg_audio_parse_get_type
+
+element-mp4mux +mp4mux +GstMP4Mux + +
+
element-mulawdec mulawdec @@ -1687,6 +1715,16 @@ GST_TYPE_QTDEMUX gst_qtdemux_get_type
+
+element-qtmoovrecover +qtmoovrecover +GstQTMoovRecover +GstQTMoovRecoverClass +gst_qt_moov_recover_get_type +gst_qt_moov_recover_register + +
+
element-qtmux qtmux diff --git a/gst/quicktime/Makefile.am b/gst/quicktime/Makefile.am index 00cc1678a7..0e1b0f340e 100644 --- a/gst/quicktime/Makefile.am +++ b/gst/quicktime/Makefile.am @@ -36,6 +36,10 @@ noinst_HEADERS = \ ftypcc.h \ gstqtmuxmap.h +EXTRA_DIST = \ + gstqtmux-doc.c \ + gstqtmux-doc.h + Android.mk: Makefile.am $(BUILT_SOURCES) androgenizer \ -:PROJECT libgstqtdemux -:SHARED libgstqtdemux \ diff --git a/gst/quicktime/gstqtmoovrecover.c b/gst/quicktime/gstqtmoovrecover.c index 68011dcd63..80799724c8 100644 --- a/gst/quicktime/gstqtmoovrecover.c +++ b/gst/quicktime/gstqtmoovrecover.c @@ -42,21 +42,23 @@ /** - * SECTION:gstqtmoovrecover + * SECTION:element-qtmoovrecover * @short_description: Utility element for recovering unfinished quicktime files * * * - * This element recovers quicktime files created with qtmux using the moov recovery feature. + * This element recovers quicktime files created with qtmux using the moov + * recovery feature. * * Example pipelines * * * TODO * + * * * - * Last reviewed on 2010-02-01 + * Documentation last reviewed on 2011-04-21 */ #ifdef HAVE_CONFIG_H diff --git a/gst/quicktime/gstqtmux-doc.c b/gst/quicktime/gstqtmux-doc.c new file mode 100644 index 0000000000..986fffc17d --- /dev/null +++ b/gst/quicktime/gstqtmux-doc.c @@ -0,0 +1,300 @@ +/* Quicktime muxer documentation + * Copyright (C) 2008-2010 Thiago Santos + * Copyright (C) 2008 Mark Nauwelaerts + * Copyright (C) 2010 Nokia Corporation. All rights reserved. + * Contact: Stefan Kost + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/* + * Unless otherwise indicated, Source Code is licensed under MIT license. + * See further explanation attached in License Statement (distributed in the file + * LICENSE). + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* ============================= mp4mux ==================================== */ + +/** + * SECTION:element-mp4mux + * @short_description: Muxer for ISO MPEG-4 (.mp4) files + * + * This element merges streams (audio and video) into ISO MPEG-4 (.mp4) files. + * + * The following background intends to explain why various similar muxers + * are present in this plugin. + * + * The + * QuickTime file format specification served as basis for the MP4 file + * format specification (mp4mux), and as such the QuickTime file structure is + * nearly identical to the so-called ISO Base Media file format defined in + * ISO 14496-12 (except for some media specific parts). + * In turn, the latter ISO Base Media format was further specialized as a + * Motion JPEG-2000 file format in ISO 15444-3 (mj2mux) + * and in various 3GPP(2) specs (gppmux). + * The fragmented file features defined (only) in ISO Base Media are used by + * ISMV files making up (a.o.) Smooth Streaming (ismlmux). + * + * A few properties (movie-timescale, + * trak-timescale) allow adjusting + * some technical parameters, which might be useful in (rare) cases to resolve + * compatibility issues in some situations. + * + * Some other properties influence the result more fundamentally. + * A typical mov/mp4 file's metadata (aka moov) is located at the end of the file, + * somewhat contrary to this usually being called "the header". + * However, a faststart file will + * (with some effort) arrange this to be located near start of the file, + * which then allows it e.g. to be played while downloading. + * Alternatively, rather than having one chunk of metadata at start (or end), + * there can be some metadata at start and most of the other data can be spread + * out into fragments of fragment-duration. + * If such fragmented layout is intended for streaming purposes, then + * streamable allows foregoing to add + * index metadata (at the end of file). + * + * dts-method allows selecting a + * method for managing input timestamps (stay tuned for 0.11 to have this + * automagically settled). The default delta/duration method should handle nice + * (aka perfect streams) just fine, but may experience problems otherwise + * (e.g. input stream with re-ordered B-frames and/or with frame dropping). + * The re-ordering approach re-assigns incoming timestamps in ascending order + * to incoming buffers and offers an alternative in such cases. In cases where + * that might fail, the remaining method can be tried, which is exact and + * according to specs, but might experience playback on not so spec-wise players. + * Note that this latter approach also requires one to enable + * presentation-timestamp. + * + * + * Example pipelines + * |[ + * gst-launch gst-launch v4l2src num-buffers=50 ! queue ! x264enc ! mp4mux ! filesink location=video.mp4 + * ]| + * Records a video stream captured from a v4l2 device, encodes it into H.264 + * and muxes it into an mp4 file. + * + * + * Documentation last reviewed on 2011-04-21 + */ + +/* ============================= 3gppmux ==================================== */ + +/** + * SECTION:element-3gppmux + * @short_description: Muxer for 3GPP (.3gp) files + * + * This element merges streams (audio and video) into 3GPP (.3gp) files. + * + * The following background intends to explain why various similar muxers + * are present in this plugin. + * + * The + * QuickTime file format specification served as basis for the MP4 file + * format specification (mp4mux), and as such the QuickTime file structure is + * nearly identical to the so-called ISO Base Media file format defined in + * ISO 14496-12 (except for some media specific parts). + * In turn, the latter ISO Base Media format was further specialized as a + * Motion JPEG-2000 file format in ISO 15444-3 (mj2mux) + * and in various 3GPP(2) specs (gppmux). + * The fragmented file features defined (only) in ISO Base Media are used by + * ISMV files making up (a.o.) Smooth Streaming (ismlmux). + * + * A few properties (movie-timescale, + * trak-timescale) allow adjusting + * some technical parameters, which might be useful in (rare) cases to resolve + * compatibility issues in some situations. + * + * Some other properties influence the result more fundamentally. + * A typical mov/mp4 file's metadata (aka moov) is located at the end of the file, + * somewhat contrary to this usually being called "the header". + * However, a faststart file will + * (with some effort) arrange this to be located near start of the file, + * which then allows it e.g. to be played while downloading. + * Alternatively, rather than having one chunk of metadata at start (or end), + * there can be some metadata at start and most of the other data can be spread + * out into fragments of fragment-duration. + * If such fragmented layout is intended for streaming purposes, then + * streamable allows foregoing to add + * index metadata (at the end of file). + * + * dts-method allows selecting a + * method for managing input timestamps (stay tuned for 0.11 to have this + * automagically settled). The default delta/duration method should handle nice + * (aka perfect streams) just fine, but may experience problems otherwise + * (e.g. input stream with re-ordered B-frames and/or with frame dropping). + * The re-ordering approach re-assigns incoming timestamps in ascending order + * to incoming buffers and offers an alternative in such cases. In cases where + * that might fail, the remaining method can be tried, which is exact and + * according to specs, but might experience playback on not so spec-wise players. + * Note that this latter approach also requires one to enable + * presentation-timestamp. + * + * + * Example pipelines + * |[ + * gst-launch v4l2src num-buffers=50 ! queue ! ffenc_h263 ! gppmux ! filesink location=video.3gp + * ]| + * Records a video stream captured from a v4l2 device, encodes it into H.263 + * and muxes it into an 3gp file. + * + * + * Documentation last reviewed on 2011-04-21 + */ + +/* ============================= mj2pmux ==================================== */ + +/** + * SECTION:element-mj2mux + * @short_description: Muxer for Motion JPEG-2000 (.mj2) files + * + * This element merges streams (audio and video) into MJ2 (.mj2) files. + * + * The following background intends to explain why various similar muxers + * are present in this plugin. + * + * The + * QuickTime file format specification served as basis for the MP4 file + * format specification (mp4mux), and as such the QuickTime file structure is + * nearly identical to the so-called ISO Base Media file format defined in + * ISO 14496-12 (except for some media specific parts). + * In turn, the latter ISO Base Media format was further specialized as a + * Motion JPEG-2000 file format in ISO 15444-3 (mj2mux) + * and in various 3GPP(2) specs (gppmux). + * The fragmented file features defined (only) in ISO Base Media are used by + * ISMV files making up (a.o.) Smooth Streaming (ismlmux). + * + * A few properties (movie-timescale, + * trak-timescale) allow adjusting + * some technical parameters, which might be useful in (rare) cases to resolve + * compatibility issues in some situations. + * + * Some other properties influence the result more fundamentally. + * A typical mov/mp4 file's metadata (aka moov) is located at the end of the file, + * somewhat contrary to this usually being called "the header". + * However, a faststart file will + * (with some effort) arrange this to be located near start of the file, + * which then allows it e.g. to be played while downloading. + * Alternatively, rather than having one chunk of metadata at start (or end), + * there can be some metadata at start and most of the other data can be spread + * out into fragments of fragment-duration. + * If such fragmented layout is intended for streaming purposes, then + * streamable allows foregoing to add + * index metadata (at the end of file). + * + * dts-method allows selecting a + * method for managing input timestamps (stay tuned for 0.11 to have this + * automagically settled). The default delta/duration method should handle nice + * (aka perfect streams) just fine, but may experience problems otherwise + * (e.g. input stream with re-ordered B-frames and/or with frame dropping). + * The re-ordering approach re-assigns incoming timestamps in ascending order + * to incoming buffers and offers an alternative in such cases. In cases where + * that might fail, the remaining method can be tried, which is exact and + * according to specs, but might experience playback on not so spec-wise players. + * Note that this latter approach also requires one to enable + * presentation-timestamp. + * + * + * Example pipelines + * |[ + * gst-launch v4l2src num-buffers=50 ! queue ! jp2kenc ! mj2mux ! filesink location=video.mj2 + * ]| + * Records a video stream captured from a v4l2 device, encodes it into JPEG-2000 + * and muxes it into an mj2 file. + * + * + * Documentation last reviewed on 2011-04-21 + */ + +/* ============================= ismlmux ==================================== */ + +/** + * SECTION:element-ismlmux + * @short_description: Muxer for ISML smooth streaming (.isml) files + * + * This element merges streams (audio and video) into MJ2 (.mj2) files. + * + * The following background intends to explain why various similar muxers + * are present in this plugin. + * + * The + * QuickTime file format specification served as basis for the MP4 file + * format specification (mp4mux), and as such the QuickTime file structure is + * nearly identical to the so-called ISO Base Media file format defined in + * ISO 14496-12 (except for some media specific parts). + * In turn, the latter ISO Base Media format was further specialized as a + * Motion JPEG-2000 file format in ISO 15444-3 (mj2mux) + * and in various 3GPP(2) specs (gppmux). + * The fragmented file features defined (only) in ISO Base Media are used by + * ISMV files making up (a.o.) Smooth Streaming (ismlmux). + * + * A few properties (movie-timescale, + * trak-timescale) allow adjusting + * some technical parameters, which might be useful in (rare) cases to resolve + * compatibility issues in some situations. + * + * Some other properties influence the result more fundamentally. + * A typical mov/mp4 file's metadata (aka moov) is located at the end of the file, + * somewhat contrary to this usually being called "the header". + * However, a faststart file will + * (with some effort) arrange this to be located near start of the file, + * which then allows it e.g. to be played while downloading. + * Alternatively, rather than having one chunk of metadata at start (or end), + * there can be some metadata at start and most of the other data can be spread + * out into fragments of fragment-duration. + * If such fragmented layout is intended for streaming purposes, then + * streamable allows foregoing to add + * index metadata (at the end of file). + * + * dts-method allows selecting a + * method for managing input timestamps (stay tuned for 0.11 to have this + * automagically settled). The default delta/duration method should handle nice + * (aka perfect streams) just fine, but may experience problems otherwise + * (e.g. input stream with re-ordered B-frames and/or with frame dropping). + * The re-ordering approach re-assigns incoming timestamps in ascending order + * to incoming buffers and offers an alternative in such cases. In cases where + * that might fail, the remaining method can be tried, which is exact and + * according to specs, but might experience playback on not so spec-wise players. + * Note that this latter approach also requires one to enable + * presentation-timestamp. + * + * + * Example pipelines + * |[ + * gst-launch v4l2src num-buffers=50 ! queue ! jp2kenc ! mj2mux ! filesink location=video.mj2 + * ]| + * Records a video stream captured from a v4l2 device, encodes it into JPEG-2000 + * and muxes it into an mj2 file. + * + * + * Documentation last reviewed on 2011-04-21 + */ diff --git a/gst/quicktime/gstqtmux-doc.h b/gst/quicktime/gstqtmux-doc.h new file mode 100644 index 0000000000..48b5d8c414 --- /dev/null +++ b/gst/quicktime/gstqtmux-doc.h @@ -0,0 +1,52 @@ +/* Quicktime muxer documentation + * Copyright (C) 2008-2010 Thiago Santos + * Copyright (C) 2008 Mark Nauwelaerts + * Copyright (C) 2010 Nokia Corporation. All rights reserved. + * Contact: Stefan Kost + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +/* + * Unless otherwise indicated, Source Code is licensed under MIT license. + * See further explanation attached in License Statement (distributed in the file + * LICENSE). + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#error "This header is for gtk-doc only and not supposed to be included" + +typedef struct _GstMP4Mux GstMP4Mux; +typedef struct _Gst3GPPMux GstMP4Mux; +typedef struct _GstISMLMux GstMP4Mux; +typedef struct _GstMJ2Mux GstMJ2Mux; + From fbfbfa153fafd9848733ca284f91ebeb9e34eb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 24 Apr 2011 14:03:41 +0100 Subject: [PATCH 4/8] Automatic update of common submodule From c3cafe1 to 46dfcea --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index c3cafe123f..46dfcea233 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c3cafe123f3a363d337a29ad32fdd6d3631f52c0 +Subproject commit 46dfcea233cf6df83e3771d8a8066e87d614f893 From 234fd201c986e173b022afd24e28fa0e8728096d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 24 Apr 2011 13:29:32 +0100 Subject: [PATCH 5/8] quicktime: rename plugin filename from *qtdemux* to *quicktime* https://bugzilla.gnome.org/show_bug.cgi?id=648004 --- docs/plugins/inspect/plugin-quicktime.xml | 6 +++--- gst-plugins-good.spec.in | 2 +- gst/quicktime/Makefile.am | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/plugins/inspect/plugin-quicktime.xml b/docs/plugins/inspect/plugin-quicktime.xml index 74eee4ecf9..c146ebcded 100644 --- a/docs/plugins/inspect/plugin-quicktime.xml +++ b/docs/plugins/inspect/plugin-quicktime.xml @@ -1,8 +1,8 @@ quicktime Quicktime support - ../../gst/quicktime/.libs/libgstqtdemux.so - libgstqtdemux.so + ../../gst/quicktime/.libs/libgstquicktime.so + libgstquicktime.so 0.10.28.2 LGPL gst-plugins-good @@ -208,4 +208,4 @@ - \ No newline at end of file + diff --git a/gst-plugins-good.spec.in b/gst-plugins-good.spec.in index e2c0f64ea8..83641b2bc3 100644 --- a/gst-plugins-good.spec.in +++ b/gst-plugins-good.spec.in @@ -98,7 +98,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gstreamer-%{majorminor}/libgstlevel.so %{_libdir}/gstreamer-%{majorminor}/libgstefence.so %{_libdir}/gstreamer-%{majorminor}/libgstmulaw.so -%{_libdir}/gstreamer-%{majorminor}/libgstqtdemux.so +%{_libdir}/gstreamer-%{majorminor}/libgstquicktime.so %{_libdir}/gstreamer-%{majorminor}/libgstrtp.so %{_libdir}/gstreamer-%{majorminor}/libgstrtpmanager.so %{_libdir}/gstreamer-%{majorminor}/libgstrtsp.so diff --git a/gst/quicktime/Makefile.am b/gst/quicktime/Makefile.am index 0e1b0f340e..67932f7469 100644 --- a/gst/quicktime/Makefile.am +++ b/gst/quicktime/Makefile.am @@ -1,8 +1,8 @@ -plugin_LTLIBRARIES = libgstqtdemux.la +plugin_LTLIBRARIES = libgstquicktime.la -libgstqtdemux_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstqtdemux_la_LIBADD = \ +libgstquicktime_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) +libgstquicktime_la_LIBADD = \ $(GST_PLUGINS_BASE_LIBS) \ -lgstriff-@GST_MAJORMINOR@ \ -lgstaudio-@GST_MAJORMINOR@ \ @@ -10,12 +10,12 @@ libgstqtdemux_la_LIBADD = \ -lgsttag-@GST_MAJORMINOR@ \ -lgstpbutils-@GST_MAJORMINOR@ \ $(GST_BASE_LIBS) $(GST_LIBS) $(ZLIB_LIBS) -libgstqtdemux_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} -libgstqtdemux_la_SOURCES = quicktime.c gstrtpxqtdepay.c \ +libgstquicktime_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} +libgstquicktime_la_SOURCES = quicktime.c gstrtpxqtdepay.c \ qtdemux.c qtdemux_types.c qtdemux_dump.c qtdemux_lang.c \ gstqtmux.c gstqtmoovrecover.c atoms.c atomsrecovery.c descriptors.c \ properties.c gstqtmuxmap.c -libgstqtdemux_la_LIBTOOLFLAGS = --tag=disable-static +libgstquicktime_la_LIBTOOLFLAGS = --tag=disable-static noinst_HEADERS = \ qtatomparser.h \ @@ -42,13 +42,13 @@ EXTRA_DIST = \ Android.mk: Makefile.am $(BUILT_SOURCES) androgenizer \ - -:PROJECT libgstqtdemux -:SHARED libgstqtdemux \ + -:PROJECT libgstquicktime -:SHARED libgstquicktime \ -:TAGS eng debug \ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstqtdemux_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstqtdemux_la_CFLAGS) \ - -:LDFLAGS $(libgstqtdemux_la_LDFLAGS) \ - $(libgstqtdemux_la_LIBADD) \ + -:SOURCES $(libgstquicktime_la_SOURCES) \ + -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(libgstquicktime_la_CFLAGS) \ + -:LDFLAGS $(libgstquicktime_la_LDFLAGS) \ + $(libgstquicktime_la_LIBADD) \ -ldl \ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ From 85932c74df99d6d222c5e092db8354a24e717fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 24 Apr 2011 14:03:56 +0100 Subject: [PATCH 6/8] configure: don't pass -Waddress to ObjC compiler on OSX when compiling osxvideosink Temporary workaround until we fix this properly and check for the ObjC warning/error flags instead of just passing CFLAGS to the ObjC compiler. https://bugzilla.gnome.org/show_bug.cgi?id=643939 --- configure.ac | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 2413c481a6..36bd4a7788 100644 --- a/configure.ac +++ b/configure.ac @@ -296,12 +296,22 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO], dnl define an ERROR_CFLAGS Makefile variable dnl -Wundef: too many broken headers -dnl -Waggregate-return: causes problems with ObjC code like in osxvideosink -AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ +if test "x$HAVE_OSX_VIDEO" != "xyes"; then + AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls - -Wwrite-strings -Wold-style-definition + -Wwrite-strings -Wold-style-definition -Waggregate-return -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs ]) +else + dnl work-around for us passing GST_CFLAGS to the ObjC-compiler, which + dnl doesn't understand all warning flags that the C compiler knows about + dnl (e.g. -Waddress) or causes problems with some flags (-Waggregate-return) + AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ + -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls + -Wwrite-strings -Wold-style-definition + -Winit-self -Wmissing-include-dirs -Wno-multichar + -Wnested-externs ]) +fi dnl define an ERROR_CXXFLAGS Makefile variable AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [ From 24d57ac9616da6db663baf29f0de6302c545647a Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 20 Feb 2011 12:13:49 -0800 Subject: [PATCH 7/8] pngdec: Remove temporary code Now that we depend on (what will be) -base-0.10.33. --- ext/libpng/gstpngdec.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ext/libpng/gstpngdec.c b/ext/libpng/gstpngdec.c index 4e43dec393..965310096d 100644 --- a/ext/libpng/gstpngdec.c +++ b/ext/libpng/gstpngdec.c @@ -82,18 +82,12 @@ gst_pngdec_get_type (void) return pngdec_type; } -/* FIXME remove this after -good depends on -base-0.10.33 */ -#ifdef GST_VIDEO_CAPS_ARGB_64 -#define CAPS GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_RGB ";" GST_VIDEO_CAPS_ARGB_64 -#else -#define CAPS GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_RGB -#endif - static GstStaticPadTemplate gst_pngdec_src_pad_template = -GST_STATIC_PAD_TEMPLATE ("src", + GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (CAPS) + GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBA ";" GST_VIDEO_CAPS_RGB ";" + GST_VIDEO_CAPS_ARGB_64) ); static GstStaticPadTemplate gst_pngdec_sink_pad_template = From bddac509612362a53a4636dfb53cc9e097f7bf53 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 24 Apr 2011 16:45:07 -0700 Subject: [PATCH 8/8] avimux,matroskamux: Add stream-format to h264 caps Fixes #606662. --- gst/avi/gstavimux.c | 2 ++ gst/matroska/matroska-mux.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index 37f9291377..fc8c98639e 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -129,6 +129,8 @@ static GstStaticPadTemplate video_sink_factory = "height = (int) [ 16, 4096 ], " "framerate = (fraction) [ 0, MAX ]; " "video/x-h264, " + "stream-format = (string) byte-stream, " + "alignment = (string) au, " "width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ], " "framerate = (fraction) [ 0, MAX ]; " diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 7f94f18718..7fcf943a72 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -102,7 +102,7 @@ static GstStaticPadTemplate videosink_templ = "mpegversion = (int) { 1, 2, 4 }, " "systemstream = (boolean) false, " COMMON_VIDEO_CAPS "; " - "video/x-h264, " + "video/x-h264, stream-format=avc, alignment=au, " COMMON_VIDEO_CAPS "; " "video/x-divx, " COMMON_VIDEO_CAPS "; "