Instead of the deprecated gst_element_get_request_pad.
if (G_UNLIKELY (!group->multiqueue))
return NULL;
- if (!(sinkpad = gst_element_get_request_pad (group->multiqueue, "sink_%u"))) {
+ if (!(sinkpad =
+ gst_element_request_pad_simple (group->multiqueue, "sink_%u"))) {
GST_ERROR_OBJECT (dbin, "Couldn't get sinkpad from multiqueue");
return NULL;
}
slot->id = dbin->slot_id++;
slot->type = type;
- slot->sink_pad = gst_element_get_request_pad (dbin->multiqueue, "sink_%u");
+ slot->sink_pad = gst_element_request_pad_simple (dbin->multiqueue, "sink_%u");
if (slot->sink_pad == NULL)
goto fail;
/* get sinkpad for the new stream */
if (combine->combiner) {
- if ((sinkpad = gst_element_get_request_pad (combine->combiner, "sink_%u"))) {
+ if ((sinkpad =
+ gst_element_request_pad_simple (combine->combiner, "sink_%u"))) {
GST_DEBUG_OBJECT (playbin, "got pad %s:%s from combiner",
GST_DEBUG_PAD_NAME (sinkpad));
if (combine->combiner) {
GstPad *sinkpad =
- gst_element_get_request_pad (combine->combiner, "sink_%u");
+ gst_element_request_pad_simple (combine->combiner, "sink_%u");
if (sinkpad == NULL)
goto request_pad_failed;
GstIterator *it;
playsink->video_sinkpad_stream_synchronizer =
- gst_element_get_request_pad (GST_ELEMENT_CAST
+ gst_element_request_pad_simple (GST_ELEMENT_CAST
(playsink->stream_synchronizer), "sink_%u");
it = gst_pad_iterate_internal_links
(playsink->video_sinkpad_stream_synchronizer);
GstIterator *it;
playsink->audio_sinkpad_stream_synchronizer =
- gst_element_get_request_pad (GST_ELEMENT_CAST
+ gst_element_request_pad_simple (GST_ELEMENT_CAST
(playsink->stream_synchronizer), "sink_%u");
it = gst_pad_iterate_internal_links
(playsink->audio_sinkpad_stream_synchronizer);
GST_DEBUG_OBJECT (playsink, "adding audio chain");
if (playsink->audio_tee_asrc == NULL) {
playsink->audio_tee_asrc =
- gst_element_get_request_pad (playsink->audio_tee, "src_%u");
+ gst_element_request_pad_simple (playsink->audio_tee, "src_%u");
}
sinkpad = playsink->audio_ssync_queue_sinkpad;
activate_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
if (playsink->audio_tee_vissrc == NULL) {
playsink->audio_tee_vissrc =
- gst_element_get_request_pad (playsink->audio_tee, "src_%u");
+ gst_element_request_pad_simple (playsink->audio_tee, "src_%u");
}
gst_pad_link_full (playsink->audio_tee_vissrc,
playsink->vischain->sinkpad, GST_PAD_LINK_CHECK_NOTHING);
GValue item = { 0, };
playsink->text_sinkpad_stream_synchronizer =
- gst_element_get_request_pad (GST_ELEMENT_CAST
+ gst_element_request_pad_simple (GST_ELEMENT_CAST
(playsink->stream_synchronizer), "sink_%u");
it = gst_pad_iterate_internal_links
(playsink->text_sinkpad_stream_synchronizer);
}
if (sinkpad == NULL)
- sinkpad = gst_element_get_request_pad (uridecodebin->decodebin, "sink_%u");
+ sinkpad =
+ gst_element_request_pad_simple (uridecodebin->decodebin, "sink_%u");
if (sinkpad) {
GST_DEBUG_OBJECT (uridecodebin,
fail_unless (res == TRUE, NULL);
/* create an unconnected sinkpad in adder */
- pad = gst_element_get_request_pad (adder, "sink_%u");
+ pad = gst_element_request_pad_simple (adder, "sink_%u");
fail_if (pad == NULL, NULL);
srcpad = gst_element_get_static_pad (adder, "src");
/* create an unconnected sinkpad in adder, should also automatically activate
* the pad */
- sinkpad = gst_element_get_request_pad (adder, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (adder, "sink_%u");
fail_if (sinkpad == NULL, NULL);
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
interleave = gst_element_factory_make ("audiointerleave", 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");
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");
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");
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");
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");
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");
g_object_set (interleave, "channel-positions-from-input", FALSE, 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");
fail_unless (res == TRUE, NULL);
/* create an unconnected sinkpad in audiomixer */
- pad = gst_element_get_request_pad (audiomixer, "sink_%u");
+ pad = gst_element_request_pad_simple (audiomixer, "sink_%u");
fail_if (pad == NULL, NULL);
srcpad = gst_element_get_static_pad (audiomixer, "src");
/* create an unconnected sinkpad in audiomixer, should also automatically activate
* the pad */
- sinkpad = gst_element_get_request_pad (audiomixer, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (audiomixer, "sink_%u");
fail_if (sinkpad == NULL, NULL);
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
/* create an unconnected sinkpad in audiomixer, should also automatically activate
* the pad */
- sinkpad1 = gst_element_get_request_pad (audiomixer, "sink_%u");
+ sinkpad1 = gst_element_request_pad_simple (audiomixer, "sink_%u");
fail_if (sinkpad1 == NULL, NULL);
queue1_sinkpad = gst_element_get_static_pad (queue1, "sink");
fail_unless (gst_pad_link (pad, sinkpad1) == GST_PAD_LINK_OK);
gst_object_unref (pad);
- sinkpad2 = gst_element_get_request_pad (audiomixer, "sink_%u");
+ sinkpad2 = gst_element_request_pad_simple (audiomixer, "sink_%u");
fail_if (sinkpad2 == NULL, NULL);
queue2_sinkpad = gst_element_get_static_pad (queue2, "sink");
fail_unless (gst_element_link (mix, sink));
srcpad = gst_element_get_static_pad (src1, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_1");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_1");
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
gst_object_unref (sinkpad);
gst_object_unref (srcpad);
srcpad = gst_element_get_static_pad (src2, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_2");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_2");
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
/* set a pad offset of another 5 seconds */
gst_pad_set_offset (sinkpad, 5 * GST_SECOND);
fail_unless (gst_element_link (mix, sink));
srcpad = gst_element_get_static_pad (src1, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_0");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_0");
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
set_pad_volume_fade (sinkpad, 0, 0, 1.0, 2.0);
gst_object_unref (sinkpad);
state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
- sinkpad = gst_element_get_request_pad (audiomixer, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (audiomixer, "sink_%u");
fail_if (sinkpad == NULL, NULL);
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
state_res = gst_element_set_state (bin, GST_STATE_PLAYING);
ck_assert_int_ne (state_res, GST_STATE_CHANGE_FAILURE);
- sinkpad = gst_element_get_request_pad (audiomixer, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (audiomixer, "sink_%u");
fail_if (sinkpad == NULL, NULL);
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
res = gst_element_link (capsfilter, sink);
fail_unless (res == TRUE, NULL);
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
state_res = gst_element_set_state (pipeline, GST_STATE_PLAYING);
fail_if (state_res == GST_STATE_CHANGE_FAILURE);
gst_bin_add_many (GST_BIN (pipeline), compositor, sink, NULL);
res = gst_element_link (compositor, sink);
fail_unless (res == TRUE, NULL);
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
state_res = gst_element_set_state (pipeline, GST_STATE_PLAYING);
fail_if (state_res == GST_STATE_CHANGE_FAILURE);
/* now recheck the interlace-mode */
gst_object_unref (sinkpad);
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
caps = gst_pad_query_caps (sinkpad, NULL);
fail_if (gst_caps_can_intersect (caps, caps_interleaved));
fail_unless (gst_caps_can_intersect (caps, caps_progressive));
res = gst_element_link (capsfilter, sink);
fail_unless (res == TRUE, NULL);
- sinkpad1 = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad1 = gst_element_request_pad_simple (compositor, "sink_%u");
srcpad1 = gst_pad_new ("src1", GST_PAD_SRC);
fail_unless (gst_pad_link (srcpad1, sinkpad1) == GST_PAD_LINK_OK);
gst_pad_set_active (srcpad1, TRUE);
create_video_buffer (input_caps, 1)) == GST_FLOW_OK);
/* now comes the second pad */
- sinkpad2 = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad2 = gst_element_request_pad_simple (compositor, "sink_%u");
srcpad2 = gst_pad_new ("src2", GST_PAD_SRC);
fail_unless (gst_pad_link (srcpad2, sinkpad2) == GST_PAD_LINK_OK);
gst_pad_set_active (srcpad2, TRUE);
gst_message_unref (msg);
/* try to set the second caps */
- sinkpad_2 = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad_2 = gst_element_request_pad_simple (compositor, "sink_%u");
caps = gst_pad_query_caps (sinkpad_2, NULL);
fail_unless (gst_caps_is_subset (expected_query_caps, caps));
gst_caps_unref (caps);
fail_unless (res == TRUE, NULL);
/* create an unconnected sinkpad in compositor */
- pad = gst_element_get_request_pad (compositor, "sink_%u");
+ pad = gst_element_request_pad_simple (compositor, "sink_%u");
fail_if (pad == NULL, NULL);
srcpad = gst_element_get_static_pad (compositor, "src");
/* create an unconnected sinkpad in compositor, should also automatically activate
* the pad */
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
fail_if (sinkpad == NULL, NULL);
gst_pad_send_event (sinkpad, gst_event_new_stream_start ("test"));
fail_unless (gst_element_link (mix, sink));
srcpad = gst_element_get_static_pad (src1, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_1");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_1");
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
gst_object_unref (sinkpad);
gst_object_unref (srcpad);
srcpad = gst_element_get_static_pad (src2, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_2");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_2");
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
gst_pad_set_offset (sinkpad, 5 * GST_SECOND);
gst_object_unref (sinkpad);
fail_unless (gst_element_link (out_cfilter, sink));
srcpad = gst_element_get_static_pad (cfilter0, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_0");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_0");
g_object_set (sinkpad, "xpos", xpos0, "ypos", ypos0, "width", width0,
"height", height0, "alpha", alpha0, NULL);
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
gst_object_unref (srcpad);
srcpad = gst_element_get_static_pad (cfilter1, "src");
- sinkpad = gst_element_get_request_pad (mix, "sink_1");
+ sinkpad = gst_element_request_pad_simple (mix, "sink_1");
g_object_set (sinkpad, "xpos", xpos1, "ypos", ypos1, "width", width1,
"height", height1, "alpha", alpha1, NULL);
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
GstPadLinkReturn link_res;
srcpad = gst_element_get_static_pad (src, "src");
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
/* When "repeat-after-eos" is set, compositor will keep sending the last buffer even
* after EOS, so we will receive more buffers than we sent. */
g_object_set (sinkpad, "repeat-after-eos", repeat_after_eos, NULL);
GST_INFO ("preparing test");
compositor = gst_element_factory_make ("compositor", NULL);
- sinkpad1 = gst_element_get_request_pad (compositor, "sink_%u");
- sinkpad2 = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad1 = gst_element_request_pad_simple (compositor, "sink_%u");
+ sinkpad2 = gst_element_request_pad_simple (compositor, "sink_%u");
/* Pads requested later have a higher z-order than earlier ones by default */
g_object_get (sinkpad1, "zorder", &zorder1, NULL);
ck_assert_ptr_eq (sinkpads->next->data, sinkpad1);
/* Get a new pad, which should be the highest pad now */
- sinkpad3 = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad3 = gst_element_request_pad_simple (compositor, "sink_%u");
sinkpads = GST_ELEMENT (compositor)->sinkpads;
ck_assert_ptr_eq (sinkpads->data, sinkpad2);
ck_assert_ptr_eq (sinkpads->next->data, sinkpad1);
GST_INFO ("preparing test");
mixer = gst_element_factory_make ("compositor", NULL);
- sinkpad1 = gst_element_get_request_pad (mixer, "sink_%u");
- sinkpad2 = gst_element_get_request_pad (mixer, "sink_7");
- sinkpad3 = gst_element_get_request_pad (mixer, "sink_1");
- sinkpad4 = gst_element_get_request_pad (mixer, "sink_%u");
+ sinkpad1 = gst_element_request_pad_simple (mixer, "sink_%u");
+ sinkpad2 = gst_element_request_pad_simple (mixer, "sink_7");
+ sinkpad3 = gst_element_request_pad_simple (mixer, "sink_1");
+ sinkpad4 = gst_element_request_pad_simple (mixer, "sink_%u");
ck_assert_str_eq (GST_PAD_NAME (sinkpad1), "sink_0");
ck_assert_str_eq (GST_PAD_NAME (sinkpad2), "sink_7");
res = gst_element_link (compositor, appsink);
ck_assert_msg (res == TRUE, "Could not link compositor with appsink");
srcpad = gst_element_get_static_pad (src, "src");
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
link_res = gst_pad_link (srcpad, sinkpad);
ck_assert_msg (GST_PAD_LINK_SUCCESSFUL (link_res), "videotestsrc -> "
"compositor pad link failed: %i", link_res);
gst_object_unref (srcpad);
if (unlinked) {
- sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (compositor, "sink_%u");
gst_object_unref (sinkpad);
}
gst_object_unref (srcpad);
/* Check if the audio sink pad can be requested */
- sinkpad = gst_element_get_request_pad (ebin, "audio_0");
+ sinkpad = gst_element_request_pad_simple (ebin, "audio_0");
fail_unless (sinkpad != NULL);
_caps_match (sinkpad, "audio/x-raw;audio/x-vorbis");
gst_element_release_request_pad (ebin, sinkpad);
gst_object_unref (srcpad);
/* Check if the audio sink pad was properly created */
- sinkpadvorbis = gst_element_get_request_pad (ebin, "audio_0");
+ sinkpadvorbis = gst_element_request_pad_simple (ebin, "audio_0");
_caps_match (sinkpadvorbis, "audio/x-raw;audio/x-vorbis");
fail_unless (sinkpadvorbis != NULL);
/* Check if the video sink pad was properly created */
- sinkpadtheora = gst_element_get_request_pad (ebin, "video_1");
+ sinkpadtheora = gst_element_request_pad_simple (ebin, "video_1");
_caps_match (sinkpadtheora, "video/x-raw;video/x-theora");
fail_unless (sinkpadtheora != NULL);
fail_unless (gst_element_link_many (audiotestsrc, ebin, fakesink, NULL));
/* Requesting a new pad should fail */
- ASSERT_CRITICAL (gst_element_get_request_pad (ebin, "audio_0"));
+ ASSERT_CRITICAL (gst_element_request_pad_simple (ebin, "audio_0"));
sinkcaps = gst_caps_new_empty_simple ("audio/x-raw");
g_signal_emit_by_name (ebin, "request-pad", sinkcaps, &sinkpad);
srcpad = gst_element_get_static_pad (audiotestsrc, "src");
fail_unless (srcpad != NULL);
- sinkpad = gst_element_get_request_pad (ebin, "audio_0");
+ sinkpad = gst_element_request_pad_simple (ebin, "audio_0");
fail_unless (sinkpad != NULL);
_caps_match (sinkpad, "audio/x-raw;audio/x-vorbis");
fail_unless (gst_element_link (ebin, fakesink));
srcpad = gst_element_get_static_pad (audiotestsrc, "src");
- sinkpad1 = gst_element_get_request_pad (ebin, "audio_0");
+ sinkpad1 = gst_element_request_pad_simple (ebin, "audio_0");
fail_unless (srcpad != NULL);
fail_unless (sinkpad1 != NULL);
_caps_match (sinkpad1, "audio/x-raw;audio/x-vorbis");
gst_object_unref (srcpad);
srcpad = gst_element_get_static_pad (videotestsrc, "src");
- sinkpad2 = gst_element_get_request_pad (ebin, "video_1");
+ sinkpad2 = gst_element_request_pad_simple (ebin, "video_1");
_caps_match (sinkpad2, "video/x-raw;video/x-theora");
fail_unless_equals_int (gst_pad_link (srcpad, sinkpad2), GST_PAD_LINK_OK);
gst_object_unref (srcpad);
synchr = gst_element_factory_make ("streamsynchronizer", NULL);
/* Get sinkpad/srcpad */
- sinkpad = gst_element_get_request_pad (synchr, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (synchr, "sink_%u");
fail_unless (sinkpad != NULL);
srcpad = get_other_pad (sinkpad);
fail_unless (srcpad != NULL);
ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
if (!(sinkpad = gst_element_get_static_pad (element, sink_template_name)))
- sinkpad = gst_element_get_request_pad (element, sink_template_name);
+ sinkpad = gst_element_request_pad_simple (element, sink_template_name);
fail_if (sinkpad == NULL, "Could not get sink pad from %s",
GST_ELEMENT_NAME (element));
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
/* clean up floating src pad */
if (!(sinkpad = gst_element_get_static_pad (element, sink_template_name)))
- sinkpad = gst_element_get_request_pad (element, sink_template_name);
+ sinkpad = gst_element_request_pad_simple (element, sink_template_name);
ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
srcpad = gst_pad_get_peer (sinkpad);
GstPad *pad;
oggmux = gst_element_factory_make ("oggmux", NULL);
- pad = gst_element_get_request_pad (oggmux, "video_%u");
+ pad = gst_element_request_pad_simple (oggmux, "video_%u");
fail_unless (pad != NULL);
gst_object_unref (pad);
- pad = gst_element_get_request_pad (oggmux, "audio_%u");
+ pad = gst_element_request_pad_simple (oggmux, "audio_%u");
fail_unless (pad != NULL);
gst_object_unref (pad);
gst_object_unref (oggmux);
_pad_added_cb (GstElement * decodebin, GstPad * pad, VideoInfo * info)
{
GstPad *sinkpad =
- gst_element_get_request_pad (GST_ELEMENT (info->compositor), "sink_%u");
+ gst_element_request_pad_simple (GST_ELEMENT (info->compositor),
+ "sink_%u");
GstControlSource *control_source;
gboolean is_last = info->z_order == 1;
{
GstStructure *converter_config;
GstPad *sinkpad =
- gst_element_get_request_pad (GST_ELEMENT (info->compositor), "sink_%u");
+ gst_element_request_pad_simple (GST_ELEMENT (info->compositor),
+ "sink_%u");
converter_config = gst_structure_new ("GstVideoConverter",
GST_VIDEO_CONVERTER_OPT_THREADS, G_TYPE_UINT, 0,
if (sink_pad) {
GstPad *playsink_pad;
- playsink_pad = gst_element_get_request_pad (data->playsink, sink_pad);
+ playsink_pad = gst_element_request_pad_simple (data->playsink, sink_pad);
if (playsink_pad)
gst_pad_link (pad, playsink_pad);
}
data->other_src = g_list_append (data->other_src, new_src);
gst_bin_add ((GstBin *) data->pipeline, new_src);
src_pad = gst_element_get_static_pad (new_src, "src");
- sink_pad = gst_element_get_request_pad (data->decodebin, "sink_%u");
+ sink_pad = gst_element_request_pad_simple (data->decodebin, "sink_%u");
if (gst_pad_link (src_pad, sink_pad) != GST_PAD_LINK_OK) {
g_printf ("Could not link new source to decodebin : %s\n", argv[i]);
return 1;
gst_bin_add (GST_BIN (result), encoder);
- srcpad = gst_element_get_request_pad (outputselect, "src_%u");
+ srcpad = gst_element_request_pad_simple (outputselect, "src_%u");
sinkpad = gst_element_get_static_pad (encoder, "sink");
gst_pad_link (srcpad, sinkpad);
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
srcpad = gst_element_get_static_pad (encoder, "src");
- sinkpad = gst_element_get_request_pad (inputselect, "sink_%u");
+ sinkpad = gst_element_request_pad_simple (inputselect, "sink_%u");
gst_pad_link (srcpad, sinkpad);
gst_object_unref (srcpad);
gst_object_unref (sinkpad);
info->srcpad = gst_element_get_static_pad (info->element, "src");
/* get new pad from adder, adder will now wait for data on this pad */
- info->sinkpad = gst_element_get_request_pad (adder, "sink_%u");
+ info->sinkpad = gst_element_request_pad_simple (adder, "sink_%u");
/* link pad to adder */
gst_pad_link (info->srcpad, info->sinkpad);
info->fx_sinkpad = gst_element_get_static_pad (info->fx, "sink");
/* get new pad from adder, adder will now wait for data on this pad */
- info->adder_sinkpad = gst_element_get_request_pad (adder, "sink_%u");
+ info->adder_sinkpad = gst_element_request_pad_simple (adder, "sink_%u");
/* link src to fx and fx to adder */
gst_pad_link (info->fx_srcpad, info->adder_sinkpad);
gst_element_add_pad (info->bin, info->bin_srcpad);
/* get new pad from adder, adder will now wait for data on this pad */
- info->adder_sinkpad = gst_element_get_request_pad (adder, "sink_%u");
+ info->adder_sinkpad = gst_element_request_pad_simple (adder, "sink_%u");
/* link inside the bin */
gst_pad_link (info->src_srcpad, info->fx_sinkpad);
/* link output 1 */
sinkpad = gst_element_get_static_pad (c1, "sink");
- osel_src1 = gst_element_get_request_pad (osel, "src_%u");
+ osel_src1 = gst_element_request_pad_simple (osel, "src_%u");
if (gst_pad_link (osel_src1, sinkpad) != GST_PAD_LINK_OK) {
g_print ("linking output 1 converter failed\n");
return -1;
/* link output 2 */
sinkpad = gst_element_get_static_pad (c2, "sink");
- osel_src2 = gst_element_get_request_pad (osel, "src_%u");
+ osel_src2 = gst_element_request_pad_simple (osel, "src_%u");
if (gst_pad_link (osel_src2, sinkpad) != GST_PAD_LINK_OK) {
g_print ("linking output 2 converter failed\n");
return -1;