Use gst_element_request_pad_simple

Instead of the deprecated gst_element_get_request_pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/958>
This commit is contained in:
François Laignel 2021-04-20 22:08:23 +02:00 committed by Sebastian Dröge
parent 7c5f2185a9
commit 39f0905a7e
14 changed files with 66 additions and 65 deletions

View file

@ -3106,7 +3106,7 @@ gst_splitmux_sink_request_new_pad (GstElement * element,
/* Have a muxer pad name */
if (!(muxpad = gst_element_get_static_pad (splitmux->muxer, muxer_padname))) {
if ((muxpad =
gst_element_get_request_pad (splitmux->muxer, muxer_padname)))
gst_element_request_pad_simple (splitmux->muxer, muxer_padname)))
muxer_is_requestpad = TRUE;
}
g_free ((gchar *) muxer_padname);

View file

@ -3862,7 +3862,7 @@ new_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad,
gst_object_unref (sinkpad);
gst_object_unref (srcpad);
sinkpad = gst_element_get_request_pad (stream->buffer, "sink_rtcp");
sinkpad = gst_element_request_pad_simple (stream->buffer, "sink_rtcp");
if (sinkpad) {
GST_DEBUG_OBJECT (rtpbin, "linking jitterbuffer RTCP");
padname = g_strdup_printf ("rtcp_src_%u", ssrc);
@ -3941,7 +3941,7 @@ complete_session_sink (GstRtpBin * rtpbin, GstRtpBinSession * session)
/* get recv_rtp pad and store */
session->recv_rtp_sink =
gst_element_get_request_pad (session->session, "recv_rtp_sink");
gst_element_request_pad_simple (session->session, "recv_rtp_sink");
if (session->recv_rtp_sink == NULL)
goto pad_failed;
@ -4208,7 +4208,7 @@ complete_session_fec (GstRtpBin * rtpbin, GstRtpBinSession * session,
GST_DEBUG_OBJECT (rtpbin, "getting FEC sink pad");
padname = g_strdup_printf ("fec_%u", fec_idx);
ret = gst_element_get_request_pad (session->fec_decoder, padname);
ret = gst_element_request_pad_simple (session->fec_decoder, padname);
g_free (padname);
if (ret == NULL)
@ -4242,7 +4242,7 @@ complete_session_rtcp (GstRtpBin * rtpbin, GstRtpBinSession * session,
/* get recv_rtp pad and store */
GST_DEBUG_OBJECT (rtpbin, "getting RTCP sink pad");
session->recv_rtcp_sink =
gst_element_get_request_pad (session->session, "recv_rtcp_sink");
gst_element_request_pad_simple (session->session, "recv_rtcp_sink");
if (session->recv_rtcp_sink == NULL)
goto pad_failed;
@ -4623,7 +4623,7 @@ setup_aux_sender_fold (const GValue * item, GValue * result, gpointer user_data)
/* get send_rtp pad and store */
newsess->send_rtp_sink =
gst_element_get_request_pad (newsess->session, "send_rtp_sink");
gst_element_request_pad_simple (newsess->session, "send_rtp_sink");
if (newsess->send_rtp_sink == NULL)
goto pad_failed;
@ -4847,7 +4847,7 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
} else {
/* get send_rtp pad and store */
session->send_rtp_sink =
gst_element_get_request_pad (session->session, "send_rtp_sink");
gst_element_request_pad_simple (session->session, "send_rtp_sink");
if (session->send_rtp_sink == NULL)
goto pad_failed;
@ -5002,7 +5002,7 @@ create_send_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
/* get rtcp_src pad and store */
session->send_rtcp_src =
gst_element_get_request_pad (session->session, "send_rtcp_src");
gst_element_request_pad_simple (session->session, "send_rtcp_src");
if (session->send_rtcp_src == NULL)
goto pad_failed;

View file

@ -3789,7 +3789,7 @@ request_rtcp_encoder (GstElement * rtpbin, guint session,
}
}
name = g_strdup_printf ("rtcp_sink_%d", session);
pad = gst_element_get_request_pad (stream->srtpenc, name);
pad = gst_element_request_pad_simple (stream->srtpenc, name);
g_free (name);
gst_object_unref (pad);
@ -4059,10 +4059,10 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
/* we stream directly to the manager, get some pads. Each RTSP stream goes
* into a separate RTP session. */
name = g_strdup_printf ("recv_rtp_sink_%u", stream->id);
stream->channelpad[0] = gst_element_get_request_pad (src->manager, name);
stream->channelpad[0] = gst_element_request_pad_simple (src->manager, name);
g_free (name);
name = g_strdup_printf ("recv_rtcp_sink_%u", stream->id);
stream->channelpad[1] = gst_element_get_request_pad (src->manager, name);
stream->channelpad[1] = gst_element_request_pad_simple (src->manager, name);
g_free (name);
/* now configure the bandwidth in the manager */
@ -4248,7 +4248,7 @@ gst_rtspsrc_stream_configure_tcp (GstRTSPSrc * src, GstRTSPStream * stream,
/* get session RTCP pad */
name = g_strdup_printf ("send_rtcp_src_%u", stream->id);
pad = gst_element_get_request_pad (src->manager, name);
pad = gst_element_request_pad_simple (src->manager, name);
g_free (name);
/* and link */
@ -4639,7 +4639,7 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
/* get session RTCP pad */
name = g_strdup_printf ("send_rtcp_src_%u", stream->id);
pad = gst_element_get_request_pad (src->manager, name);
pad = gst_element_request_pad_simple (src->manager, name);
g_free (name);
/* and link */

View file

@ -66,7 +66,7 @@ setup_src_pad (GstElement * element,
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
if (!(sinkpad = gst_element_get_static_pad (element, sinkname)))
sinkpad = gst_element_get_request_pad (element, sinkname);
sinkpad = gst_element_request_pad_simple (element, sinkname);
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
GST_ELEMENT_NAME (element));
/* references are owned by: 1) us, 2) avimux, 3) collect pads */
@ -93,7 +93,7 @@ teardown_src_pad (GstElement * element, const gchar * sinkname)
padname = g_strdup (sinkname);
memcpy (strchr (padname, '%'), "0", 2);
if (!(sinkpad = gst_element_get_static_pad (element, padname)))
sinkpad = gst_element_get_request_pad (element, padname);
sinkpad = gst_element_request_pad_simple (element, padname);
g_free (padname);
/* pad refs held by 1) avimux 2) collectpads and 3) us (through _get) */
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 3);

View file

@ -94,7 +94,7 @@ mux_pcm_audio (guint num_buffers, guint repeat)
fail_unless (gst_element_link (flvmux, sink));
/* now link the elements */
sinkpad = gst_element_get_request_pad (flvmux, "audio");
sinkpad = gst_element_request_pad_simple (flvmux, "audio");
fail_unless (sinkpad != NULL, "Could not get audio request pad");
srcpad = gst_element_get_static_pad (conv, "src");

View file

@ -70,11 +70,11 @@ GST_START_TEST (test_request_pads)
interleave = gst_element_factory_make ("interleave", NULL);
fail_unless (interleave != NULL);
pad1 = gst_element_get_request_pad (interleave, "sink_%u");
pad1 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (pad1 != NULL);
fail_unless_equals_string (GST_OBJECT_NAME (pad1), "sink_0");
pad2 = gst_element_get_request_pad (interleave, "sink_%u");
pad2 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (pad2 != NULL);
fail_unless_equals_string (GST_OBJECT_NAME (pad2), "sink_1");
@ -163,11 +163,11 @@ GST_START_TEST (test_interleave_2ch)
queue = gst_element_factory_make ("queue", "queue");
fail_unless (queue != NULL);
sink0 = gst_element_get_request_pad (interleave, "sink_%u");
sink0 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sink0 != NULL);
fail_unless_equals_string (GST_OBJECT_NAME (sink0), "sink_0");
sink1 = gst_element_get_request_pad (interleave, "sink_%u");
sink1 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sink1 != NULL);
fail_unless_equals_string (GST_OBJECT_NAME (sink1), "sink_1");
@ -294,11 +294,11 @@ GST_START_TEST (test_interleave_2ch_1eos)
queue = gst_element_factory_make ("queue", "queue");
fail_unless (queue != NULL);
sink0 = gst_element_get_request_pad (interleave, "sink_%u");
sink0 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sink0 != NULL);
fail_unless_equals_string (GST_OBJECT_NAME (sink0), "sink_0");
sink1 = gst_element_get_request_pad (interleave, "sink_%u");
sink1 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sink1 != NULL);
fail_unless_equals_string (GST_OBJECT_NAME (sink1), "sink_1");
@ -564,13 +564,13 @@ test_interleave_2ch_pipeline (gboolean interleaved)
fail_unless (interleave != NULL);
gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
sinkpad0 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sinkpad0 != NULL);
tmp = gst_element_get_static_pad (src1, "src");
fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
gst_object_unref (tmp);
sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
sinkpad1 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sinkpad1 != NULL);
tmp = gst_element_get_static_pad (src2, "src");
tmp2 = gst_element_get_static_pad (queue, "sink");
@ -659,13 +659,13 @@ GST_START_TEST (test_interleave_2ch_pipeline_input_chanpos)
g_object_set (interleave, "channel-positions-from-input", TRUE, NULL);
gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
sinkpad0 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sinkpad0 != NULL);
tmp = gst_element_get_static_pad (src1, "src");
fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
gst_object_unref (tmp);
sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
sinkpad1 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sinkpad1 != NULL);
tmp = gst_element_get_static_pad (src2, "src");
tmp2 = gst_element_get_static_pad (queue, "sink");
@ -756,13 +756,13 @@ GST_START_TEST (test_interleave_2ch_pipeline_custom_chanpos)
g_value_array_free (arr);
gst_bin_add (GST_BIN (pipeline), gst_object_ref (interleave));
sinkpad0 = gst_element_get_request_pad (interleave, "sink_%u");
sinkpad0 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sinkpad0 != NULL);
tmp = gst_element_get_static_pad (src1, "src");
fail_unless (gst_pad_link (tmp, sinkpad0) == GST_PAD_LINK_OK);
gst_object_unref (tmp);
sinkpad1 = gst_element_get_request_pad (interleave, "sink_%u");
sinkpad1 = gst_element_request_pad_simple (interleave, "sink_%u");
fail_unless (sinkpad1 != NULL);
tmp = gst_element_get_static_pad (src2, "src");
tmp2 = gst_element_get_static_pad (queue, "sink");

View file

@ -124,7 +124,7 @@ setup_src_pad (GstElement * element,
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
if (!(sinkpad = gst_element_get_static_pad (element, sinkname)))
sinkpad = gst_element_get_request_pad (element, sinkname);
sinkpad = gst_element_request_pad_simple (element, sinkname);
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
GST_ELEMENT_NAME (element));
/* references are owned by: 1) us, 2) qtmux */

View file

@ -34,7 +34,7 @@ GST_START_TEST (test_pads)
element = gst_element_factory_make ("rtpsession", NULL);
pad = gst_element_get_request_pad (element, "recv_rtcp_sink");
pad = gst_element_request_pad_simple (element, "recv_rtcp_sink");
gst_object_unref (pad);
gst_object_unref (element);
}
@ -52,7 +52,7 @@ GST_START_TEST (test_cleanup_send)
while (count--) {
/* request session 0 */
rtp_sink = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0");
rtp_sink = gst_element_request_pad_simple (rtpbin, "send_rtp_sink_0");
fail_unless (rtp_sink != NULL);
ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
@ -67,7 +67,7 @@ GST_START_TEST (test_cleanup_send)
g_object_unref (session);
/* get the send RTCP pad too */
rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
rtcp_src = gst_element_request_pad_simple (rtpbin, "send_rtcp_src_0");
fail_unless (rtcp_src != NULL);
ASSERT_OBJECT_REFCOUNT (rtcp_src, "rtcp_src", 2);
@ -272,7 +272,7 @@ GST_START_TEST (test_cleanup_recv)
while (count--) {
/* request session 0 */
rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
rtp_sink = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_0");
fail_unless (rtp_sink != NULL);
ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
@ -343,7 +343,7 @@ GST_START_TEST (test_cleanup_recv2)
fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
/* request session 0 */
rtp_sink = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
rtp_sink = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_0");
fail_unless (rtp_sink != NULL);
ASSERT_OBJECT_REFCOUNT (rtp_sink, "rtp_sink", 2);
@ -409,17 +409,17 @@ GST_START_TEST (test_request_pad_by_template_name)
GstPad *rtp_sink1, *rtp_sink2, *rtp_sink3;
rtpbin = gst_element_factory_make ("rtpbin", "rtpbin");
rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%u");
rtp_sink1 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_%u");
fail_unless (rtp_sink1 != NULL);
fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "recv_rtp_sink_0");
ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%u");
rtp_sink2 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_%u");
fail_unless (rtp_sink2 != NULL);
fail_unless_equals_string (GST_PAD_NAME (rtp_sink2), "recv_rtp_sink_1");
ASSERT_OBJECT_REFCOUNT (rtp_sink2, "rtp_sink2", 2);
rtp_sink3 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_%u");
rtp_sink3 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_%u");
fail_unless (rtp_sink3 != NULL);
fail_unless_equals_string (GST_PAD_NAME (rtp_sink3), "recv_rtp_sink_2");
ASSERT_OBJECT_REFCOUNT (rtp_sink3, "rtp_sink3", 2);
@ -487,7 +487,7 @@ GST_START_TEST (test_encoder)
id = g_signal_connect (rtpbin, "request-rtp-encoder", (GCallback) encoder_cb,
bin);
rtp_sink1 = gst_element_get_request_pad (rtpbin, "send_rtp_sink_2");
rtp_sink1 = gst_element_request_pad_simple (rtpbin, "send_rtp_sink_2");
fail_unless (rtp_sink1 != NULL);
fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "send_rtp_sink_2");
ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
@ -497,7 +497,7 @@ GST_START_TEST (test_encoder)
id = g_signal_connect (rtpbin, "request-rtp-encoder", (GCallback) encoder_cb2,
bin);
rtp_sink2 = gst_element_get_request_pad (rtpbin, "send_rtp_sink_3");
rtp_sink2 = gst_element_request_pad_simple (rtpbin, "send_rtp_sink_3");
fail_unless (rtp_sink2 != NULL);
/* remove the session */
@ -547,12 +547,12 @@ GST_START_TEST (test_decoder)
id = g_signal_connect (rtpbin, "request-rtp-decoder", (GCallback) decoder_cb,
NULL);
rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_2");
rtp_sink1 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_2");
fail_unless (rtp_sink1 != NULL);
fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "recv_rtp_sink_2");
ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_3");
rtp_sink2 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_3");
fail_unless (rtp_sink2 != NULL);
g_signal_handler_disconnect (rtpbin, id);
@ -609,7 +609,7 @@ GST_START_TEST (test_aux_sender)
id = g_signal_connect (rtpbin, "request-aux-sender",
(GCallback) aux_sender_cb, aux_sender);
rtp_sink1 = gst_element_get_request_pad (rtpbin, "send_rtp_sink_2");
rtp_sink1 = gst_element_request_pad_simple (rtpbin, "send_rtp_sink_2");
fail_unless (rtp_sink1 != NULL);
fail_unless_equals_string (GST_PAD_NAME (rtp_sink1), "send_rtp_sink_2");
ASSERT_OBJECT_REFCOUNT (rtp_sink1, "rtp_sink1", 2);
@ -624,7 +624,7 @@ GST_START_TEST (test_aux_sender)
fail_unless (rtp_src != NULL);
gst_object_unref (rtp_src);
rtcp_src = gst_element_get_request_pad (rtpbin, "send_rtcp_src_1");
rtcp_src = gst_element_request_pad_simple (rtpbin, "send_rtcp_src_1");
fail_unless (rtcp_src != NULL);
gst_element_release_request_pad (rtpbin, rtcp_src);
gst_object_unref (rtcp_src);
@ -684,15 +684,15 @@ GST_START_TEST (test_aux_receiver)
id = g_signal_connect (rtpbin, "request-aux-receiver",
(GCallback) aux_receiver_cb, NULL);
rtp_sink1 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_2");
rtp_sink1 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_2");
fail_unless (rtp_sink1 != NULL);
rtp_sink2 = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_1");
rtp_sink2 = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_1");
fail_unless (rtp_sink2 != NULL);
g_signal_handler_disconnect (rtpbin, id);
rtcp_sink = gst_element_get_request_pad (rtpbin, "recv_rtcp_sink_1");
rtcp_sink = gst_element_request_pad_simple (rtpbin, "recv_rtcp_sink_1");
fail_unless (rtcp_sink != NULL);
gst_element_release_request_pad (rtpbin, rtcp_sink);
gst_object_unref (rtcp_sink);
@ -737,8 +737,9 @@ GST_START_TEST (test_sender_eos)
gst_test_clock_set_time (tclock, 0);
rtpsession = gst_element_factory_make ("rtpsession", NULL);
send_rtp_sink = gst_element_get_request_pad (rtpsession, "send_rtp_sink");
recv_rtcp_sink = gst_element_get_request_pad (rtpsession, "recv_rtcp_sink");
send_rtp_sink = gst_element_request_pad_simple (rtpsession, "send_rtp_sink");
recv_rtcp_sink =
gst_element_request_pad_simple (rtpsession, "recv_rtcp_sink");
rtp_sink = gst_check_setup_sink_pad_by_name (rtpsession, &recv_tmpl,

View file

@ -215,7 +215,7 @@ GST_START_TEST (test_master_ssrc_collision)
/* setup rtcp link */
srcpad = gst_pad_new_from_static_template (&srctemplate, "src");
rtcp_sinkpad = gst_element_get_request_pad (rtpsession, "recv_rtcp_sink");
rtcp_sinkpad = gst_element_request_pad_simple (rtpsession, "recv_rtcp_sink");
fail_unless (gst_pad_link (srcpad, rtcp_sinkpad) == GST_PAD_LINK_OK, NULL);
gst_object_unref (rtcp_sinkpad);
res = gst_pad_set_active (srcpad, TRUE);
@ -230,7 +230,7 @@ GST_START_TEST (test_master_ssrc_collision)
fake_udp_sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
gst_pad_set_chain_function (fake_udp_sinkpad, fake_udp_sink_chain_func);
rtcp_srcpad = gst_element_get_request_pad (rtpsession, "send_rtcp_src");
rtcp_srcpad = gst_element_request_pad_simple (rtpsession, "send_rtcp_src");
fail_unless (gst_pad_link (rtcp_srcpad, fake_udp_sinkpad) == GST_PAD_LINK_OK,
NULL);
gst_object_unref (rtcp_srcpad);
@ -391,7 +391,7 @@ GST_START_TEST (test_rtx_ssrc_collision)
/* setup rtcp link */
srcpad = gst_pad_new_from_static_template (&srctemplate, "src");
rtcp_sinkpad = gst_element_get_request_pad (rtpsession, "recv_rtcp_sink");
rtcp_sinkpad = gst_element_request_pad_simple (rtpsession, "recv_rtcp_sink");
fail_unless (gst_pad_link (srcpad, rtcp_sinkpad) == GST_PAD_LINK_OK, NULL);
gst_object_unref (rtcp_sinkpad);
res = gst_pad_set_active (srcpad, TRUE);
@ -406,7 +406,7 @@ GST_START_TEST (test_rtx_ssrc_collision)
fake_udp_sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink");
gst_pad_set_chain_function (fake_udp_sinkpad, fake_udp_sink_chain_func);
rtcp_srcpad = gst_element_get_request_pad (rtpsession, "send_rtcp_src");
rtcp_srcpad = gst_element_request_pad_simple (rtpsession, "send_rtcp_src");
fail_unless (gst_pad_link (rtcp_srcpad, fake_udp_sinkpad) == GST_PAD_LINK_OK,
NULL);
gst_object_unref (rtcp_srcpad);

View file

@ -123,9 +123,9 @@ test_basic (const gchar * elem_name, const gchar * sink2, int count,
rtpmux = gst_check_setup_element (elem_name);
reqpad1 = gst_element_get_request_pad (rtpmux, "sink_1");
reqpad1 = gst_element_request_pad_simple (rtpmux, "sink_1");
fail_unless (reqpad1 != NULL);
reqpad2 = gst_element_get_request_pad (rtpmux, sink2);
reqpad2 = gst_element_request_pad_simple (rtpmux, sink2);
fail_unless (reqpad2 != NULL);
sink = gst_check_setup_sink_pad_by_name (rtpmux, &sinktemplate, "src");

View file

@ -559,7 +559,7 @@ GST_START_TEST (test_splitmuxsink_reuse_simple)
GstPad *pad;
sink = gst_element_factory_make ("splitmuxsink", NULL);
pad = gst_element_get_request_pad (sink, "video");
pad = gst_element_request_pad_simple (sink, "video");
fail_unless (pad != NULL);
g_object_set (sink, "location", "/dev/null", NULL);
@ -598,13 +598,13 @@ GST_START_TEST (test_splitmuxsink_muxer_pad_map)
g_object_set (sink, "muxer", muxer, "muxer-pad-map", pad_map, NULL);
gst_structure_free (pad_map);
pad1 = gst_element_get_request_pad (sink, "video");
pad1 = gst_element_request_pad_simple (sink, "video");
fail_unless (g_str_equal ("video", GST_PAD_NAME (pad1)));
muxpad = gst_element_get_static_pad (muxer, "video_100");
fail_unless (muxpad != NULL);
gst_object_unref (muxpad);
pad2 = gst_element_get_request_pad (sink, "audio_0");
pad2 = gst_element_request_pad_simple (sink, "audio_0");
fail_unless (g_str_equal ("audio_0", GST_PAD_NAME (pad2)));
muxpad = gst_element_get_static_pad (muxer, "audio_101");
fail_unless (muxpad != NULL);

View file

@ -589,7 +589,7 @@ GST_START_TEST (test_remove_pad)
fail_unless (res == TRUE, NULL);
/* create an unconnected sinkpad in videomixer */
pad = gst_element_get_request_pad (videomixer, "sink_%u");
pad = gst_element_request_pad_simple (videomixer, "sink_%u");
fail_if (pad == NULL, NULL);
srcpad = gst_element_get_static_pad (videomixer, "src");
@ -693,7 +693,7 @@ GST_START_TEST (test_clip)
/* create an unconnected sinkpad in videomixer, should also automatically activate
* the pad */
sinkpad = gst_element_get_request_pad (videomixer, "sink_%u");
sinkpad = gst_element_request_pad_simple (videomixer, "sink_%u");
fail_if (sinkpad == NULL, NULL);
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));

View file

@ -197,21 +197,21 @@ main (int argc, char *argv[])
/* now link all to the rtpbin, start by getting an RTP sinkpad for session 0 */
srcpad = gst_element_get_static_pad (rtpsrc, "src");
sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtp_sink_0");
sinkpad = gst_element_request_pad_simple (rtpbin, "recv_rtp_sink_0");
lres = gst_pad_link (srcpad, sinkpad);
g_assert (lres == GST_PAD_LINK_OK);
gst_object_unref (srcpad);
/* get an RTCP sinkpad in session 0 */
srcpad = gst_element_get_static_pad (rtcpsrc, "src");
sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtcp_sink_0");
sinkpad = gst_element_request_pad_simple (rtpbin, "recv_rtcp_sink_0");
lres = gst_pad_link (srcpad, sinkpad);
g_assert (lres == GST_PAD_LINK_OK);
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
/* get an RTCP srcpad for sending RTCP back to the sender */
srcpad = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
srcpad = gst_element_request_pad_simple (rtpbin, "send_rtcp_src_0");
sinkpad = gst_element_get_static_pad (rtcpsink, "sink");
lres = gst_pad_link (srcpad, sinkpad);
g_assert (lres == GST_PAD_LINK_OK);

View file

@ -177,7 +177,7 @@ main (int argc, char *argv[])
gst_bin_add_many (GST_BIN (pipeline), rtpsink, rtcpsink, rtcpsrc, NULL);
/* now link all to the rtpbin, start by getting an RTP sinkpad for session 0 */
sinkpad = gst_element_get_request_pad (rtpbin, "send_rtp_sink_0");
sinkpad = gst_element_request_pad_simple (rtpbin, "send_rtp_sink_0");
srcpad = gst_element_get_static_pad (audiopay, "src");
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
g_error ("Failed to link audio payloader to rtpbin");
@ -193,7 +193,7 @@ main (int argc, char *argv[])
gst_object_unref (sinkpad);
/* get an RTCP srcpad for sending RTCP to the receiver */
srcpad = gst_element_get_request_pad (rtpbin, "send_rtcp_src_0");
srcpad = gst_element_request_pad_simple (rtpbin, "send_rtcp_src_0");
sinkpad = gst_element_get_static_pad (rtcpsink, "sink");
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
g_error ("Failed to link rtpbin to rtcpsink");
@ -202,7 +202,7 @@ main (int argc, char *argv[])
/* we also want to receive RTCP, request an RTCP sinkpad for session 0 and
* link it to the srcpad of the udpsrc for RTCP */
srcpad = gst_element_get_static_pad (rtcpsrc, "src");
sinkpad = gst_element_get_request_pad (rtpbin, "recv_rtcp_sink_0");
sinkpad = gst_element_request_pad_simple (rtpbin, "recv_rtcp_sink_0");
if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
g_error ("Failed to link rtcpsrc to rtpbin");
gst_object_unref (srcpad);