Title: [216179] trunk/Tools
Revision
216179
Author
[email protected]
Date
2017-05-04 04:57:08 -0700 (Thu, 04 May 2017)

Log Message

[GTK] Bump GStreamer version to 1.10.4 in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=171595

Patch by Carlos Garcia Campos <[email protected]> on 2017-05-04
Reviewed by Xabier Rodriguez-Calvar.

* gtk/jhbuild.modules:
* gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Removed.
* gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Removed.
* gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch: Removed.
* gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch: Removed.
* gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:
* gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
* gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (216178 => 216179)


--- trunk/Tools/ChangeLog	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/ChangeLog	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,3 +1,19 @@
+2017-05-04  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Bump GStreamer version to 1.10.4 in jhbuild
+        https://bugs.webkit.org/show_bug.cgi?id=171595
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * gtk/jhbuild.modules:
+        * gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Removed.
+        * gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Removed.
+        * gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch: Removed.
+        * gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch: Removed.
+        * gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch:
+        * gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
+        * gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
+
 2017-05-03  Saam Barati  <[email protected]>
 
         How we build polymorphic cases is wrong when making a call from Wasm

Modified: trunk/Tools/gtk/jhbuild.modules (216178 => 216179)


--- trunk/Tools/gtk/jhbuild.modules	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/jhbuild.modules	2017-05-04 11:57:08 UTC (rev 216179)
@@ -353,13 +353,6 @@
     </dependencies>
   </autotools>
 
-  <autotools id="orc" autogenargs="--disable-gtk-doc" autogen-sh="configure">
-    <branch module="orc/orc-0.4.17.tar.gz" version="0.4.17"
-            repo="gstreamer"
-            hash="sha256:4fc7cca48c59fff23afee78fb642cdbde001f56401c8f47b95a16578d1d5d7e8"
-            md5sum="af1bf3dab9e69f3c36f389285e2a12a1"/>
-  </autotools>
-
   <autotools id="gstreamer" autogen-sh="configure" autogenargs="--disable-gtk-doc">
     <if condition-set="macos">
       <autogenargs value="--disable-introspection"/>
@@ -367,10 +360,9 @@
     <dependencies>
       <dep package="orc"/>
     </dependencies>
-    <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.8.0"
+    <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.10.4"
             repo="gstreamer"
-            hash="sha256:947a314a212b5d94985d89b43440dbe66b696e12bbdf9a2f78967b98d74abedc"
-            md5sum="6846d7289ec323c38c49b818171e955a">
+            hash="sha256:50c2f5af50a6cc6c0a3f3ed43bdd8b5e2bff00bacfb766d4be139ec06d8b5218">
       <patch file="gstreamer-0001-protection-added-function-to-filter-system-ids.patch" strip="1"/>
     </branch>
   </autotools>
@@ -384,10 +376,9 @@
     <dependencies>
       <dep package="gstreamer"/>
     </dependencies>
-    <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.8.0"
+    <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.10.4"
             repo="gstreamer"
-            hash="sha256:abc0acc1d15b4b9c97c65cd9689bd6400081853b9980ea428d3c8572dd791522"
-            md5sum="20cc8231609318310f2a55f64c86cbb4"/>
+            hash="sha256:f6d245b6b3d4cb733f81ebb021074c525ece83db0c10e932794b339b8d935eb7"/>
   </autotools>
 
   <autotools id="gst-plugins-good" autogen-sh="configure" autogenargs="--disable-examples --disable-soup --disable-gtk-doc">
@@ -399,14 +390,9 @@
       <dep package="libvpx"/>
     </dependencies>
 
-    <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.8.0"
+    <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.10.4"
             repo="gstreamer"
-            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"/>
-      <patch file="gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch" strip="1"/>
-      <patch file="gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch" strip="1"/>
+            hash="sha256:8a86c61434a8c44665365bd0b3557a040937d1f44bf69caee4e9ea816ce74d7e">
       <patch file="gst-plugins-good-0003-rtpbin-receive-bundle-support.patch" strip="1"/>
       <patch file="gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch" strip="1"/>
     </branch>
@@ -420,13 +406,9 @@
       <dep package="gst-plugins-base"/>
       <dep package="openh264"/>
     </dependencies>
-    <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.8.0"
+    <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.10.4"
             repo="gstreamer"
-            hash="sha256:116376dd1085082422e0b21b0ecd3d1cb345c469c58e32463167d4675f4ca90e"
-            md5sum="1c2d797bb96a81e9ef570c7a0a37203e">
-      <patch file="gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch" strip="1"/>
-      <patch file="gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch" strip="1"/>
-    </branch>
+            hash="sha256:23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"/>
   </autotools>
 
   <autotools id="gst-libav" autogen-sh="configure" autogenargs="--with-libav-extra-configure='--disable-yasm' --disable-gtk-doc">
@@ -433,10 +415,9 @@
     <dependencies>
       <dep package="gst-plugins-base"/>
     </dependencies>
-    <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.8.0"
+    <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.10.4"
             repo="gstreamer"
-            hash="sha256:5a1ce28876aee93cb4f3d090f0e807915a5d9bc1325e3480dd302b85aeb4291c"
-            md5sum="361638fa45466c5050bcde6bfe10fa46"/>
+            hash="sha256:6ca0feca75e3d48315e07f20ec37cf6260ed1e9dde58df355febd5016246268b"/>
   </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">

Deleted: trunk/Tools/gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,236 +0,0 @@
-From e938933167c494cdca443334f658b02a03c4486b Mon Sep 17 00:00:00 2001
-From: Daiki Ueno <[email protected]>
-Date: Wed, 26 Oct 2016 14:51:01 +0200
-Subject: [PATCH] dtls: port to OpenSSL 1.1.0
-
-Changes are:
-
-- Use the wrapper functions to access opaque data types.  To preserve
-  backward compatibility, define fallback definitions
-
-- Remove the use of idiom "pqueue_size(ssl->d1->sent_messages)", since
-  there is no replacement
-
-- Use RSA_generate_key_ex instead of the deprecated RSA_generate_key
-
-https://bugzilla.gnome.org/show_bug.cgi?id=773540
----
- ext/dtls/gstdtlscertificate.c | 15 ++++++++
- ext/dtls/gstdtlsconnection.c  | 87 ++++++++++++++++++++++++++++++++++++++-----
- 2 files changed, 93 insertions(+), 9 deletions(-)
-
-diff --git a/ext/dtls/gstdtlscertificate.c b/ext/dtls/gstdtlscertificate.c
-index 95fbb83..c1c9602 100644
---- a/ext/dtls/gstdtlscertificate.c
-+++ b/ext/dtls/gstdtlscertificate.c
-@@ -199,7 +199,22 @@ init_generated (GstDtlsCertificate * self)
-     priv->private_key = NULL;
-     return;
-   }
-+
-+  /* XXX: RSA_generate_key is actually deprecated in 0.9.8 */
-+#if OPENSSL_VERSION_NUMBER < 0x10100001L
-   rsa = RSA_generate_key (2048, RSA_F4, NULL, NULL);
-+#else
-+  rsa = RSA_new ();
-+  if (rsa != NULL) {
-+    BIGNUM *e = BN_new ();
-+    if (e != NULL && BN_set_word (e, RSA_F4)
-+        && RSA_generate_key_ex (rsa, 2048, e, NULL)) {
-+      RSA_free (rsa);
-+      rsa = NULL;
-+    }
-+    BN_free (e);
-+  }
-+#endif
- 
-   if (!rsa) {
-     GST_WARNING_OBJECT (self, "failed to generate RSA");
-diff --git a/ext/dtls/gstdtlsconnection.c b/ext/dtls/gstdtlsconnection.c
-index 36f6d63..728f5a7 100644
---- a/ext/dtls/gstdtlsconnection.c
-+++ b/ext/dtls/gstdtlsconnection.c
-@@ -42,6 +42,8 @@
- #include <openssl/err.h>
- #include <openssl/ssl.h>
- 
-+#include <string.h>
-+
- GST_DEBUG_CATEGORY_STATIC (gst_dtls_connection_debug);
- #define GST_CAT_DEFAULT gst_dtls_connection_debug
- G_DEFINE_TYPE_WITH_CODE (GstDtlsConnection, gst_dtls_connection, G_TYPE_OBJECT,
-@@ -216,6 +218,38 @@ gst_dtls_connection_finalize (GObject * gobject)
-   G_OBJECT_CLASS (gst_dtls_connection_parent_class)->finalize (gobject);
- }
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100001L
-+static void
-+BIO_set_data (BIO * bio, void *ptr)
-+{
-+  bio->ptr = ptr;
-+}
-+
-+static void *
-+BIO_get_data (BIO * bio)
-+{
-+  return bio->ptr;
-+}
-+
-+static void
-+BIO_set_shutdown (BIO * bio, int shutdown)
-+{
-+  bio->shutdown = shutdown;
-+}
-+
-+static void
-+BIO_set_init (BIO * bio, int init)
-+{
-+  bio->init = init;
-+}
-+
-+static X509 *
-+X509_STORE_CTX_get0_cert (X509_STORE_CTX * ctx)
-+{
-+  return ctx->cert;
-+}
-+#endif
-+
- static void
- gst_dtls_connection_set_property (GObject * object, guint prop_id,
-     const GValue * value, GParamSpec * pspec)
-@@ -239,7 +273,7 @@ gst_dtls_connection_set_property (GObject * object, guint prop_id,
-       priv->bio = BIO_new (BIO_s_gst_dtls_connection ());
-       g_return_if_fail (priv->bio);
- 
--      priv->bio->ptr = self;
-+      BIO_set_data (priv->bio, self);
-       SSL_set_bio (priv->ssl, priv->bio, priv->bio);
- 
-       SSL_set_verify (priv->ssl,
-@@ -573,6 +607,7 @@ log_state (GstDtlsConnection * self, const gchar * str)
-   states |= (! !SSL_want_write (priv->ssl) << 20);
-   states |= (! !SSL_want_read (priv->ssl) << 24);
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100001L
-   GST_LOG_OBJECT (self, "%s: role=%s buf=(%d,%p:%d/%d) %x|%x %s",
-       str,
-       priv->is_client ? "client" : "server",
-@@ -581,6 +616,15 @@ log_state (GstDtlsConnection * self, const gchar * str)
-       priv->bio_buffer_offset,
-       priv->bio_buffer_len,
-       states, SSL_get_state (priv->ssl), SSL_state_string_long (priv->ssl));
-+#else
-+  GST_LOG_OBJECT (self, "%s: role=%s buf=(%p:%d/%d) %x|%x %s",
-+      str,
-+      priv->is_client ? "client" : "server",
-+      priv->bio_buffer,
-+      priv->bio_buffer_offset,
-+      priv->bio_buffer_len,
-+      states, SSL_get_state (priv->ssl), SSL_state_string_long (priv->ssl));
-+#endif
- }
- 
- static void
-@@ -737,7 +781,7 @@ openssl_verify_callback (int preverify_ok, X509_STORE_CTX * x509_ctx)
-   self = SSL_get_ex_data (ssl, connection_ex_index);
-   g_return_val_if_fail (GST_IS_DTLS_CONNECTION (self), FALSE);
- 
--  pem = _gst_dtls_x509_to_pem (x509_ctx->cert);
-+  pem = _gst_dtls_x509_to_pem (X509_STORE_CTX_get0_cert (x509_ctx));
- 
-   if (!pem) {
-     GST_WARNING_OBJECT (self,
-@@ -749,7 +793,8 @@ openssl_verify_callback (int preverify_ok, X509_STORE_CTX * x509_ctx)
-       gint len;
- 
-       len =
--          X509_NAME_print_ex (bio, X509_get_subject_name (x509_ctx->cert), 1,
-+          X509_NAME_print_ex (bio,
-+          X509_get_subject_name (X509_STORE_CTX_get0_cert (x509_ctx)), 1,
-           XN_FLAG_MULTILINE);
-       BIO_read (bio, buffer, len);
-       buffer[len] = '\0';
-@@ -777,6 +822,7 @@ openssl_verify_callback (int preverify_ok, X509_STORE_CTX * x509_ctx)
-     ########  ####  #######
- */
- 
-+#if OPENSSL_VERSION_NUMBER < 0x10100001L
- static BIO_METHOD custom_bio_methods = {
-   BIO_TYPE_BIO,
-   "stream",
-@@ -795,11 +841,34 @@ BIO_s_gst_dtls_connection (void)
- {
-   return &custom_bio_methods;
- }
-+#else
-+static BIO_METHOD *custom_bio_methods;
-+
-+static BIO_METHOD *
-+BIO_s_gst_dtls_connection (void)
-+{
-+  if (custom_bio_methods != NULL)
-+    return custom_bio_methods;
-+
-+  custom_bio_methods = BIO_meth_new (BIO_TYPE_BIO, "stream");
-+  if (custom_bio_methods == NULL
-+      || !BIO_meth_set_write (custom_bio_methods, bio_method_write)
-+      || !BIO_meth_set_read (custom_bio_methods, bio_method_read)
-+      || !BIO_meth_set_ctrl (custom_bio_methods, bio_method_ctrl)
-+      || !BIO_meth_set_create (custom_bio_methods, bio_method_new)
-+      || !BIO_meth_set_destroy (custom_bio_methods, bio_method_free)) {
-+    BIO_meth_free (custom_bio_methods);
-+    return NULL;
-+  }
-+
-+  return custom_bio_methods;
-+}
-+#endif
- 
- static int
- bio_method_write (BIO * bio, const char *data, int size)
- {
--  GstDtlsConnection *self = GST_DTLS_CONNECTION (bio->ptr);
-+  GstDtlsConnection *self = GST_DTLS_CONNECTION (BIO_get_data (bio));
- 
-   GST_LOG_OBJECT (self, "BIO: writing %d", size);
- 
-@@ -824,7 +893,7 @@ bio_method_write (BIO * bio, const char *data, int size)
- static int
- bio_method_read (BIO * bio, char *out_buffer, int size)
- {
--  GstDtlsConnection *self = GST_DTLS_CONNECTION (bio->ptr);
-+  GstDtlsConnection *self = GST_DTLS_CONNECTION (BIO_get_data (bio));
-   GstDtlsConnectionPrivate *priv = self->priv;
-   guint internal_size;
-   gint copy_size;
-@@ -868,7 +937,7 @@ bio_method_read (BIO * bio, char *out_buffer, int size)
- static long
- bio_method_ctrl (BIO * bio, int cmd, long arg1, void *arg2)
- {
--  GstDtlsConnection *self = GST_DTLS_CONNECTION (bio->ptr);
-+  GstDtlsConnection *self = GST_DTLS_CONNECTION (BIO_get_data (bio));
-   GstDtlsConnectionPrivate *priv = self->priv;
- 
-   switch (cmd) {
-@@ -916,8 +985,8 @@ bio_method_new (BIO * bio)
- {
-   GST_LOG_OBJECT (NULL, "BIO: new");
- 
--  bio->shutdown = 0;
--  bio->init = 1;
-+  BIO_set_shutdown (bio, 0);
-+  BIO_set_init (bio, 1);
- 
-   return 1;
- }
-@@ -930,6 +999,6 @@ bio_method_free (BIO * bio)
-     return 0;
-   }
- 
--  GST_LOG_OBJECT (GST_DTLS_CONNECTION (bio->ptr), "BIO free");
-+  GST_LOG_OBJECT (GST_DTLS_CONNECTION (BIO_get_data (bio)), "BIO free");
-   return 0;
- }
--- 
-2.10.2
-

Deleted: trunk/Tools/gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,37 +0,0 @@
-From 3a069193e25364ebdacac86f4b03022c151ea29c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <[email protected]>
-Date: Mon, 14 Nov 2016 11:32:17 +0200
-Subject: [PATCH] dtlscertificate: Fix error checking in RSA_generate_key_ex()
- usage
-
-Was broken during the port for OpenSSL 1.1.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=774328
----
- ext/dtls/gstdtlscertificate.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/ext/dtls/gstdtlscertificate.c b/ext/dtls/gstdtlscertificate.c
-index c1c9602..c2d9bb2 100644
---- a/ext/dtls/gstdtlscertificate.c
-+++ b/ext/dtls/gstdtlscertificate.c
-@@ -207,12 +207,13 @@ init_generated (GstDtlsCertificate * self)
-   rsa = RSA_new ();
-   if (rsa != NULL) {
-     BIGNUM *e = BN_new ();
--    if (e != NULL && BN_set_word (e, RSA_F4)
--        && RSA_generate_key_ex (rsa, 2048, e, NULL)) {
-+    if (e == NULL || !BN_set_word (e, RSA_F4)
-+        || !RSA_generate_key_ex (rsa, 2048, e, NULL)) {
-       RSA_free (rsa);
-       rsa = NULL;
-     }
--    BN_free (e);
-+    if (e)
-+      BN_free (e);
-   }
- #endif
- 
--- 
-2.10.2
-

Deleted: trunk/Tools/gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-good-0001-rtpbin-pipeline-gets-an-EOS-when-any-rtpsources-byes.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,156 +0,0 @@
-From eeea2a7fe88a17b15318d5b6ae6e190b2f777030 Mon Sep 17 00:00:00 2001
-From: "Alejandro G. Castro" <[email protected]>
-Date: Wed, 26 Oct 2016 13:21:29 +0200
-Subject: [PATCH] rtpbin: pipeline gets an EOS when any rtpsources byes
-
-Instead of sending EOS when a source byes we have to wait for
-all the sources to be gone, which means they already sent BYE and
-were removed from the session. We now handle the EOS in the rtcp
-loop checking the amount of sources in the session.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=773218
----
- gst/rtpmanager/gstrtpsession.c | 29 +++++++++++++++++++----------
- gst/rtpmanager/rtpsession.c    |  6 +-----
- gst/rtpmanager/rtpsession.h    |  3 +--
- 3 files changed, 21 insertions(+), 17 deletions(-)
-
-diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
-index 3688e85..fd1f2b1 100644
---- a/gst/rtpmanager/gstrtpsession.c
-+++ b/gst/rtpmanager/gstrtpsession.c
-@@ -293,7 +293,7 @@ static GstFlowReturn gst_rtp_session_process_rtp (RTPSession * sess,
- static GstFlowReturn gst_rtp_session_send_rtp (RTPSession * sess,
-     RTPSource * src, gpointer data, gpointer user_data);
- static GstFlowReturn gst_rtp_session_send_rtcp (RTPSession * sess,
--    RTPSource * src, GstBuffer * buffer, gboolean eos, gpointer user_data);
-+    RTPSource * src, GstBuffer * buffer, gpointer user_data);
- static GstFlowReturn gst_rtp_session_sync_rtcp (RTPSession * sess,
-     GstBuffer * buffer, gpointer user_data);
- static gint gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload,
-@@ -1156,6 +1156,22 @@ rtcp_thread (GstRtpSession * rtpsession)
-     GST_RTP_SESSION_UNLOCK (rtpsession);
-     rtp_session_on_timeout (session, current_time, ntpnstime, running_time);
-     GST_RTP_SESSION_LOCK (rtpsession);
-+
-+    if (!rtp_session_get_num_sources (session)) {
-+      /* when no sources left in the session, all of the them have went
-+       * BYE at some point and removed, we can send EOS to the
-+       * pipeline. */
-+      GstPad *rtcp_src = rtpsession->send_rtcp_src;
-+
-+      if (rtcp_src) {
-+        gst_object_ref (rtcp_src);
-+        GST_LOG_OBJECT (rtpsession, "sending EOS");
-+        GST_RTP_SESSION_UNLOCK (rtpsession);
-+        gst_pad_push_event (rtpsession->send_rtcp_src, gst_event_new_eos ());
-+        GST_RTP_SESSION_LOCK (rtpsession);
-+        gst_object_unref (rtcp_src);
-+      }
-+    }
-   }
-   /* mark the thread as stopped now */
-   rtpsession->priv->thread_stopped = TRUE;
-@@ -1413,11 +1429,10 @@ do_rtcp_events (GstRtpSession * rtpsession, GstPad * srcpad)
- }
- 
- /* called when the session manager has an RTCP packet ready for further
-- * sending. The eos flag is set when an EOS event should be sent downstream as
-- * well. */
-+ * sending. */
- static GstFlowReturn
- gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
--    GstBuffer * buffer, gboolean eos, gpointer user_data)
-+    GstBuffer * buffer, gpointer user_data)
- {
-   GstFlowReturn result;
-   GstRtpSession *rtpsession;
-@@ -1440,11 +1455,6 @@ gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
-     GST_LOG_OBJECT (rtpsession, "sending RTCP");
-     result = gst_pad_push (rtcp_src, buffer);
- 
--    /* we have to send EOS after this packet */
--    if (eos) {
--      GST_LOG_OBJECT (rtpsession, "sending EOS");
--      gst_pad_push_event (rtcp_src, gst_event_new_eos ());
--    }
-     gst_object_unref (rtcp_src);
-   } else {
-     GST_RTP_SESSION_UNLOCK (rtpsession);
-@@ -2056,7 +2066,6 @@ gst_rtp_session_event_send_rtcp_src (GstPad * pad, GstObject * parent,
-   return ret;
- }
- 
--
- static gboolean
- gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstObject * parent,
-     GstEvent * event)
-diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
-index 8b33b6b..aa8b40b 100644
---- a/gst/rtpmanager/rtpsession.c
-+++ b/gst/rtpmanager/rtpsession.c
-@@ -3263,7 +3263,6 @@ early_exit:
- typedef struct
- {
-   RTPSource *source;
--  gboolean is_bye;
-   GstBuffer *buffer;
- } ReportOutput;
- 
-@@ -3874,7 +3873,6 @@ static void
- generate_rtcp (const gchar * key, RTPSource * source, ReportData * data)
- {
-   RTPSession *sess = data->sess;
--  gboolean is_bye = FALSE;
-   ReportOutput *output;
- 
-   /* only generate RTCP for active internal sources */
-@@ -3893,7 +3891,6 @@ generate_rtcp (const gchar * key, RTPSource * source, ReportData * data)
-   if (source->marked_bye) {
-     /* send BYE */
-     make_source_bye (sess, source, data);
--    is_bye = TRUE;
-   } else if (!data->is_early) {
-     /* loop over all known sources and add report blocks. If we are early, we
-      * just make a minimal RTCP packet and skip this step */
-@@ -3918,7 +3915,6 @@ generate_rtcp (const gchar * key, RTPSource * source, ReportData * data)
- 
-   output = g_slice_new (ReportOutput);
-   output->source = g_object_ref (source);
--  output->is_bye = is_bye;
-   output->buffer = data->rtcp;
-   /* queue the RTCP packet to push later */
-   g_queue_push_tail (&data->output, output);
-@@ -4098,7 +4094,7 @@ done:
-       GST_DEBUG ("%p, sending RTCP packet, avg size %u, %u", &sess->stats,
-           sess->stats.avg_rtcp_packet_size, packet_size);
-       result =
--          sess->callbacks.send_rtcp (sess, source, buffer, output->is_bye,
-+          sess->callbacks.send_rtcp (sess, source, buffer,
-           sess->send_rtcp_user_data);
- 
-       RTP_SESSION_LOCK (sess);
-diff --git a/gst/rtpmanager/rtpsession.h b/gst/rtpmanager/rtpsession.h
-index 9fa9327..c25981a 100644
---- a/gst/rtpmanager/rtpsession.h
-+++ b/gst/rtpmanager/rtpsession.h
-@@ -71,7 +71,6 @@ typedef GstFlowReturn (*RTPSessionSendRTP) (RTPSession *sess, RTPSource *src, gp
-  * @sess: an #RTPSession
-  * @src: the #RTPSource
-  * @buffer: the RTCP buffer ready for sending
-- * @eos: if an EOS event should be pushed
-  * @user_data: user data specified when registering
-  *
-  * This callback will be called when @sess has @buffer ready for sending to
-@@ -80,7 +79,7 @@ typedef GstFlowReturn (*RTPSessionSendRTP) (RTPSession *sess, RTPSource *src, gp
-  * Returns: a #GstFlowReturn.
-  */
- typedef GstFlowReturn (*RTPSessionSendRTCP) (RTPSession *sess, RTPSource *src, GstBuffer *buffer,
--    gboolean eos, gpointer user_data);
-+    gpointer user_data);
- 
- /**
-  * RTPSessionSyncRTCP:
--- 
-2.10.2
-

Deleted: trunk/Tools/gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-good-0002-rtpbin-avoid-generating-errors-when-rtcp-messages-ar.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,61 +0,0 @@
-From dab6c473c3e1b2b400ee18afc70140c2f842debf Mon Sep 17 00:00:00 2001
-From: "Alejandro G. Castro" <[email protected]>
-Date: Thu, 20 Oct 2016 13:14:13 +0200
-Subject: [PATCH] rtpbin: avoid generating errors when rtcp messages are empty
- and check the queue is not empty
-
-Add a check to verify all the output buffers were empty for the
-session in a timout and log an error.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=773269
----
- gst/rtpmanager/rtpsession.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c
-index 75908c0..f1d9210 100644
---- a/gst/rtpmanager/rtpsession.c
-+++ b/gst/rtpmanager/rtpsession.c
-@@ -3923,6 +3923,7 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time,
-   ReportData data = { GST_RTCP_BUFFER_INIT };
-   GHashTable *table_copy;
-   ReportOutput *output;
-+  gboolean all_empty = FALSE;
- 
-   g_return_val_if_fail (RTP_IS_SESSION (sess), GST_FLOW_ERROR);
- 
-@@ -3989,6 +3990,9 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time,
-   if (!is_rtcp_time (sess, current_time, &data))
-     goto done;
- 
-+  /* check if all the buffers are empty afer generation */
-+  all_empty = TRUE;
-+
-   GST_DEBUG
-       ("doing RTCP generation %u for %u sources, early %d, may suppress %d",
-       sess->generation, data.num_to_report, data.is_early, data.may_suppress);
-@@ -4036,8 +4040,8 @@ done:
- 
-     empty_buffer = gst_buffer_get_size (buffer) == 0;
- 
--    if (empty_buffer)
--      g_warning ("rtpsession: Trying to send an empty RTCP packet");
-+    if (!empty_buffer)
-+      all_empty = FALSE;
- 
-     if (sess->callbacks.send_rtcp &&
-         !empty_buffer && (do_not_suppress || !data.may_suppress)) {
-@@ -4068,6 +4072,10 @@ done:
-     g_object_unref (source);
-     g_slice_free (ReportOutput, output);
-   }
-+
-+  if (all_empty)
-+    GST_ERROR ("generated empty RTCP messages for all the sources");
-+
-   return result;
- }
- 
--- 
-2.10.2
-

Modified: trunk/Tools/gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-good-0004-qtdemux-add-context-for-a-preferred-protection.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,4 +1,4 @@
-From ae4f7d4f09a051c2fbbd05e4df9f79fa6522104f Mon Sep 17 00:00:00 2001
+From 248573a84e8f715e5abdc0a2a5ce2faf3e7852fd Mon Sep 17 00:00:00 2001
 From: Xabier Rodriguez Calvar <[email protected]>
 Date: Fri, 16 Sep 2016 16:08:18 +0200
 Subject: [PATCH] qtdemux: add context for a preferred protection
@@ -13,14 +13,14 @@
 accessible.
 ---
  gst/isomp4/qtdemux.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++++--
- gst/isomp4/qtdemux.h |   2 +-
- 2 files changed, 204 insertions(+), 7 deletions(-)
+ gst/isomp4/qtdemux.h |   2 +
+ 2 files changed, 205 insertions(+), 6 deletions(-)
 
 diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 0425e66..e05e75e 100644
+index 4cbcaedb2..2d4279646 100644
 --- a/gst/isomp4/qtdemux.c
 +++ b/gst/isomp4/qtdemux.c
-@@ -480,6 +480,8 @@ static GstIndex *gst_qtdemux_get_index (GstElement * element);
+@@ -490,6 +490,8 @@ static GstIndex *gst_qtdemux_get_index (GstElement * element);
  #endif
  static GstStateChangeReturn gst_qtdemux_change_state (GstElement * element,
      GstStateChange transition);
@@ -29,7 +29,7 @@
  static gboolean qtdemux_sink_activate (GstPad * sinkpad, GstObject * parent);
  static gboolean qtdemux_sink_activate_mode (GstPad * sinkpad,
      GstObject * parent, GstPadMode mode, gboolean active);
-@@ -554,6 +556,7 @@ gst_qtdemux_class_init (GstQTDemuxClass * klass)
+@@ -576,6 +578,7 @@ gst_qtdemux_class_init (GstQTDemuxClass * klass)
    gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_qtdemux_set_index);
    gstelement_class->get_index = GST_DEBUG_FUNCPTR (gst_qtdemux_get_index);
  #endif
@@ -37,7 +37,7 @@
  
    gst_tag_register_musicbrainz_tags ();
  
-@@ -612,6 +615,7 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
+@@ -634,6 +637,7 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
    qtdemux->cenc_aux_info_sizes = NULL;
    qtdemux->cenc_aux_sample_count = 0;
    qtdemux->protection_system_ids = NULL;
@@ -45,7 +45,7 @@
    g_queue_init (&qtdemux->protection_event_queue);
    gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
    qtdemux->flowcombiner = gst_flow_combiner_new ();
-@@ -1972,6 +1976,10 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
+@@ -1997,6 +2001,10 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
      g_queue_foreach (&qtdemux->protection_event_queue, (GFunc) gst_event_unref,
          NULL);
      g_queue_clear (&qtdemux->protection_event_queue);
@@ -56,7 +56,7 @@
    }
    qtdemux->offset = 0;
    gst_adapter_clear (qtdemux->adapter);
-@@ -2404,6 +2412,29 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
+@@ -2485,6 +2493,29 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
  }
  
  static void
@@ -86,7 +86,7 @@
  qtdemux_parse_ftyp (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
  {
    /* counts as header data */
-@@ -3392,6 +3423,8 @@ qtdemux_parse_pssh (GstQTDemux * qtdemux, GNode * node)
+@@ -3673,6 +3704,8 @@ qtdemux_parse_pssh (GstQTDemux * qtdemux, GNode * node)
    event = gst_event_new_protection (sysid_string, pssh,
        (parent_box_type == FOURCC_moov) ? "isobmff/moov" : "isobmff/moof");
    for (i = 0; i < qtdemux->n_streams; ++i) {
@@ -95,7 +95,7 @@
      g_queue_push_tail (&qtdemux->streams[i]->protection_scheme_event_queue,
          gst_event_ref (event));
    }
-@@ -4993,6 +5026,12 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
+@@ -5380,6 +5413,12 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
      GstEvent *event;
  
      while ((event = g_queue_pop_head (&stream->protection_scheme_event_queue))) {
@@ -108,7 +108,7 @@
        gst_pad_push_event (stream->pad, event);
      }
  
-@@ -6947,11 +6986,148 @@ qtdemux_do_allocation (GstQTDemux * qtdemux, QtDemuxStream * stream)
+@@ -7475,11 +7514,148 @@ qtdemux_do_allocation (GstQTDemux * qtdemux, QtDemuxStream * stream)
  }
  
  static gboolean
@@ -258,7 +258,7 @@
  
    g_return_val_if_fail (qtdemux != NULL, FALSE);
    g_return_val_if_fail (stream != NULL, FALSE);
-@@ -6966,17 +7142,38 @@ gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux,
+@@ -7494,17 +7670,38 @@ gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux,
          "cenc protection system information has been found");
      return FALSE;
    }
@@ -303,18 +303,18 @@
    if (!gst_structure_has_name (s, "application/x-cenc")) {
      gst_structure_set (s,
 diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h
-index 53bd071..55c4f63 100644
+index 771ddcc5b..2c37c2c3e 100644
 --- a/gst/isomp4/qtdemux.h
 +++ b/gst/isomp4/qtdemux.h
-@@ -153,7 +153,7 @@ struct _GstQTDemux {
-   guint64 cenc_aux_info_offset;
+@@ -155,6 +155,8 @@ struct _GstQTDemux {
    guint8 *cenc_aux_info_sizes;
    guint32 cenc_aux_sample_count;
--
+ 
 +  gchar *preferred_protection_system_id;
- };
++
  
- struct _GstQTDemuxClass {
+   /*
+    * ALL VARIABLES BELOW ARE ONLY USED IN PUSH-BASED MODE 
 -- 
 2.11.0
 

Deleted: trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,133 +0,0 @@
-From 1a81bd90d4a3e59d6669a0bbfa456f1ed4e5db48 Mon Sep 17 00:00:00 2001
-From: Xabier Rodriguez Calvar <[email protected]>
-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
-

Deleted: trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch (216178 => 216179)


--- trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch	2017-05-04 11:40:46 UTC (rev 216178)
+++ trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch	2017-05-04 11:57:08 UTC (rev 216179)
@@ -1,89 +0,0 @@
-From 1556043c00eb60d3871b4baa8b029175c16c7097 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <[email protected]>
-Date: Mon, 24 Oct 2016 16:56:31 +0000
-Subject: [PATCH] Use the tfdt decode time on byte streams when it's
- significantly different than the time in the last sample
-
-We consider there's a sifnificant difference when it's larger than on second
-or than half the duration of the last processed fragment in case the latter is
-larger.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=754230
----
- gst/isomp4/qtdemux.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index db2d361..5430a39 100644
---- a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -95,6 +95,8 @@
- 
- #define STREAM_IS_EOS(s) (s->time_position == GST_CLOCK_TIME_NONE)
- 
-+#define ABSDIFF(x, y) ( (x) > (y) ? ((x) - (y)) : ((y) - (x)) )
-+
- GST_DEBUG_CATEGORY (qtdemux_debug);
- 
- /*typedef struct _QtNode QtNode; */
-@@ -256,6 +258,7 @@ struct _QtDemuxStream
-   guint32 n_samples_moof;       /* sample count in a moof */
-   guint64 duration_moof;        /* duration in timescale of a moof, used for figure out
-                                  * the framerate of fragmented format stream */
-+  guint64 duration_last_moof;
-   guint32 offset_in_sample;
-   guint32 max_buffer_size;
- 
-@@ -1828,6 +1831,7 @@ _create_stream (void)
-   stream->protection_scheme_info = NULL;
-   stream->n_samples_moof = 0;
-   stream->duration_moof = 0;
-+  stream->duration_last_moof = 0;
-   g_queue_init (&stream->protection_scheme_event_queue);
-   return stream;
- }
-@@ -2315,6 +2319,7 @@ gst_qtdemux_stream_flush_samples_data (GstQTDemux * qtdemux,
- 
-   stream->n_samples_moof = 0;
-   stream->duration_moof = 0;
-+  stream->duration_last_moof = 0;
- }
- 
- static void
-@@ -2883,6 +2888,25 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
-           stream->samples[stream->n_samples - 1].timestamp +
-           stream->samples[stream->n_samples - 1].duration;
- 
-+      /* If this is a GST_FORMAT_BYTES stream and there's a significant
-+       * difference (1 sec.) between decode_ts and timestamp, prefer the
-+       * former */
-+      if (!qtdemux->upstream_format_is_time
-+          && ABSDIFF (decode_ts, timestamp) >
-+          MAX (stream->duration_last_moof / 2,
-+              GSTTIME_TO_QTSTREAMTIME (stream, GST_SECOND))) {
-+        GST_INFO_OBJECT (qtdemux,
-+            "decode_ts (%" GST_TIME_FORMAT ") and timestamp (%" GST_TIME_FORMAT
-+            ") are significantly different (more than %" GST_TIME_FORMAT
-+            "), using decode_ts",
-+            GST_TIME_ARGS (QTSTREAMTIME_TO_GSTTIME (stream, decode_ts)),
-+            GST_TIME_ARGS (QTSTREAMTIME_TO_GSTTIME (stream, timestamp)),
-+            GST_TIME_ARGS (QTSTREAMTIME_TO_GSTTIME (stream,
-+                    MAX (stream->duration_last_moof / 2,
-+                        GSTTIME_TO_QTSTREAMTIME (stream, GST_SECOND)))));
-+        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));
-@@ -3544,6 +3568,7 @@ qtdemux_parse_moof (GstQTDemux * qtdemux, const guint8 * buffer, guint length,
- 
-     /* initialise moof sample data */
-     stream->n_samples_moof = 0;
-+    stream->duration_last_moof = stream->duration_moof;
-     stream->duration_moof = 0;
- 
-     /* Track Run node */
--- 
-2.1.4
-
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to