Title: [225780] trunk/Tools
Revision
225780
Author
clo...@igalia.com
Date
2017-12-12 06:58:05 -0800 (Tue, 12 Dec 2017)

Log Message

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

Reviewed by Carlos Garcia Campos.

Bump gstreamer related modules and rebase patches still needed and not merged

* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch: Removed. This was needed for OpenWebRTC. Not longer supported.
* gstreamer/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch: Rebased.
* gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch: Rebased.
* gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch: Rebased.
* gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch: Added a note about merge commit not still in 1.12.4.

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (225779 => 225780)


--- trunk/Tools/ChangeLog	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/ChangeLog	2017-12-12 14:58:05 UTC (rev 225780)
@@ -1,3 +1,19 @@
+2017-12-12  Carlos Alberto Lopez Perez  <clo...@igalia.com>
+
+        [GTK][WPE] Bump GStreamer version to 1.12 in jhbuild
+        https://bugs.webkit.org/show_bug.cgi?id=171677
+
+        Reviewed by Carlos Garcia Campos.
+
+        Bump gstreamer related modules and rebase patches still needed and not merged
+
+        * gstreamer/jhbuild.modules:
+        * gstreamer/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch: Removed. This was needed for OpenWebRTC. Not longer supported.
+        * gstreamer/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch: Rebased.
+        * gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch: Rebased.
+        * gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch: Rebased.
+        * gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch: Added a note about merge commit not still in 1.12.4.
+
 2017-12-12  Yusuke Suzuki  <utatane....@gmail.com>
 
         [WTF] Thread::create should have Thread::tryCreate

Modified: trunk/Tools/gstreamer/jhbuild.modules (225779 => 225780)


--- trunk/Tools/gstreamer/jhbuild.modules	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/gstreamer/jhbuild.modules	2017-12-12 14:58:05 UTC (rev 225780)
@@ -22,10 +22,9 @@
       href=""
 
   <autotools id="orc" autogenargs="--disable-gtk-doc" autogen-sh="configure">
-    <branch module="orc/orc-0.4.17.tar.gz" version="0.4.17"
+    <branch module="orc/orc-${version}.tar.xz" version="0.4.28"
             repo="gstreamer"
-            hash="sha256:4fc7cca48c59fff23afee78fb642cdbde001f56401c8f47b95a16578d1d5d7e8"
-            md5sum="af1bf3dab9e69f3c36f389285e2a12a1"/>
+            hash="sha256:bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"/>
   </autotools>
 
   <autotools id="openh264" supports-non-srcdir-builds="no" autogen-sh="pseudo-configure">
@@ -47,9 +46,9 @@
     <dependencies>
       <dep package="orc"/>
     </dependencies>
-    <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.10.5"
+    <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.12.4"
             repo="gstreamer"
-            hash="sha256:bc06243600817f637029da29d089d5908d1d266542f68bf6626a10c5f05f1f1d">
+            hash="sha256:5a8704aa4c2eeb04da192c4a9942f94f860ac1a585de90d9f914bac26a970674">
       <patch file="gstreamer-0001-protection-added-function-to-filter-system-ids.patch" strip="1"/>
     </branch>
   </autotools>
@@ -63,9 +62,9 @@
     <dependencies>
       <dep package="gstreamer"/>
     </dependencies>
-    <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.10.5"
+    <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.12.4"
             repo="gstreamer"
-            hash="sha256:1c401a79bd1e4521c6ef1b66579bddedd9136e164e54792aab4bfcf3485bf9a7"/>
+            hash="sha256:4c306b03df0212f1b8903784e29bb3493319ba19ebebf13b0c56a17870292282"/>
   </autotools>
 
   <autotools id="gst-plugins-good" autogen-sh="configure" autogenargs="--disable-examples --disable-gtk-doc --disable-introspection">
@@ -74,10 +73,9 @@
       <dep package="libvpx"/>
     </dependencies>
 
-    <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.10.5"
+    <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.12.4"
             repo="gstreamer"
-            hash="sha256:be053f6ed716eeb517cec148cec637cdce571c6e04d5c21409e2876fb76c7639">
-      <patch file="gst-plugins-good-0003-rtpbin-receive-bundle-support.patch" strip="1"/>
+            hash="sha256:649f49bec60892d47ee6731b92266974c723554da1c6649f21296097715eb957">
       <patch file="gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch" strip="1"/>
       <patch file="gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch" strip="1"/>
       <patch file="gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch" strip="1"/>
@@ -91,9 +89,9 @@
       <dep package="gst-plugins-base"/>
       <dep package="openh264"/>
     </dependencies>
-    <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.10.5"
+    <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.12.4"
             repo="gstreamer"
-            hash="sha256:c5806040bb83b43be86ce592e6a19c5d83d7776f7d9f434eb4b911c4efff3573"/>
+            hash="sha256:0c7857be16686d5c1ba6e34bd338664d3d4599d32714a8eca5c8a41a101e2d08"/>
   </autotools>
 
   <autotools id="gst-libav" autogen-sh="configure" autogenargs="--with-libav-extra-configure='--disable-yasm' --disable-gtk-doc">
@@ -100,9 +98,9 @@
     <dependencies>
       <dep package="gst-plugins-base"/>
     </dependencies>
-    <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.10.5"
+    <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.12.4"
             repo="gstreamer"
-            hash="sha256:e4d2f315f478d47281fbfdfbd590a63d23704ca37911d7142d5992616f4b28d3"/>
+            hash="sha256:2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62"/>
   </autotools>
 
 </moduleset>

Deleted: trunk/Tools/gstreamer/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch (225779 => 225780)


--- trunk/Tools/gstreamer/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/gstreamer/patches/gst-plugins-good-0003-rtpbin-receive-bundle-support.patch	2017-12-12 14:58:05 UTC (rev 225780)
@@ -1,1018 +0,0 @@
-From dcd3ce9751cdef0b5ab1fa118355f92bdfe82cb3 Mon Sep 17 00:00:00 2001
-From: Philippe Normand <ph...@igalia.com>
-Date: Wed, 16 Nov 2016 08:56:34 +0100
-Subject: [PATCH] rtpbin: receive bundle support
-
-A new signal named on-bundled-ssrc is provided and can be
-used by the application to redirect a stream to a different
-GstRtpSession or to keep the RTX stream grouped within the
-GstRtpSession of the same media type.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=772740
----
- docs/plugins/gst-plugins-good-plugins.signals |   8 +
- gst/rtpmanager/gstrtpbin.c                    | 562 ++++++++++++++++++--------
- gst/rtpmanager/gstrtpbin.h                    |   2 +
- tests/check/Makefile.am                       |   4 +
- tests/check/elements/.gitignore               |   1 +
- tests/check/elements/rtpbundle.c              | 390 ++++++++++++++++++
- tests/check/meson.build                       |   1 +
- tests/examples/rtp/.gitignore                 |   2 +
- tests/examples/rtp/Makefile.am                |  10 +-
- tests/examples/rtp/client-rtpbundle.c         | 266 ++++++++++++
- tests/examples/rtp/server-rtpbundle.c         | 179 ++++++++
- 11 files changed, 1265 insertions(+), 160 deletions(-)
- create mode 100644 tests/check/elements/rtpbundle.c
- create mode 100644 tests/examples/rtp/client-rtpbundle.c
- create mode 100644 tests/examples/rtp/server-rtpbundle.c
-
-diff --git a/docs/plugins/gst-plugins-good-plugins.signals b/docs/plugins/gst-plugins-good-plugins.signals
-index 3db17e9..44bbdda 100644
---- a/docs/plugins/gst-plugins-good-plugins.signals
-+++ b/docs/plugins/gst-plugins-good-plugins.signals
-@@ -375,6 +375,14 @@ guint  arg1
- </SIGNAL>
- 
- <SIGNAL>
-+<NAME>GstRtpBin::on-bundled-ssrc</NAME>
-+<RETURNS>guint</RETURNS>
-+<FLAGS>l</FLAGS>
-+GstRtpBin *gstrtpbin
-+guint  arg1
-+</SIGNAL>
-+
-+<SIGNAL>
- <NAME>GstRtpJitterBuffer::clear-pt-map</NAME>
- <RETURNS>void</RETURNS>
- <FLAGS>la</FLAGS>
-diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
-index 648adb9..f58de01 100644
---- a/gst/rtpmanager/gstrtpbin.c
-+++ b/gst/rtpmanager/gstrtpbin.c
-@@ -53,6 +53,13 @@
-  * SSRC in the RTP packets to its own SSRC and wil forward the packets on the
-  * send_rtp_src_\%u pad after updating its internal state.
-  *
-+ * #GstRtpBin can also demultiplex incoming bundled streams. The first
-+ * #GstRtpSession will have a #GstRtpSsrcDemux element splitting the streams
-+ * based on their SSRC and potentially dispatched to a different #GstRtpSession.
-+ * Because retransmission SSRCs need to be merged with the corresponding media
-+ * stream the #GstRtpBin::on-bundled-ssrc signal is emitted so that the
-+ * application can find out to which session the SSRC belongs.
-+ *
-  * The session manager needs the clock-rate of the payload types it is handling
-  * and will signal the #GstRtpSession::request-pt-map signal when it needs such a
-  * mapping. One can clear the cached values with the #GstRtpSession::clear-pt-map
-@@ -276,6 +283,8 @@ enum
-   SIGNAL_ON_NEW_SENDER_SSRC,
-   SIGNAL_ON_SENDER_SSRC_ACTIVE,
- 
-+  SIGNAL_ON_BUNDLED_SSRC,
-+
-   LAST_SIGNAL
- };
- 
-@@ -362,6 +371,14 @@ static void remove_send_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session);
- static void remove_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session);
- static void free_client (GstRtpBinClient * client, GstRtpBin * bin);
- static void free_stream (GstRtpBinStream * stream, GstRtpBin * bin);
-+static GstRtpBinSession *create_session (GstRtpBin * rtpbin, gint id);
-+static GstPad *complete_session_sink (GstRtpBin * rtpbin,
-+    GstRtpBinSession * session, gboolean bundle_demuxer_needed);
-+static void
-+complete_session_receiver (GstRtpBin * rtpbin, GstRtpBinSession * session,
-+    guint sessid);
-+static GstPad *complete_session_rtcp (GstRtpBin * rtpbin,
-+    GstRtpBinSession * session, guint sessid, gboolean bundle_demuxer_needed);
- 
- /* Manages the RTP stream for one SSRC.
-  *
-@@ -428,6 +445,12 @@ struct _GstRtpBinSession
-   gulong demux_newpad_sig;
-   gulong demux_padremoved_sig;
- 
-+  /* Bundling support */
-+  GstElement *rtp_funnel;
-+  GstElement *rtcp_funnel;
-+  GstElement *bundle_demux;
-+  gulong bundle_demux_newpad_sig;
-+
-   GMutex lock;
- 
-   /* list of GstRtpBinStream */
-@@ -629,6 +652,96 @@ ssrc_demux_pad_removed (GstElement * element, guint ssrc, GstPad * pad,
-   GST_RTP_BIN_UNLOCK (rtpbin);
- }
- 
-+static void
-+new_bundled_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad,
-+    GstRtpBinSession * session)
-+{
-+  GValue result = G_VALUE_INIT;
-+  GValue params[2] = { G_VALUE_INIT, G_VALUE_INIT };
-+  guint session_id = 0;
-+  GstRtpBinSession *target_session = NULL;
-+  GstRtpBin *rtpbin = session->bin;
-+  gchar *name;
-+  GstPad *src_pad;
-+  GstPad *recv_rtp_sink = NULL;
-+  GstPad *recv_rtcp_sink = NULL;
-+  GstPadLinkReturn ret;
-+
-+  GST_RTP_BIN_DYN_LOCK (rtpbin);
-+  GST_DEBUG_OBJECT (rtpbin, "new bundled SSRC pad %08x, %s:%s", ssrc,
-+      GST_DEBUG_PAD_NAME (pad));
-+
-+  g_value_init (&result, G_TYPE_UINT);
-+  g_value_init (&params[0], GST_TYPE_ELEMENT);
-+  g_value_set_object (&params[0], rtpbin);
-+  g_value_init (&params[1], G_TYPE_UINT);
-+  g_value_set_uint (&params[1], ssrc);
-+
-+  g_signal_emitv (params,
-+      gst_rtp_bin_signals[SIGNAL_ON_BUNDLED_SSRC], 0, &result);
-+  g_value_unset (&params[0]);
-+
-+  session_id = g_value_get_uint (&result);
-+  if (session_id == 0) {
-+    target_session = session;
-+  } else {
-+    target_session = find_session_by_id (rtpbin, (gint) session_id);
-+    if (!target_session) {
-+      target_session = create_session (rtpbin, session_id);
-+    }
-+    if (!target_session->recv_rtp_sink) {
-+      recv_rtp_sink = complete_session_sink (rtpbin, target_session, FALSE);
-+    }
-+
-+    if (!target_session->recv_rtp_src)
-+      complete_session_receiver (rtpbin, target_session, session_id);
-+
-+    if (!target_session->recv_rtcp_sink) {
-+      recv_rtcp_sink =
-+          complete_session_rtcp (rtpbin, target_session, session_id, FALSE);
-+    }
-+  }
-+
-+  GST_DEBUG_OBJECT (rtpbin, "Assigning bundled ssrc %u to session %u", ssrc,
-+      session_id);
-+
-+  if (!recv_rtp_sink) {
-+    recv_rtp_sink =
-+        gst_element_get_request_pad (target_session->rtp_funnel, "sink_%u");
-+  }
-+
-+  if (!recv_rtcp_sink) {
-+    recv_rtcp_sink =
-+        gst_element_get_request_pad (target_session->rtcp_funnel, "sink_%u");
-+  }
-+
-+  name = g_strdup_printf ("src_%u", ssrc);
-+  src_pad = gst_element_get_static_pad (element, name);
-+  ret = gst_pad_link (src_pad, recv_rtp_sink);
-+  g_free (name);
-+  gst_object_unref (src_pad);
-+  gst_object_unref (recv_rtp_sink);
-+  if (ret != GST_PAD_LINK_OK) {
-+    g_warning
-+        ("rtpbin: failed to link bundle demuxer to receive rtp funnel for session %u",
-+        session_id);
-+  }
-+
-+  name = g_strdup_printf ("rtcp_src_%u", ssrc);
-+  src_pad = gst_element_get_static_pad (element, name);
-+  gst_pad_link (src_pad, recv_rtcp_sink);
-+  g_free (name);
-+  gst_object_unref (src_pad);
-+  gst_object_unref (recv_rtcp_sink);
-+  if (ret != GST_PAD_LINK_OK) {
-+    g_warning
-+        ("rtpbin: failed to link bundle demuxer to receive rtcp sink pad for session %u",
-+        session_id);
-+  }
-+
-+  GST_RTP_BIN_DYN_UNLOCK (rtpbin);
-+}
-+
- /* create a session with the given id.  Must be called with RTP_BIN_LOCK */
- static GstRtpBinSession *
- create_session (GstRtpBin * rtpbin, gint id)
-@@ -649,6 +762,10 @@ create_session (GstRtpBin * rtpbin, gint id)
-   sess->bin = rtpbin;
-   sess->session = session;
-   sess->demux = demux;
-+
-+  sess->rtp_funnel = gst_element_factory_make ("funnel", NULL);
-+  sess->rtcp_funnel = gst_element_factory_make ("funnel", NULL);
-+
-   sess->ptmap = g_hash_table_new_full (NULL, NULL, NULL,
-       (GDestroyNotify) gst_caps_unref);
-   rtpbin->sessions = g_slist_prepend (rtpbin->sessions, sess);
-@@ -696,6 +813,8 @@ create_session (GstRtpBin * rtpbin, gint id)
- 
-   gst_bin_add (GST_BIN_CAST (rtpbin), session);
-   gst_bin_add (GST_BIN_CAST (rtpbin), demux);
-+  gst_bin_add (GST_BIN_CAST (rtpbin), sess->rtp_funnel);
-+  gst_bin_add (GST_BIN_CAST (rtpbin), sess->rtcp_funnel);
- 
-   GST_OBJECT_LOCK (rtpbin);
-   target = GST_STATE_TARGET (rtpbin);
-@@ -704,6 +823,8 @@ create_session (GstRtpBin * rtpbin, gint id)
-   /* change state only to what's needed */
-   gst_element_set_state (demux, target);
-   gst_element_set_state (session, target);
-+  gst_element_set_state (sess->rtp_funnel, target);
-+  gst_element_set_state (sess->rtcp_funnel, target);
- 
-   return sess;
- 
-@@ -807,7 +928,7 @@ get_pt_map (GstRtpBinSession * session, guint pt)
-   GValue ret = { 0 };
-   GValue args[3] = { {0}, {0}, {0} };
- 
--  GST_DEBUG ("searching pt %d in cache", pt);
-+  GST_DEBUG ("searching pt %u in cache", pt);
- 
-   GST_RTP_SESSION_LOCK (session);
- 
-@@ -820,7 +941,7 @@ get_pt_map (GstRtpBinSession * session, guint pt)
- 
-   bin = session->bin;
- 
--  GST_DEBUG ("emiting signal for pt %d in session %d", pt, session->id);
-+  GST_DEBUG ("emiting signal for pt %u in session %u", pt, session->id);
- 
-   /* not in cache, send signal to request caps */
-   g_value_init (&args[0], GST_TYPE_ELEMENT);
-@@ -856,7 +977,7 @@ get_pt_map (GstRtpBinSession * session, guint pt)
-   if (!caps)
-     goto no_caps;
- 
--  GST_DEBUG ("caching pt %d as %" GST_PTR_FORMAT, pt, caps);
-+  GST_DEBUG ("caching pt %u as %" GST_PTR_FORMAT, pt, caps);
- 
-   /* store in cache, take additional ref */
-   g_hash_table_insert (session->ptmap, GINT_TO_POINTER (pt),
-@@ -947,7 +1068,7 @@ gst_rtp_bin_get_session (GstRtpBin * bin, guint session_id)
-   GstElement *ret = NULL;
- 
-   GST_RTP_BIN_LOCK (bin);
--  GST_DEBUG_OBJECT (bin, "retrieving GstRtpSession, index: %d", session_id);
-+  GST_DEBUG_OBJECT (bin, "retrieving GstRtpSession, index: %u", session_id);
-   session = find_session_by_id (bin, (gint) session_id);
-   if (session) {
-     ret = gst_object_ref (session->session);
-@@ -964,7 +1085,7 @@ gst_rtp_bin_get_internal_session (GstRtpBin * bin, guint session_id)
-   GstRtpBinSession *session;
- 
-   GST_RTP_BIN_LOCK (bin);
--  GST_DEBUG_OBJECT (bin, "retrieving internal RTPSession object, index: %d",
-+  GST_DEBUG_OBJECT (bin, "retrieving internal RTPSession object, index: %u",
-       session_id);
-   session = find_session_by_id (bin, (gint) session_id);
-   if (session) {
-@@ -2194,6 +2315,29 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass)
-           on_sender_ssrc_active), NULL, NULL, g_cclosure_marshal_generic,
-       G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
- 
-+
-+  /**
-+   * GstRtpBin::on-bundled-ssrc:
-+   * @rtpbin: the object which received the signal
-+   * @ssrc: the bundled SSRC
-+   *
-+   * Notify of a new incoming bundled SSRC. If no handler is connected to the
-+   * signal then the #GstRtpSession created for the recv_rtp_sink_\%u
-+   * request pad will be managing this new SSRC. However if there is a handler
-+   * connected then the application can decided to dispatch this new stream to
-+   * another session by providing its ID as return value of the handler. This
-+   * can be particularly useful to keep retransmission SSRCs grouped with the
-+   * session for which they handle retransmission.
-+   *
-+   * Since: 1.12
-+   */
-+  gst_rtp_bin_signals[SIGNAL_ON_BUNDLED_SSRC] =
-+      g_signal_new ("on-bundled-ssrc", G_TYPE_FROM_CLASS (klass),
-+      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass,
-+          on_bundled_ssrc), NULL, NULL,
-+      g_cclosure_marshal_generic, G_TYPE_UINT, 1, G_TYPE_UINT);
-+
-+
-   g_object_class_install_property (gobject_class, PROP_SDES,
-       g_param_spec_boxed ("sdes", "SDES",
-           "The SDES items of this session",
-@@ -3021,7 +3165,7 @@ new_payload_found (GstElement * element, guint pt, GstPad * pad,
- 
-   rtpbin = stream->bin;
- 
--  GST_DEBUG ("new payload pad %d", pt);
-+  GST_DEBUG_OBJECT (rtpbin, "new payload pad %u", pt);
- 
-   GST_RTP_BIN_SHUTDOWN_LOCK (rtpbin, shutdown);
- 
-@@ -3078,7 +3222,7 @@ pt_map_requested (GstElement * element, guint pt, GstRtpBinSession * session)
- 
-   rtpbin = session->bin;
- 
--  GST_DEBUG_OBJECT (rtpbin, "payload map requested for pt %d in session %d", pt,
-+  GST_DEBUG_OBJECT (rtpbin, "payload map requested for pt %u in session %u", pt,
-       session->id);
- 
-   caps = get_pt_map (session, pt);
-@@ -3099,7 +3243,7 @@ static void
- payload_type_change (GstElement * element, guint pt, GstRtpBinSession * session)
- {
-   GST_DEBUG_OBJECT (session->bin,
--      "emiting signal for pt type changed to %d in session %d", pt,
-+      "emiting signal for pt type changed to %u in session %u", pt,
-       session->id);
- 
-   g_signal_emit (session->bin, gst_rtp_bin_signals[SIGNAL_PAYLOAD_TYPE_CHANGE],
-@@ -3246,15 +3390,42 @@ no_stream:
-   }
- }
- 
--static gboolean
--complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session)
-+static void
-+session_maybe_create_bundle_demuxer (GstRtpBinSession * session)
-+{
-+  GstRtpBin *rtpbin;
-+
-+  if (session->bundle_demux)
-+    return;
-+
-+  rtpbin = session->bin;
-+  if (g_signal_has_handler_pending (rtpbin,
-+          gst_rtp_bin_signals[SIGNAL_ON_BUNDLED_SSRC], 0, TRUE)) {
-+    GST_DEBUG_OBJECT (rtpbin, "Adding a bundle SSRC demuxer to session %u",
-+        session->id);
-+    session->bundle_demux = gst_element_factory_make ("rtpssrcdemux", NULL);
-+    session->bundle_demux_newpad_sig = g_signal_connect (session->bundle_demux,
-+        "new-ssrc-pad", (GCallback) new_bundled_ssrc_pad_found, session);
-+
-+    gst_bin_add (GST_BIN_CAST (rtpbin), session->bundle_demux);
-+    gst_element_sync_state_with_parent (session->bundle_demux);
-+  } else {
-+    GST_DEBUG_OBJECT (rtpbin,
-+        "No handler for the on-bundled-ssrc signal so no need for a bundle SSRC demuxer in session %u",
-+        session->id);
-+  }
-+}
-+
-+static GstPad *
-+complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session,
-+    gboolean bundle_demuxer_needed)
- {
--  gchar *gname;
-   guint sessid = session->id;
-   GstPad *recv_rtp_sink;
-+  GstPad *funnel_src;
-   GstElement *decoder;
--  GstElementClass *klass;
--  GstPadTemplate *templ;
-+
-+  g_assert (!session->recv_rtp_sink);
- 
-   /* get recv_rtp pad and store */
-   session->recv_rtp_sink =
-@@ -3265,6 +3436,9 @@ complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session)
-   g_signal_connect (session->recv_rtp_sink, "notify::caps",
-       (GCallback) caps_changed, session);
- 
-+  if (bundle_demuxer_needed)
-+    session_maybe_create_bundle_demuxer (session);
-+
-   GST_DEBUG_OBJECT (rtpbin, "requesting RTP decoder");
-   decoder = session_request_element (session, SIGNAL_REQUEST_RTP_DECODER);
-   if (decoder) {
-@@ -3282,7 +3456,14 @@ complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session)
-     if (decsrc == NULL)
-       goto dec_src_failed;
- 
--    ret = gst_pad_link (decsrc, session->recv_rtp_sink);
-+    if (session->bundle_demux) {
-+      GstPad *demux_sink;
-+      demux_sink = gst_element_get_static_pad (session->bundle_demux, "sink");
-+      ret = gst_pad_link (decsrc, demux_sink);
-+      gst_object_unref (demux_sink);
-+    } else {
-+      ret = gst_pad_link (decsrc, session->recv_rtp_sink);
-+    }
-     gst_object_unref (decsrc);
- 
-     if (ret != GST_PAD_LINK_OK)
-@@ -3290,81 +3471,54 @@ complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session)
- 
-   } else {
-     GST_DEBUG_OBJECT (rtpbin, "no RTP decoder given");
--    recv_rtp_sink = gst_object_ref (session->recv_rtp_sink);
-+    if (session->bundle_demux) {
-+      recv_rtp_sink =
-+          gst_element_get_static_pad (session->bundle_demux, "sink");
-+    } else {
-+      recv_rtp_sink =
-+          gst_element_get_request_pad (session->rtp_funnel, "sink_%u");
-+    }
-   }
- 
--  GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad");
--  klass = GST_ELEMENT_GET_CLASS (rtpbin);
--  gname = g_strdup_printf ("recv_rtp_sink_%u", sessid);
--  templ = gst_element_class_get_pad_template (klass, "recv_rtp_sink_%u");
--  session->recv_rtp_sink_ghost =
--      gst_ghost_pad_new_from_template (gname, recv_rtp_sink, templ);
--  gst_object_unref (recv_rtp_sink);
--  gst_pad_set_active (session->recv_rtp_sink_ghost, TRUE);
--  gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->recv_rtp_sink_ghost);
--  g_free (gname);
-+  funnel_src = gst_element_get_static_pad (session->rtp_funnel, "src");
-+  gst_pad_link (funnel_src, session->recv_rtp_sink);
-+  gst_object_unref (funnel_src);
- 
--  return TRUE;
-+  return recv_rtp_sink;
- 
-   /* ERRORS */
- pad_failed:
-   {
-     g_warning ("rtpbin: failed to get session recv_rtp_sink pad");
--    return FALSE;
-+    return NULL;
-   }
- dec_sink_failed:
-   {
--    g_warning ("rtpbin: failed to get decoder sink pad for session %d", sessid);
--    return FALSE;
-+    g_warning ("rtpbin: failed to get decoder sink pad for session %u", sessid);
-+    return NULL;
-   }
- dec_src_failed:
-   {
--    g_warning ("rtpbin: failed to get decoder src pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get decoder src pad for session %u", sessid);
-     gst_object_unref (recv_rtp_sink);
--    return FALSE;
-+    return NULL;
-   }
- dec_link_failed:
-   {
--    g_warning ("rtpbin: failed to link rtp decoder for session %d", sessid);
-+    g_warning ("rtpbin: failed to link rtp decoder for session %u", sessid);
-     gst_object_unref (recv_rtp_sink);
--    return FALSE;
-+    return NULL;
-   }
- }
- 
--/* Create a pad for receiving RTP for the session in @name. Must be called with
-- * RTP_BIN_LOCK.
-- */
--static GstPad *
--create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
-+static void
-+complete_session_receiver (GstRtpBin * rtpbin, GstRtpBinSession * session,
-+    guint sessid)
- {
--  guint sessid;
-   GstElement *aux;
-   GstPad *recv_rtp_src;
--  GstRtpBinSession *session;
--
--  /* first get the session number */
--  if (name == NULL || sscanf (name, "recv_rtp_sink_%u", &sessid) != 1)
--    goto no_name;
--
--  GST_DEBUG_OBJECT (rtpbin, "finding session %d", sessid);
- 
--  /* get or create session */
--  session = find_session_by_id (rtpbin, sessid);
--  if (!session) {
--    GST_DEBUG_OBJECT (rtpbin, "creating session %d", sessid);
--    /* create session now */
--    session = create_session (rtpbin, sessid);
--    if (session == NULL)
--      goto create_error;
--  }
--
--  /* check if pad was requested */
--  if (session->recv_rtp_sink_ghost != NULL)
--    return session->recv_rtp_sink_ghost;
--
--  /* setup the session sink pad */
--  if (!complete_session_sink (rtpbin, session))
--    goto session_sink_failed;
-+  g_assert (!session->recv_rtp_src);
- 
-   session->recv_rtp_src =
-       gst_element_get_static_pad (session->session, "recv_rtp_src");
-@@ -3381,7 +3535,7 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
- 
-     GST_DEBUG_OBJECT (rtpbin, "linking AUX receiver");
- 
--    pname = g_strdup_printf ("sink_%d", sessid);
-+    pname = g_strdup_printf ("sink_%u", sessid);
-     auxsink = gst_element_get_static_pad (aux, pname);
-     g_free (pname);
-     if (auxsink == NULL)
-@@ -3394,7 +3548,7 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
- 
-     /* this can be NULL when this AUX element is not to be linked to
-      * an SSRC demuxer */
--    pname = g_strdup_printf ("src_%d", sessid);
-+    pname = g_strdup_printf ("src_%u", sessid);
-     recv_rtp_src = gst_element_get_static_pad (aux, pname);
-     g_free (pname);
-   } else {
-@@ -3408,8 +3562,8 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
-     sinkdpad = gst_element_get_static_pad (session->demux, "sink");
-     GST_DEBUG_OBJECT (rtpbin, "linking demuxer RTP sink pad");
-     gst_pad_link_full (recv_rtp_src, sinkdpad, GST_PAD_LINK_CHECK_NOTHING);
--    gst_object_unref (recv_rtp_src);
-     gst_object_unref (sinkdpad);
-+    gst_object_unref (recv_rtp_src);
- 
-     /* connect to the new-ssrc-pad signal of the SSRC demuxer */
-     session->demux_newpad_sig = g_signal_connect (session->demux,
-@@ -3417,6 +3571,71 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
-     session->demux_padremoved_sig = g_signal_connect (session->demux,
-         "removed-ssrc-pad", (GCallback) ssrc_demux_pad_removed, session);
-   }
-+
-+  return;
-+
-+pad_failed:
-+  {
-+    g_warning ("rtpbin: failed to get session recv_rtp_src pad");
-+    return;
-+  }
-+aux_sink_failed:
-+  {
-+    g_warning ("rtpbin: failed to get AUX sink pad for session %u", sessid);
-+    return;
-+  }
-+aux_link_failed:
-+  {
-+    g_warning ("rtpbin: failed to link AUX pad to session %u", sessid);
-+    return;
-+  }
-+}
-+
-+/* Create a pad for receiving RTP for the session in @name. Must be called with
-+ * RTP_BIN_LOCK.
-+ */
-+static GstPad *
-+create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
-+{
-+  guint sessid;
-+  GstRtpBinSession *session;
-+  GstPad *recv_rtp_sink;
-+
-+  /* first get the session number */
-+  if (name == NULL || sscanf (name, "recv_rtp_sink_%u", &sessid) != 1)
-+    goto no_name;
-+
-+  GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid);
-+
-+  /* get or create session */
-+  session = find_session_by_id (rtpbin, sessid);
-+  if (!session) {
-+    GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid);
-+    /* create session now */
-+    session = create_session (rtpbin, sessid);
-+    if (session == NULL)
-+      goto create_error;
-+  }
-+
-+  /* check if pad was requested */
-+  if (session->recv_rtp_sink_ghost != NULL)
-+    return session->recv_rtp_sink_ghost;
-+
-+  /* setup the session sink pad */
-+  recv_rtp_sink = complete_session_sink (rtpbin, session, TRUE);
-+  if (!recv_rtp_sink)
-+    goto session_sink_failed;
-+
-+
-+  GST_DEBUG_OBJECT (rtpbin, "ghosting session sink pad");
-+  session->recv_rtp_sink_ghost =
-+      gst_ghost_pad_new_from_template (name, recv_rtp_sink, templ);
-+  gst_object_unref (recv_rtp_sink);
-+  gst_pad_set_active (session->recv_rtp_sink_ghost, TRUE);
-+  gst_element_add_pad (GST_ELEMENT_CAST (rtpbin), session->recv_rtp_sink_ghost);
-+
-+  complete_session_receiver (rtpbin, session, sessid);
-+
-   return session->recv_rtp_sink_ghost;
- 
-   /* ERRORS */
-@@ -3435,21 +3654,6 @@ session_sink_failed:
-     /* warning already done */
-     return NULL;
-   }
--pad_failed:
--  {
--    g_warning ("rtpbin: failed to get session recv_rtp_src pad");
--    return NULL;
--  }
--aux_sink_failed:
--  {
--    g_warning ("rtpbin: failed to get AUX sink pad for session %d", sessid);
--    return NULL;
--  }
--aux_link_failed:
--  {
--    g_warning ("rtpbin: failed to link AUX pad to session %d", sessid);
--    return NULL;
--  }
- }
- 
- static void
-@@ -3463,6 +3667,11 @@ remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session)
-     g_signal_handler_disconnect (session->demux, session->demux_padremoved_sig);
-     session->demux_padremoved_sig = 0;
-   }
-+  if (session->bundle_demux_newpad_sig) {
-+    g_signal_handler_disconnect (session->bundle_demux,
-+        session->bundle_demux_newpad_sig);
-+    session->bundle_demux_newpad_sig = 0;
-+  }
-   if (session->recv_rtp_src) {
-     gst_object_unref (session->recv_rtp_src);
-     session->recv_rtp_src = NULL;
-@@ -3480,37 +3689,14 @@ remove_recv_rtp (GstRtpBin * rtpbin, GstRtpBinSession * session)
-   }
- }
- 
--/* Create a pad for receiving RTCP for the session in @name. Must be called with
-- * RTP_BIN_LOCK.
-- */
- static GstPad *
--create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
--    const gchar * name)
-+complete_session_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session,
-+    guint sessid, gboolean bundle_demuxer_needed)
- {
--  guint sessid;
-   GstElement *decoder;
--  GstRtpBinSession *session;
--  GstPad *sinkdpad, *decsink;
--
--  /* first get the session number */
--  if (name == NULL || sscanf (name, "recv_rtcp_sink_%u", &sessid) != 1)
--    goto no_name;
--
--  GST_DEBUG_OBJECT (rtpbin, "finding session %d", sessid);
--
--  /* get or create the session */
--  session = find_session_by_id (rtpbin, sessid);
--  if (!session) {
--    GST_DEBUG_OBJECT (rtpbin, "creating session %d", sessid);
--    /* create session now */
--    session = create_session (rtpbin, sessid);
--    if (session == NULL)
--      goto create_error;
--  }
--
--  /* check if pad was requested */
--  if (session->recv_rtcp_sink_ghost != NULL)
--    return session->recv_rtcp_sink_ghost;
-+  GstPad *sinkdpad;
-+  GstPad *decsink = NULL;
-+  GstPad *funnel_src;
- 
-   /* get recv_rtp pad and store */
-   GST_DEBUG_OBJECT (rtpbin, "getting RTCP sink pad");
-@@ -3519,6 +3705,9 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
-   if (session->recv_rtcp_sink == NULL)
-     goto pad_failed;
- 
-+  if (bundle_demuxer_needed)
-+    session_maybe_create_bundle_demuxer (session);
-+
-   GST_DEBUG_OBJECT (rtpbin, "getting RTCP decoder");
-   decoder = session_request_element (session, SIGNAL_REQUEST_RTCP_DECODER);
-   if (decoder) {
-@@ -3535,14 +3724,26 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
-     if (decsrc == NULL)
-       goto dec_src_failed;
- 
--    ret = gst_pad_link (decsrc, session->recv_rtcp_sink);
-+    if (session->bundle_demux) {
-+      GstPad *demux_sink;
-+      demux_sink =
-+          gst_element_get_static_pad (session->bundle_demux, "rtcp_sink");
-+      ret = gst_pad_link (decsrc, demux_sink);
-+      gst_object_unref (demux_sink);
-+    } else {
-+      ret = gst_pad_link (decsrc, session->recv_rtcp_sink);
-+    }
-     gst_object_unref (decsrc);
- 
-     if (ret != GST_PAD_LINK_OK)
-       goto dec_link_failed;
-   } else {
-     GST_DEBUG_OBJECT (rtpbin, "no RTCP decoder given");
--    decsink = gst_object_ref (session->recv_rtcp_sink);
-+    if (session->bundle_demux) {
-+      decsink = gst_element_get_static_pad (session->bundle_demux, "rtcp_sink");
-+    } else {
-+      decsink = gst_element_get_request_pad (session->rtcp_funnel, "sink_%u");
-+    }
-   }
- 
-   /* get srcpad, link to SSRCDemux */
-@@ -3556,26 +3757,12 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
-   gst_pad_link_full (session->sync_src, sinkdpad, GST_PAD_LINK_CHECK_NOTHING);
-   gst_object_unref (sinkdpad);
- 
--  session->recv_rtcp_sink_ghost =
--      gst_ghost_pad_new_from_template (name, decsink, templ);
--  gst_object_unref (decsink);
--  gst_pad_set_active (session->recv_rtcp_sink_ghost, TRUE);
--  gst_element_add_pad (GST_ELEMENT_CAST (rtpbin),
--      session->recv_rtcp_sink_ghost);
-+  funnel_src = gst_element_get_static_pad (session->rtcp_funnel, "src");
-+  gst_pad_link (funnel_src, session->recv_rtcp_sink);
-+  gst_object_unref (funnel_src);
- 
--  return session->recv_rtcp_sink_ghost;
-+  return decsink;
- 
--  /* ERRORS */
--no_name:
--  {
--    g_warning ("rtpbin: invalid name given");
--    return NULL;
--  }
--create_error:
--  {
--    /* create_session already warned */
--    return NULL;
--  }
- pad_failed:
-   {
-     g_warning ("rtpbin: failed to get session rtcp_sink pad");
-@@ -3583,25 +3770,82 @@ pad_failed:
-   }
- dec_sink_failed:
-   {
--    g_warning ("rtpbin: failed to get decoder sink pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get decoder sink pad for session %u", sessid);
-     return NULL;
-   }
- dec_src_failed:
-   {
--    g_warning ("rtpbin: failed to get decoder src pad for session %d", sessid);
--    gst_object_unref (decsink);
--    return NULL;
-+    g_warning ("rtpbin: failed to get decoder src pad for session %u", sessid);
-+    goto cleanup;
-   }
- dec_link_failed:
-   {
--    g_warning ("rtpbin: failed to link rtcp decoder for session %d", sessid);
--    gst_object_unref (decsink);
--    return NULL;
-+    g_warning ("rtpbin: failed to link rtcp decoder for session %u", sessid);
-+    goto cleanup;
-   }
- src_pad_failed:
-   {
-     g_warning ("rtpbin: failed to get session sync_src pad");
--    gst_object_unref (decsink);
-+  }
-+
-+cleanup:
-+  gst_object_unref (decsink);
-+  return NULL;
-+}
-+
-+/* Create a pad for receiving RTCP for the session in @name. Must be called with
-+ * RTP_BIN_LOCK.
-+ */
-+static GstPad *
-+create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
-+    const gchar * name)
-+{
-+  guint sessid;
-+  GstRtpBinSession *session;
-+  GstPad *decsink = NULL;
-+
-+  /* first get the session number */
-+  if (name == NULL || sscanf (name, "recv_rtcp_sink_%u", &sessid) != 1)
-+    goto no_name;
-+
-+  GST_DEBUG_OBJECT (rtpbin, "finding session %u", sessid);
-+
-+  /* get or create the session */
-+  session = find_session_by_id (rtpbin, sessid);
-+  if (!session) {
-+    GST_DEBUG_OBJECT (rtpbin, "creating session %u", sessid);
-+    /* create session now */
-+    session = create_session (rtpbin, sessid);
-+    if (session == NULL)
-+      goto create_error;
-+  }
-+
-+  /* check if pad was requested */
-+  if (session->recv_rtcp_sink_ghost != NULL)
-+    return session->recv_rtcp_sink_ghost;
-+
-+  decsink = complete_session_rtcp (rtpbin, session, sessid, TRUE);
-+  if (!decsink)
-+    goto create_error;
-+
-+  session->recv_rtcp_sink_ghost =
-+      gst_ghost_pad_new_from_template (name, decsink, templ);
-+  gst_object_unref (decsink);
-+  gst_pad_set_active (session->recv_rtcp_sink_ghost, TRUE);
-+  gst_element_add_pad (GST_ELEMENT_CAST (rtpbin),
-+      session->recv_rtcp_sink_ghost);
-+
-+  return session->recv_rtcp_sink_ghost;
-+
-+  /* ERRORS */
-+no_name:
-+  {
-+    g_warning ("rtpbin: invalid name given");
-+    return NULL;
-+  }
-+create_error:
-+  {
-+    /* create_session already warned */
-     return NULL;
-   }
- }
-@@ -3651,7 +3895,7 @@ complete_session_src (GstRtpBin * rtpbin, GstRtpBinSession * session)
-     GstPadLinkReturn ret;
- 
-     GST_DEBUG_OBJECT (rtpbin, "linking RTP encoder");
--    ename = g_strdup_printf ("rtp_src_%d", sessid);
-+    ename = g_strdup_printf ("rtp_src_%u", sessid);
-     encsrc = gst_element_get_static_pad (encoder, ename);
-     g_free (ename);
- 
-@@ -3660,7 +3904,7 @@ complete_session_src (GstRtpBin * rtpbin, GstRtpBinSession * session)
- 
-     send_rtp_src = encsrc;
- 
--    ename = g_strdup_printf ("rtp_sink_%d", sessid);
-+    ename = g_strdup_printf ("rtp_sink_%u", sessid);
-     encsink = gst_element_get_static_pad (encoder, ename);
-     g_free (ename);
-     if (encsink == NULL)
-@@ -3694,23 +3938,23 @@ complete_session_src (GstRtpBin * rtpbin, GstRtpBinSession * session)
-   /* ERRORS */
- no_srcpad:
-   {
--    g_warning ("rtpbin: failed to get rtp source pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get rtp source pad for session %u", sessid);
-     return FALSE;
-   }
- enc_src_failed:
-   {
--    g_warning ("rtpbin: failed to get encoder src pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get encoder src pad for session %u", sessid);
-     return FALSE;
-   }
- enc_sink_failed:
-   {
--    g_warning ("rtpbin: failed to get encoder sink pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get encoder sink pad for session %u", sessid);
-     gst_object_unref (send_rtp_src);
-     return FALSE;
-   }
- enc_link_failed:
-   {
--    g_warning ("rtpbin: failed to link rtp encoder for session %d", sessid);
-+    g_warning ("rtpbin: failed to link rtp encoder for session %u", sessid);
-     gst_object_unref (send_rtp_src);
-     return FALSE;
-   }
-@@ -3772,22 +4016,22 @@ create_error:
-   }
- existing_session:
-   {
--    g_warning ("rtpbin: session %d is already a sender", sessid);
-+    g_warning ("rtpbin: session %u is already a sender", sessid);
-     return FALSE;
-   }
- pad_failed:
-   {
--    g_warning ("rtpbin: failed to get session pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get session pad for session %u", sessid);
-     return FALSE;
-   }
- aux_link_failed:
-   {
--    g_warning ("rtpbin: failed to link AUX for session %d", sessid);
-+    g_warning ("rtpbin: failed to link AUX for session %u", sessid);
-     return FALSE;
-   }
- session_src_failed:
-   {
--    g_warning ("rtpbin: failed to complete AUX for session %d", sessid);
-+    g_warning ("rtpbin: failed to complete AUX for session %u", sessid);
-     return FALSE;
-   }
- }
-@@ -3847,7 +4091,7 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
-     if (!setup_aux_sender (rtpbin, session, aux))
-       goto aux_session_failed;
- 
--    pname = g_strdup_printf ("sink_%d", sessid);
-+    pname = g_strdup_printf ("sink_%u", sessid);
-     send_rtp_sink = gst_element_get_static_pad (aux, pname);
-     g_free (pname);
- 
-@@ -3887,27 +4131,27 @@ create_error:
-   }
- existing_session:
-   {
--    g_warning ("rtpbin: session %d is already in use", sessid);
-+    g_warning ("rtpbin: session %u is already in use", sessid);
-     return NULL;
-   }
- aux_session_failed:
-   {
--    g_warning ("rtpbin: failed to get AUX sink pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get AUX sink pad for session %u", sessid);
-     return NULL;
-   }
- aux_sink_failed:
-   {
--    g_warning ("rtpbin: failed to get AUX sink pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get AUX sink pad for session %u", sessid);
-     return NULL;
-   }
- pad_failed:
-   {
--    g_warning ("rtpbin: failed to get session pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get session pad for session %u", sessid);
-     return NULL;
-   }
- session_src_failed:
-   {
--    g_warning ("rtpbin: failed to setup source pads for session %d", sessid);
-+    g_warning ("rtpbin: failed to setup source pads for session %u", sessid);
-     return NULL;
-   }
- }
-@@ -3978,13 +4222,13 @@ create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
- 
-     GST_DEBUG_OBJECT (rtpbin, "linking RTCP encoder");
- 
--    ename = g_strdup_printf ("rtcp_src_%d", sessid);
-+    ename = g_strdup_printf ("rtcp_src_%u", sessid);
-     encsrc = gst_element_get_static_pad (encoder, ename);
-     g_free (ename);
-     if (encsrc == NULL)
-       goto enc_src_failed;
- 
--    ename = g_strdup_printf ("rtcp_sink_%d", sessid);
-+    ename = g_strdup_printf ("rtcp_sink_%u", sessid);
-     encsink = gst_element_get_static_pad (encoder, ename);
-     g_free (ename);
-     if (encsink == NULL)
-@@ -4021,23 +4265,23 @@ no_session:
-   }
- pad_failed:
-   {
--    g_warning ("rtpbin: failed to get rtcp pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get rtcp pad for session %u", sessid);
-     return NULL;
-   }
- enc_src_failed:
-   {
--    g_warning ("rtpbin: failed to get encoder src pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get encoder src pad for session %u", sessid);
-     return NULL;
-   }
- enc_sink_failed:
-   {
--    g_warning ("rtpbin: failed to get encoder sink pad for session %d", sessid);
-+    g_warning ("rtpbin: failed to get encoder sink pad for session %u", sessid);
-     gst_object_unref (encsrc);
-     return NULL;
-   }
- enc_link_failed:
-   {
--    g_warning ("rtpbin: failed to link rtcp encoder for session %d", sessid);
-+    g_warning ("rtpbin: failed to link rtcp encoder for session %u", sessid);
-     gst_object_unref (encsrc);
-     return NULL;
-   }
-diff --git a/gst/rtpmanager/gstrtpbin.h b/gst/rtpmanager/gstrtpbin.h
-index fb13a47..384b76d 100644
---- a/gst/rtpmanager/gstrtpbin.h
-+++ b/gst/rtpmanager/gstrtpbin.h
-@@ -127,6 +127,8 @@ struct _GstRtpBinClass {
- 
-   void     (*on_new_sender_ssrc)      (GstRtpBin *rtpbin, guint session, guint32 ssrc);
-   void     (*on_sender_ssrc_active)   (GstRtpBin *rtpbin, guint session, guint32 ssrc);
-+
-+  guint    (*on_bundled_ssrc)         (GstRtpBin *rtpbin, guint ssrc);
- };
- 
- GType gst_rtp_bin_get_type (void);

Modified: trunk/Tools/gstreamer/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch (225779 => 225780)


--- trunk/Tools/gstreamer/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/gstreamer/patches/gst-plugins-good-0005-souphttpsrc-cookie-jar-and-context-query-support.patch	2017-12-12 14:58:05 UTC (rev 225780)
@@ -1,7 +1,7 @@
-From 8e03a63fd55f5ae447994579890e8630b27f4a1b Mon Sep 17 00:00:00 2001
+From 5495e154c5ba05c7e254865e2ff6d1068f2dc6ca Mon Sep 17 00:00:00 2001
 From: Philippe Normand <ph...@igalia.com>
 Date: Wed, 28 Oct 2015 12:00:09 +0100
-Subject: [PATCH 2/3] souphttpsrc: cookie jar and context query support
+Subject: [PATCH] souphttpsrc: cookie jar and context query support
 
 Use a volatile Cookie jar to store cookies and handle the context
 query so that session data can be shared with other elements (like
@@ -14,10 +14,10 @@
  2 files changed, 40 insertions(+), 2 deletions(-)
 
 diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
-index fc7cba7..0d3e886 100644
+index 52c1b8182..ac41692a5 100644
 --- a/ext/soup/gstsouphttpsrc.c
 +++ b/ext/soup/gstsouphttpsrc.c
-@@ -482,6 +482,7 @@ gst_soup_http_src_init (GstSoupHTTPSrc * src)
+@@ -481,6 +481,7 @@ gst_soup_http_src_init (GstSoupHTTPSrc * src)
    src->cookies = NULL;
    src->iradio_mode = DEFAULT_IRADIO_MODE;
    src->session = NULL;
@@ -25,7 +25,7 @@
    src->msg = NULL;
    src->timeout = DEFAULT_TIMEOUT;
    src->log_level = DEFAULT_SOUP_LOG_LEVEL;
-@@ -943,6 +944,9 @@ gst_soup_http_src_session_open (GstSoupHTTPSrc * src)
+@@ -942,6 +943,9 @@ gst_soup_http_src_session_open (GstSoupHTTPSrc * src)
      soup_session_remove_feature_by_type (src->session,
          SOUP_TYPE_CONTENT_DECODER);
  
@@ -35,7 +35,7 @@
    return TRUE;
  }
  
-@@ -958,6 +962,11 @@ gst_soup_http_src_session_close (GstSoupHTTPSrc * src)
+@@ -957,6 +961,11 @@ gst_soup_http_src_session_close (GstSoupHTTPSrc * src)
      src->msg = NULL;
    }
  
@@ -47,7 +47,7 @@
    if (src->session) {
      soup_session_abort (src->session);
      g_object_unref (src->session);
-@@ -1426,11 +1435,12 @@ gst_soup_http_src_build_message (GstSoupHTTPSrc * src, const gchar * method)
+@@ -1372,11 +1381,12 @@ gst_soup_http_src_build_message (GstSoupHTTPSrc * src, const gchar * method)
    }
    if (src->cookies) {
      gchar **cookie;
@@ -62,7 +62,7 @@
    }
  
    soup_message_set_flags (src->msg, SOUP_MESSAGE_OVERWRITE_CHUNKS |
-@@ -1910,6 +1920,12 @@ gst_soup_http_src_query (GstBaseSrc * bsrc, GstQuery * query)
+@@ -1888,6 +1898,12 @@ gst_soup_http_src_query (GstBaseSrc * bsrc, GstQuery * query)
    gboolean ret;
    GstSchedulingFlags flags;
    gint minsize, maxsize, align;
@@ -75,7 +75,7 @@
  
    switch (GST_QUERY_TYPE (query)) {
      case GST_QUERY_URI:
-@@ -1921,6 +1937,27 @@ gst_soup_http_src_query (GstBaseSrc * bsrc, GstQuery * query)
+@@ -1899,6 +1915,27 @@ gst_soup_http_src_query (GstBaseSrc * bsrc, GstQuery * query)
        }
        ret = TRUE;
        break;
@@ -104,7 +104,7 @@
        ret = FALSE;
        break;
 diff --git a/ext/soup/gstsouphttpsrc.h b/ext/soup/gstsouphttpsrc.h
-index dd01656..9c6bb5c 100644
+index f140f80c5..52b32c768 100644
 --- a/ext/soup/gstsouphttpsrc.h
 +++ b/ext/soup/gstsouphttpsrc.h
 @@ -60,6 +60,7 @@ struct _GstSoupHTTPSrc {
@@ -113,8 +113,8 @@
    SoupSession *session;        /* Async context. */
 +  SoupCookieJar *cookie_jar;   /* Volatile HTTP cookie storage */
    SoupMessage *msg;            /* Request message. */
-   GstFlowReturn ret;           /* Return code from callback. */
    gint retry_count;            /* Number of retries since we received data */
+   gint max_retries;            /* Maximum number of retries */
 -- 
-1.8.3.2
+2.11.0
 

Modified: trunk/Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch (225779 => 225780)


--- trunk/Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch	2017-12-12 14:58:05 UTC (rev 225780)
@@ -1,7 +1,7 @@
-From 9d7201ca76e7875cddd106df06b4d7637c025465 Mon Sep 17 00:00:00 2001
+From e09ab95ad39264783bf0e57dfb89165ad9b83802 Mon Sep 17 00:00:00 2001
 From: Xabier Rodriguez Calvar <calva...@igalia.com>
 Date: Wed, 21 Jun 2017 17:59:21 +0200
-Subject: [PATCH 2/3] qtdemux: add context for a preferred protection
+Subject: [PATCH] qtdemux: add context for a preferred protection
 
 qtdemux selected the first system corresponding to a working GStreamer
 decryptor. With this change, before selecting that decryptor, qtdemux
@@ -36,7 +36,7 @@
  2 files changed, 195 insertions(+), 6 deletions(-)
 
 diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 0a41b26f2..ae57bdf9b 100644
+index f0f8320e2..f710d2685 100644
 --- a/gst/isomp4/qtdemux.c
 +++ b/gst/isomp4/qtdemux.c
 @@ -513,6 +513,8 @@ static GstIndex *gst_qtdemux_get_index (GstElement * element);
@@ -64,7 +64,7 @@
    g_queue_init (&qtdemux->protection_event_queue);
    gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
    qtdemux->tag_list = gst_tag_list_new_empty ();
-@@ -2113,6 +2117,10 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
+@@ -2114,6 +2118,10 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
        g_ptr_array_free (qtdemux->protection_system_ids, TRUE);
        qtdemux->protection_system_ids = NULL;
      }
@@ -75,7 +75,7 @@
    } else if (qtdemux->mss_mode) {
      gst_flow_combiner_reset (qtdemux->flowcombiner);
      for (n = 0; n < qtdemux->n_streams; n++)
-@@ -2590,6 +2598,28 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
+@@ -2600,6 +2608,28 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
  }
  
  static void
@@ -104,7 +104,7 @@
  qtdemux_parse_ftyp (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
  {
    /* counts as header data */
-@@ -3819,6 +3849,8 @@ qtdemux_parse_pssh (GstQTDemux * qtdemux, GNode * node)
+@@ -3829,6 +3859,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) {
@@ -113,7 +113,7 @@
      g_queue_push_tail (&qtdemux->streams[i]->protection_scheme_event_queue,
          gst_event_ref (event));
    }
-@@ -5529,6 +5561,8 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
+@@ -5538,6 +5570,8 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
      GstEvent *event;
  
      while ((event = g_queue_pop_head (&stream->protection_scheme_event_queue))) {
@@ -122,7 +122,7 @@
        gst_pad_push_event (stream->pad, event);
      }
  
-@@ -7688,11 +7722,141 @@ qtdemux_do_allocation (GstQTDemux * qtdemux, QtDemuxStream * stream)
+@@ -7696,11 +7730,141 @@ qtdemux_do_allocation (GstQTDemux * qtdemux, QtDemuxStream * stream)
  }
  
  static gboolean
@@ -265,7 +265,7 @@
  
    g_return_val_if_fail (qtdemux != NULL, FALSE);
    g_return_val_if_fail (stream != NULL, FALSE);
-@@ -7708,17 +7872,41 @@ gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux,
+@@ -7716,17 +7880,41 @@ gst_qtdemux_configure_protected_caps (GstQTDemux * qtdemux,
          "cenc protection system information has been found");
      return FALSE;
    }
@@ -309,7 +309,7 @@
 +  GST_DEBUG_OBJECT (qtdemux, "selected protection system is %s",
 +      selected_system);
 +
-   s = gst_caps_get_structure (stream->caps, 0);
+   s = gst_caps_get_structure (CUR_STREAM (stream)->caps, 0);
    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

Modified: trunk/Tools/gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch (225779 => 225780)


--- trunk/Tools/gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch	2017-12-12 14:58:05 UTC (rev 225780)
@@ -9,11 +9,11 @@
  1 file changed, 12 insertions(+), 14 deletions(-)
 
 diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 6b0c820..7b71237 100644
+index f0f8320..3f2c016 100644
 --- a/gst/isomp4/qtdemux.c
 +++ b/gst/isomp4/qtdemux.c
-@@ -5421,20 +5421,18 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
-         gst_pad_push_event (stream->pad, event);
+@@ -5541,26 +5541,25 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
+       gst_pad_push_event (stream->pad, event);
      }
  
 -    if (info->crypto_info == NULL) {
@@ -22,29 +22,42 @@
 -      goto exit;
 -    }
 -
--    index = stream->sample_index - (stream->n_samples - info->crypto_info->len);
+-    /* The end of the crypto_info array matches our n_samples position,
+-     * so count backward from there */
+-    index = stream->sample_index - stream->n_samples + info->crypto_info->len;
 -    if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) {
 -      /* steal structure from array */
 -      crypto_info = g_ptr_array_index (info->crypto_info, index);
 -      g_ptr_array_index (info->crypto_info, index) = NULL;
--      GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u]", index);
+-      GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u/%u]", index,
+-          info->crypto_info->len);
 -      if (!crypto_info || !gst_buffer_add_protection_meta (buf, crypto_info))
 -        GST_ERROR_OBJECT (qtdemux, "failed to attach cenc metadata to buffer");
+-    } else {
+-      GST_INFO_OBJECT (qtdemux, "No crypto info with index %d and sample %d",
+-          index, stream->sample_index);
++
 +    if (info->crypto_info == NULL)
 +      GST_DEBUG_OBJECT (qtdemux, "cenc metadata hasn't been parsed yet, pushing buffer as if it wasn't encrypted");
 +    else {
-+      index = stream->sample_index - (stream->n_samples - info->crypto_info->len);
++      /* The end of the crypto_info array matches our n_samples position,
++       * so count backward from there */
++      index = stream->sample_index - stream->n_samples + info->crypto_info->len;
 +      if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) {
 +        /* steal structure from array */
 +        crypto_info = g_ptr_array_index (info->crypto_info, index);
 +        g_ptr_array_index (info->crypto_info, index) = NULL;
-+        GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u]", index);
++        GST_LOG_OBJECT (qtdemux, "attaching cenc metadata [%u/%u]", index,
++            info->crypto_info->len);
 +        if (!crypto_info || !gst_buffer_add_protection_meta (buf, crypto_info))
 +          GST_ERROR_OBJECT (qtdemux, "failed to attach cenc metadata to buffer");
++      } else {
++        GST_INFO_OBJECT (qtdemux, "No crypto info with index %d and sample %d",
++            index, stream->sample_index);
 +      }
      }
    }
  
 -- 
-1.8.3.2
+2.11.0
 

Modified: trunk/Tools/gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch (225779 => 225780)


--- trunk/Tools/gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch	2017-12-12 14:29:01 UTC (rev 225779)
+++ trunk/Tools/gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch	2017-12-12 14:58:05 UTC (rev 225780)
@@ -5,6 +5,9 @@
 
 Avoid computing frame rate when a stream contain moof with only one
 sample, to avoid an assert. The moof is considered as still picture.
+
+[ Merged in upstream commit 728a1629cf9fd7f4a728477bda1d13a1ecc219bb ]
+
 ---
  gst/isomp4/qtdemux.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to