From 2ff7519d73b8c0e53293700960205afc1774dea6 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 27 Feb 2019 15:49:13 -0500 Subject: [PATCH] rtpbin: Allow reusing the sender AUX bin 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 6bcc7f8d1c..012762e9ef 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -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: {