mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
rtpbin: avoid some pad link checks
Link pads without checks, we know it will work.
This commit is contained in:
parent
4a91a93d4e
commit
2efd58fc84
1 changed files with 7 additions and 21 deletions
|
@ -1439,7 +1439,8 @@ create_stream (GstRtpBinSession * session, guint32 ssrc)
|
|||
|
||||
/* link stuff */
|
||||
if (demux)
|
||||
gst_element_link (buffer, demux);
|
||||
gst_element_link_pads_full (buffer, "src", demux, "sink",
|
||||
GST_PAD_LINK_CHECK_NOTHING);
|
||||
|
||||
if (rtpbin->buffering) {
|
||||
guint64 last_out;
|
||||
|
@ -2563,7 +2564,7 @@ new_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad,
|
|||
srcpad = gst_element_get_static_pad (element, padname);
|
||||
g_free (padname);
|
||||
sinkpad = gst_element_get_static_pad (stream->buffer, "sink");
|
||||
gst_pad_link (srcpad, sinkpad);
|
||||
gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
||||
gst_object_unref (sinkpad);
|
||||
gst_object_unref (srcpad);
|
||||
|
||||
|
@ -2572,7 +2573,7 @@ new_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad,
|
|||
srcpad = gst_element_get_static_pad (element, padname);
|
||||
g_free (padname);
|
||||
sinkpad = gst_element_get_request_pad (stream->buffer, "sink_rtcp");
|
||||
gst_pad_link (srcpad, sinkpad);
|
||||
gst_pad_link_full (srcpad, sinkpad, GST_PAD_LINK_CHECK_NOTHING);
|
||||
gst_object_unref (sinkpad);
|
||||
gst_object_unref (srcpad);
|
||||
|
||||
|
@ -2649,7 +2650,6 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
|||
GstPad *sinkdpad;
|
||||
guint sessid;
|
||||
GstRtpBinSession *session;
|
||||
GstPadLinkReturn lres;
|
||||
|
||||
/* first get the session number */
|
||||
if (name == NULL || sscanf (name, "recv_rtp_sink_%u", &sessid) != 1)
|
||||
|
@ -2691,10 +2691,9 @@ create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
|||
GST_DEBUG_OBJECT (rtpbin, "getting demuxer RTP sink pad");
|
||||
sinkdpad = gst_element_get_static_pad (session->demux, "sink");
|
||||
GST_DEBUG_OBJECT (rtpbin, "linking demuxer RTP sink pad");
|
||||
lres = gst_pad_link (session->recv_rtp_src, sinkdpad);
|
||||
gst_pad_link_full (session->recv_rtp_src, sinkdpad,
|
||||
GST_PAD_LINK_CHECK_NOTHING);
|
||||
gst_object_unref (sinkdpad);
|
||||
if (lres != GST_PAD_LINK_OK)
|
||||
goto link_failed;
|
||||
|
||||
/* connect to the new-ssrc-pad signal of the SSRC demuxer */
|
||||
session->demux_newpad_sig = g_signal_connect (session->demux,
|
||||
|
@ -2726,11 +2725,6 @@ pad_failed:
|
|||
g_warning ("rtpbin: failed to get session pad");
|
||||
return NULL;
|
||||
}
|
||||
link_failed:
|
||||
{
|
||||
g_warning ("rtpbin: failed to link pads");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2771,7 +2765,6 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
|
|||
guint sessid;
|
||||
GstRtpBinSession *session;
|
||||
GstPad *sinkdpad;
|
||||
GstPadLinkReturn lres;
|
||||
|
||||
/* first get the session number */
|
||||
if (name == NULL || sscanf (name, "recv_rtcp_sink_%u", &sessid) != 1)
|
||||
|
@ -2808,10 +2801,8 @@ create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
|
|||
|
||||
GST_DEBUG_OBJECT (rtpbin, "getting demuxer RTCP sink pad");
|
||||
sinkdpad = gst_element_get_static_pad (session->demux, "rtcp_sink");
|
||||
lres = gst_pad_link (session->sync_src, sinkdpad);
|
||||
gst_pad_link_full (session->sync_src, sinkdpad, GST_PAD_LINK_CHECK_NOTHING);
|
||||
gst_object_unref (sinkdpad);
|
||||
if (lres != GST_PAD_LINK_OK)
|
||||
goto link_failed;
|
||||
|
||||
session->recv_rtcp_sink_ghost =
|
||||
gst_ghost_pad_new_from_template (name, session->recv_rtcp_sink, templ);
|
||||
|
@ -2837,11 +2828,6 @@ pad_failed:
|
|||
g_warning ("rtpbin: failed to get session pad");
|
||||
return NULL;
|
||||
}
|
||||
link_failed:
|
||||
{
|
||||
g_warning ("rtpbin: failed to link pads");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue