rtpbin: Allow reusing the sender AUX bin
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 27 Feb 2019 20:49:13 +0000 (15:49 -0500)
committerNicolas Dufresne <nicolas@ndufresne.ca>
Thu, 21 Mar 2019 21:10:43 +0000 (21:10 +0000)
This is needed for the case you don't know in advance all the sessions
you will be using, but would like to place all the related AUX element
in the same GstBin. As per current implementation, each time an sender
AUX bin is requested and returned, RTPBin will walk the src pads and
create sessions for these pads.

In the current implementation, if a src pad already have a sessions, it
returns an error and stops. As a side effect, if an AUX bin is reused in
a following AUX bin request, it can only work if the pads are created on
the last request.

This change simply relax the restriction in order to keep walking, and
just ensure that all newly created pads have a sessions.

gst/rtpmanager/gstrtpbin.c

index 6bcc7f8..012762e 100644 (file)
@@ -4174,8 +4174,9 @@ create_error:
   }
 existing_session:
   {
-    g_warning ("rtpbin: session %u is already a sender", sessid);
-    return FALSE;
+    GST_DEBUG_OBJECT (rtpbin,
+        "skipping src_%i setup, since it is already configured.", sessid);
+    return TRUE;
   }
 pad_failed:
   {