[GStreamer] Bump internal jhbuild versions to 1.8.0 and patches to support MSE
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 May 2016 08:40:21 +0000 (08:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 May 2016 08:40:21 +0000 (08:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=157341

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2016-05-05
Reviewed by Xabier Rodriguez-Calvar.

* gtk/jhbuild.modules:
* gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
* gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200454 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/gtk/jhbuild.modules
Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch [new file with mode: 0644]
Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch [new file with mode: 0644]

index a5def69..30c5aae 100644 (file)
@@ -1,3 +1,14 @@
+2016-05-05  Enrique Ocaña González  <eocanha@igalia.com>
+
+        [GStreamer] Bump internal jhbuild versions to 1.8.0 and patches to support MSE
+        https://bugs.webkit.org/show_bug.cgi?id=157341
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * gtk/jhbuild.modules:
+        * gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
+        * gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.
+
 2016-05-04  Srinivasan Vijayaraghavan  <svijayaraghavan@apple.com>
 
         Add JSC test results in JSON format to a Buildbot log
index 2b090b4..4ee990f 100644 (file)
     <dependencies>
       <dep package="orc"/>
     </dependencies>
-    <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.6.3"
+    <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.8.0"
             repo="gstreamer"
-            hash="sha256:22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24"
-            md5sum="b4cdeb2b9cb20dd6ac022a4f417eae0d"/>
+            hash="sha256:947a314a212b5d94985d89b43440dbe66b696e12bbdf9a2f78967b98d74abedc"
+            md5sum="6846d7289ec323c38c49b818171e955a"/>
   </autotools>
 
   <autotools id="gst-plugins-base"
     <dependencies>
       <dep package="gstreamer"/>
     </dependencies>
-    <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.6.3"
+    <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.8.0"
             repo="gstreamer"
-            hash="sha256:b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75"
-            md5sum="3ddde0ad598ef69f58d6a2e87f8b460f"/>
+            hash="sha256:abc0acc1d15b4b9c97c65cd9689bd6400081853b9980ea428d3c8572dd791522"
+            md5sum="20cc8231609318310f2a55f64c86cbb4"/>
   </autotools>
 
   <autotools id="gst-plugins-good" autogenargs="--disable-examples --disable-soup --disable-gtk-doc">
       <dep package="gst-plugins-base"/>
     </dependencies>
 
-    <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.6.3"
+    <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.8.0"
             repo="gstreamer"
-            hash="sha256:24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177"
-            md5sum="a1958df7aa498b42793e2f2048673815"/>
+            hash="sha256:c20c134d47dbc238d921707a3b66da709c2b4dd89f9d267cec13d1ddf16e9f4d"
+            md5sum="91ed4649c7c2e43a61f731d144f6f6d0">
+      <patch file="gst-plugins-good-use-the-tfdt-decode-time.patch" strip="1"/>
+      <patch file="gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch" strip="1"/>
+    </branch>
   </autotools>
 
   <autotools id="gst-plugins-bad" autogenargs="--disable-examples --disable-gtk-doc">
     <dependencies>
       <dep package="gst-plugins-base"/>
     </dependencies>
-    <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.6.3"
+    <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.8.0"
             repo="gstreamer"
-            hash="sha256:971b29101d6a9c5e3fe94d99d977a227f58f0b2d29b6ca2c7f292052542b3a61"
-            md5sum="4857adcafe41e4b9b8805cf88303bd55"/>
+            hash="sha256:116376dd1085082422e0b21b0ecd3d1cb345c469c58e32463167d4675f4ca90e"
+            md5sum="1c2d797bb96a81e9ef570c7a0a37203e"/>
   </autotools>
 
   <autotools id="gst-libav" autogenargs="--with-libav-extra-configure='--disable-yasm' --disable-gtk-doc">
     <dependencies>
       <dep package="gst-plugins-base"/>
     </dependencies>
-    <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.6.3"
+    <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.8.0"
             repo="gstreamer"
-            hash="sha256:857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab"
-            md5sum="cfe9a06913d4fd4067e9e47f6e05fac2"/>
+            hash="sha256:5a1ce28876aee93cb4f3d090f0e807915a5d9bc1325e3480dd302b85aeb4291c"
+            md5sum="361638fa45466c5050bcde6bfe10fa46"/>
   </autotools>
 
   <autotools id="xserver" autogenargs="--disable-xinerama --enable-glx --enable-composite --disable-xorg --disable-dmx --disable-xnest --disable-xquartz --disable-xwin --disable-xephyr --disable-xfake --disable-xfbdev --disable-install-setuid --disable-unit-tests --disable-present --enable-unix-transport --enable-tcp-transport --disable-local-transport --with-xkb-path=/usr/share/X11/xkb --with-xkb-output=/var/lib/xkb --with-xkb-bin-directory=/usr/bin --without-dtrace">
diff --git a/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch b/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch
new file mode 100644 (file)
index 0000000..3a60db4
--- /dev/null
@@ -0,0 +1,133 @@
+From 1a81bd90d4a3e59d6669a0bbfa456f1ed4e5db48 Mon Sep 17 00:00:00 2001
+From: Xabier Rodriguez Calvar <calvaris@igalia.com>
+Date: Thu, 7 Apr 2016 13:57:16 +0200
+Subject: [PATCH] Revert "qtdemux: expose streams with first moof for
+ fragmented format"
+
+This reverts commit d8bb6687ea251570c331038279a43d448167d6ad.
+---
+ gst/isomp4/qtdemux.c | 54 ++++++++++++++++------------------------------------
+ gst/isomp4/qtdemux.h |  1 -
+ 2 files changed, 16 insertions(+), 39 deletions(-)
+
+diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
+index 39be163..9636b4b 100644
+--- a/gst/isomp4/qtdemux.c
++++ b/gst/isomp4/qtdemux.c
+@@ -609,7 +609,6 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
+   qtdemux->state = QTDEMUX_STATE_INITIAL;
+   qtdemux->pullbased = FALSE;
+   qtdemux->posted_redirect = FALSE;
+-  qtdemux->pending_configure = FALSE;
+   qtdemux->neededbytes = 16;
+   qtdemux->todrop = 0;
+   qtdemux->adapter = gst_adapter_new ();
+@@ -2049,7 +2048,6 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
+     gst_caps_replace (&qtdemux->media_caps, NULL);
+     qtdemux->timescale = 0;
+     qtdemux->got_moov = FALSE;
+-    qtdemux->pending_configure = FALSE;
+   } else if (qtdemux->mss_mode) {
+     gst_flow_combiner_reset (qtdemux->flowcombiner);
+     for (n = 0; n < qtdemux->n_streams; n++)
+@@ -6104,7 +6102,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+             &fourcc);
+         if (fourcc == FOURCC_moov) {
+           gint n;
+-          gboolean got_samples = FALSE;
+           /* in usual fragmented setup we could try to scan for more
+            * and end up at the the moov (after mdat) again */
+@@ -6136,27 +6133,19 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+             qtdemux_node_dump (demux, demux->moov_node);
+             qtdemux_parse_tree (demux);
+             qtdemux_prepare_streams (demux);
++            if (!demux->got_moov)
++              qtdemux_expose_streams (demux);
++            else {
+-            for (n = 0; n < demux->n_streams; n++) {
+-              QtDemuxStream *stream = demux->streams[n];
+-              got_samples |= stream->stbl_index >= 0;
+-            }
+-            if (!demux->fragmented || got_samples) {
+-              if (!demux->got_moov) {
+-                qtdemux_expose_streams (demux);
+-              } else {
+-                for (n = 0; n < demux->n_streams; n++) {
+-                  QtDemuxStream *stream = demux->streams[n];
+-                  gst_qtdemux_configure_stream (demux, stream);
+-                }
++              for (n = 0; n < demux->n_streams; n++) {
++                QtDemuxStream *stream = demux->streams[n];
++
++                gst_qtdemux_configure_stream (demux, stream);
+               }
+-              gst_qtdemux_check_send_pending_segment (demux);
+-              demux->pending_configure = FALSE;
+-            } else {
+-              demux->pending_configure = TRUE;
+             }
+             demux->got_moov = TRUE;
++            gst_qtdemux_check_send_pending_segment (demux);
+             /* fragmented streams headers shouldn't contain edts atoms */
+             if (!demux->fragmented) {
+@@ -6175,7 +6164,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+             guint64 dist = 0;
+             GstClockTime prev_pts;
+             guint64 prev_offset;
+-            gint n;
+             GST_DEBUG_OBJECT (demux, "Parsing [moof]");
+@@ -6209,25 +6197,15 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+               ret = GST_FLOW_ERROR;
+               goto done;
+             }
+-            /* in MSS we need to expose the pads after the first moof as we won't get a moov 
+-             * Also, fragmented format need to be exposed if a moov have no valid sample data */
+-            if (demux->mss_mode || demux->pending_configure) {
+-              if (!demux->exposed) {
+-                if (!demux->pending_newsegment) {
+-                  GstSegment segment;
+-                  gst_segment_init (&segment, GST_FORMAT_TIME);
+-                  GST_DEBUG_OBJECT (demux, "new pending_newsegment");
+-                  demux->pending_newsegment = gst_event_new_segment (&segment);
+-                }
+-                qtdemux_expose_streams (demux);
+-              } else {
+-                for (n = 0; n < demux->n_streams; n++) {
+-                  QtDemuxStream *stream = demux->streams[n];
+-                  gst_qtdemux_configure_stream (demux, stream);
+-                }
++            /* in MSS we need to expose the pads after the first moof as we won't get a moov */
++            if (demux->mss_mode && !demux->exposed) {
++              if (!demux->pending_newsegment) {
++                GstSegment segment;
++                gst_segment_init (&segment, GST_FORMAT_TIME);
++                GST_DEBUG_OBJECT (demux, "new pending_newsegment");
++                demux->pending_newsegment = gst_event_new_segment (&segment);
+               }
+-              gst_qtdemux_check_send_pending_segment (demux);
+-              demux->pending_configure = FALSE;
++              qtdemux_expose_streams (demux);
+             }
+           } else {
+             GST_DEBUG_OBJECT (demux, "Discarding [moof]");
+diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h
+index 6061215..ecf0c63 100644
+--- a/gst/isomp4/qtdemux.h
++++ b/gst/isomp4/qtdemux.h
+@@ -89,7 +89,6 @@ struct _GstQTDemux {
+   gboolean posted_redirect;
+   /* push based variables */
+-  gboolean pending_configure;
+   guint neededbytes;
+   guint todrop;
+   GstAdapter *adapter;
+-- 
+2.8.0.rc3
+
diff --git a/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch b/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch
new file mode 100644 (file)
index 0000000..1e9dd97
--- /dev/null
@@ -0,0 +1,146 @@
+From 46d3e0faa922643094a5e46a32e4f82f774ae772 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
+Date: Tue, 10 Nov 2015 13:09:00 +0100
+Subject: [PATCH] Use the tfdt decode time when it's significantly different
+ than the time in the last sample if always-honor-tfdt is enabled
+
+https://bugzilla.gnome.org/show_bug.cgi?id=754230
+---
+ gst/isomp4/qtdemux.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gst/isomp4/qtdemux.h |  1 +
+ 2 files changed, 73 insertions(+)
+
+diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
+index 880595e..d8b54f0 100644
+--- a/gst/isomp4/qtdemux.c
++++ b/gst/isomp4/qtdemux.c
+@@ -535,6 +535,11 @@ static void gst_qtdemux_append_protection_system_id (GstQTDemux * qtdemux,
+     const gchar * id);
+ static void qtdemux_gst_structure_free (GstStructure * gststructure);
++static void gst_qtdemux_set_property (GObject * object, guint prop_id,
++    const GValue * value, GParamSpec * spec);
++static void gst_qtdemux_get_property (GObject * object, guint prop_id,
++    GValue * value, GParamSpec * spec);
++
+ static void
+ gst_qtdemux_class_init (GstQTDemuxClass * klass)
+ {
+@@ -546,8 +551,21 @@ gst_qtdemux_class_init (GstQTDemuxClass * klass)
+   parent_class = g_type_class_peek_parent (klass);
++  gobject_class->set_property = gst_qtdemux_set_property;
++  gobject_class->get_property = gst_qtdemux_get_property;
++
+   gobject_class->dispose = gst_qtdemux_dispose;
++ /**
++   * GstQtDemux::always-honor-tfdt:
++   *
++   * Requests the demuxer to respect what the TFDT atom says in order to produce presentation timestamps. Defaults to FALSE.
++   */
++  g_object_class_install_property (gobject_class, PROP_ALWAYS_HONOR_TFDT,
++      g_param_spec_boolean ("always-honor-tfdt", "Always honor TFDT",
++          "When enabled, TFDT atom will always be respected in order to produce presentation timestamps",
++          FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
+   gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_qtdemux_change_state);
+ #if 0
+   gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_qtdemux_set_index);
+@@ -611,6 +629,7 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
+   qtdemux->cenc_aux_info_sizes = NULL;
+   qtdemux->cenc_aux_sample_count = 0;
+   qtdemux->protection_system_ids = NULL;
++  qtdemux->always_honor_tfdt = FALSE;
+   g_queue_init (&qtdemux->protection_event_queue);
+   gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
+   qtdemux->flowcombiner = gst_flow_combiner_new ();
+@@ -639,6 +658,42 @@ gst_qtdemux_dispose (GObject * object)
+ }
+ static void
++gst_qtdemux_set_property (GObject * object, guint prop_id,
++    const GValue * value, GParamSpec * pspec)
++{
++  GstQTDemux *qtdemux = GST_QTDEMUX (object);
++
++  switch (prop_id) {
++    case PROP_ALWAYS_HONOR_TFDT:
++      GST_OBJECT_LOCK (qtdemux);
++      qtdemux->always_honor_tfdt = g_value_get_boolean (value);
++      GST_OBJECT_UNLOCK (qtdemux);
++      break;
++    default:
++      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++      break;
++  }
++}
++
++static void
++gst_qtdemux_get_property (GObject * object, guint prop_id, GValue * value,
++    GParamSpec * pspec)
++{
++  GstQTDemux *qtdemux = GST_QTDEMUX (object);
++
++  switch (prop_id) {
++    case PROP_ALWAYS_HONOR_TFDT:
++      GST_OBJECT_LOCK (qtdemux);
++      g_value_set_boolean (value, qtdemux->always_honor_tfdt);
++      GST_OBJECT_UNLOCK (qtdemux);
++      break;
++    default:
++      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++      break;
++  }
++}
++
++static void
+ gst_qtdemux_post_no_playable_stream_error (GstQTDemux * qtdemux)
+ {
+   if (qtdemux->posted_redirect) {
+@@ -2995,6 +3050,16 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
+           stream->samples[stream->n_samples - 1].timestamp +
+           stream->samples[stream->n_samples - 1].duration;
++      /* If we're always honoring TFDT and there's a significative difference
++       * between the decode_ts and the timestamp, prefer decode_ts */
++      if (qtdemux->always_honor_tfdt == TRUE
++          && abs (decode_ts - timestamp) >
++          stream->samples[stream->n_samples - 1].duration) {
++        GST_INFO_OBJECT (qtdemux,
++            "decode_ts is significantly different from timestamp, using decode_ts");
++        timestamp = decode_ts;
++      }
++
+       gst_ts = QTSTREAMTIME_TO_GSTTIME (stream, timestamp);
+       GST_INFO_OBJECT (qtdemux, "first sample ts %" GST_TIME_FORMAT
+           " (extends previous samples)", GST_TIME_ARGS (gst_ts));
+diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h
+index 53bd071..ecf0c63 100644
+--- a/gst/isomp4/qtdemux.h
++++ b/gst/isomp4/qtdemux.h
+@@ -154,12 +154,20 @@ struct _GstQTDemux {
+   guint8 *cenc_aux_info_sizes;
+   guint32 cenc_aux_sample_count;
++  gboolean always_honor_tfdt;
+ };
+ struct _GstQTDemuxClass {
+   GstElementClass parent_class;
+ };
++/* props */
++enum
++{
++  PROP_0,
++  PROP_ALWAYS_HONOR_TFDT
++};
++
+ GType gst_qtdemux_get_type (void);
+ G_END_DECLS
+-- 
+2.6.1
+