Use gst_element_request_pad_simple...
authorFrançois Laignel <fengalin@free.fr>
Tue, 20 Apr 2021 17:53:01 +0000 (19:53 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 5 May 2021 08:55:54 +0000 (11:55 +0300)
Instead of the deprecated gst_element_get_request_pad.

22 files changed:
gst/playback/gstdecodebin2.c
gst/playback/gstdecodebin3.c
gst/playback/gstplaybin2.c
gst/playback/gstplaybin3.c
gst/playback/gstplaysink.c
gst/playback/gsturidecodebin3.c
tests/check/elements/adder.c
tests/check/elements/audiointerleave.c
tests/check/elements/audiomixer.c
tests/check/elements/compositor.c
tests/check/elements/encodebin.c
tests/check/elements/streamsynchronizer.c
tests/check/elements/textoverlay.c
tests/check/pipelines/oggmux.c
tests/examples/compositor/crossfade.c
tests/examples/compositor/mosaic.c
tests/examples/decodebin_next/decodebin3.c
tests/examples/dynamic/codec-select.c
tests/examples/dynamic/sprinkle.c
tests/examples/dynamic/sprinkle2.c
tests/examples/dynamic/sprinkle3.c
tests/icles/output-selector-test.c

index d07427a..d6d645f 100644 (file)
@@ -3916,7 +3916,8 @@ gst_decode_group_control_demuxer_pad (GstDecodeGroup * group, GstPad * 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;
   }
index 230b53b..d489365 100644 (file)
@@ -2019,7 +2019,7 @@ create_new_slot (GstDecodebin3 * dbin, GstStreamType type)
   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;
 
index 961103f..400e99a 100644 (file)
@@ -3515,7 +3515,8 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
 
   /* 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));
index 512cf26..9b3b6b5 100644 (file)
@@ -2901,7 +2901,7 @@ combiner_control_pad (GstPlayBin3 * playbin, GstSourceCombine * combine,
 
   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;
index 49eecc4..095a0bb 100644 (file)
@@ -3360,7 +3360,7 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
       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);
@@ -3572,7 +3572,7 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
       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);
@@ -3627,7 +3627,7 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
       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;
@@ -3704,7 +3704,7 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
         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);
@@ -3781,7 +3781,7 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
         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);
index d6b5f2b..8802afd 100644 (file)
@@ -749,7 +749,8 @@ src_pad_added_cb (GstElement * element, GstPad * pad,
   }
 
   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,
index 37130b4..e4140bd 100644 (file)
@@ -687,7 +687,7 @@ GST_START_TEST (test_remove_pad)
   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");
@@ -783,7 +783,7 @@ GST_START_TEST (test_clip)
 
   /* 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"));
index 71348f4..fee598b 100644 (file)
@@ -72,11 +72,11 @@ GST_START_TEST (test_request_pads)
   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");
 
@@ -174,11 +174,11 @@ GST_START_TEST (test_audiointerleave_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");
 
@@ -314,11 +314,11 @@ GST_START_TEST (test_audiointerleave_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");
 
@@ -613,13 +613,13 @@ test_audiointerleave_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");
@@ -717,13 +717,13 @@ GST_START_TEST (test_audiointerleave_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");
@@ -823,13 +823,13 @@ GST_START_TEST (test_audiointerleave_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");
@@ -915,13 +915,13 @@ GST_START_TEST (test_audiointerleave_2ch_pipeline_no_chanpos)
   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");
index e654d39..b885755 100644 (file)
@@ -738,7 +738,7 @@ GST_START_TEST (test_remove_pad)
   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");
@@ -842,7 +842,7 @@ GST_START_TEST (test_clip)
 
   /* 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"));
@@ -1226,7 +1226,7 @@ run_sync_test (SendBuffersFunction send_buffers,
 
   /* 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");
@@ -1234,7 +1234,7 @@ run_sync_test (SendBuffersFunction send_buffers,
   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");
@@ -1573,13 +1573,13 @@ GST_START_TEST (test_segment_base_handling)
   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);
@@ -1647,7 +1647,7 @@ GST_START_TEST (test_sinkpad_property_controller)
   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);
@@ -1748,7 +1748,7 @@ GST_START_TEST (test_change_output_caps)
   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"));
@@ -1857,7 +1857,7 @@ GST_START_TEST (test_change_output_caps_mid_output_buffer)
   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"));
index 36acd80..843b2e7 100644 (file)
@@ -344,7 +344,7 @@ GST_START_TEST (test_caps_query)
   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);
@@ -418,7 +418,7 @@ GST_START_TEST (test_caps_query_interlaced)
   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);
@@ -445,7 +445,7 @@ GST_START_TEST (test_caps_query_interlaced)
 
   /* 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));
@@ -509,7 +509,7 @@ run_late_caps_query_test (GstCaps * input_caps, GstCaps * output_allowed_caps,
   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);
@@ -531,7 +531,7 @@ run_late_caps_query_test (GstCaps * input_caps, GstCaps * output_allowed_caps,
           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);
@@ -615,7 +615,7 @@ run_late_caps_set_test (GstCaps * first_caps, GstCaps * expected_query_caps,
   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);
@@ -1002,7 +1002,7 @@ GST_START_TEST (test_remove_pad)
   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");
@@ -1122,7 +1122,7 @@ GST_START_TEST (test_clip)
 
   /* 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"));
@@ -1432,13 +1432,13 @@ GST_START_TEST (test_segment_base_handling)
   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);
@@ -1552,7 +1552,7 @@ _test_obscured (const gchar * caps_str, gint xpos0, gint ypos0, gint width0,
   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);
@@ -1562,7 +1562,7 @@ _test_obscured (const gchar * caps_str, gint xpos0, gint ypos0, gint width0,
   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);
@@ -1752,7 +1752,7 @@ _link_videotestsrc_with_compositor (GstElement * src, GstElement * compositor,
   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);
@@ -1909,8 +1909,8 @@ GST_START_TEST (test_pad_z_order)
   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);
@@ -1927,7 +1927,7 @@ GST_START_TEST (test_pad_z_order)
   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);
@@ -1956,10 +1956,10 @@ GST_START_TEST (test_pad_numbering)
   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");
@@ -2059,7 +2059,7 @@ run_test_start_time (gboolean first, gboolean drop, gboolean unlinked)
   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);
@@ -2067,7 +2067,7 @@ run_test_start_time (gboolean first, gboolean drop, gboolean unlinked)
   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);
   }
 
index fffff1e..0e7f93f 100644 (file)
@@ -385,7 +385,7 @@ GST_START_TEST (test_encodebin_sink_pads_dynamic)
   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);
@@ -474,12 +474,12 @@ GST_START_TEST (test_encodebin_sink_pads_multiple_dynamic)
   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);
 
@@ -619,7 +619,7 @@ GST_START_TEST (test_encodebin_render_audio_only_static)
   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);
@@ -683,7 +683,7 @@ GST_START_TEST (test_encodebin_render_audio_dynamic)
   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");
 
@@ -815,7 +815,7 @@ GST_START_TEST (test_encodebin_render_audio_video_dynamic)
   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");
@@ -823,7 +823,7 @@ GST_START_TEST (test_encodebin_render_audio_video_dynamic)
   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);
index 87a14ff..43c2afa 100644 (file)
@@ -196,7 +196,7 @@ GST_START_TEST (test_basic)
   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);
index c97df51..0001f29 100644 (file)
@@ -181,7 +181,7 @@ notgst_check_setup_src_pad2 (GstElement * element,
   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);
@@ -206,7 +206,7 @@ notgst_check_teardown_src_pad2 (GstElement * element,
 
   /* 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);
 
index 1259fef..78eb8eb 100644 (file)
@@ -384,10 +384,10 @@ GST_START_TEST (test_request_pad_cleanup)
   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);
index 503503c..eff89ea 100644 (file)
@@ -48,7 +48,8 @@ static void
 _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;
 
index 2bc6a9c..23f3d11 100644 (file)
@@ -50,7 +50,8 @@ _pad_added_cb (GstElement * decodebin, GstPad * pad, VideoInfo * info)
 {
   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,
index 2b36239..c224497 100644 (file)
@@ -257,7 +257,7 @@ decodebin_pad_added_cb (GstElement * dbin, GstPad * pad, MyDataStruct * data)
   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);
   }
@@ -325,7 +325,7 @@ main (int argc, gchar ** argv)
       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;
index b01d554..fc105ad 100644 (file)
@@ -176,14 +176,14 @@ make_pipeline (void)
 
     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);
index c14afb1..da19d8e 100644 (file)
@@ -64,7 +64,7 @@ add_source (gdouble freq)
   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);
index e37004a..170c80a 100644 (file)
@@ -74,7 +74,7 @@ add_source (gdouble freq, gfloat pos)
   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);
index 91982e2..60643f6 100644 (file)
@@ -80,7 +80,7 @@ add_source (gdouble freq, gfloat pos)
   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);
index b9d3910..b145e15 100644 (file)
@@ -124,7 +124,7 @@ main (gint argc, gchar * argv[])
 
   /* 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;
@@ -138,7 +138,7 @@ main (gint argc, gchar * argv[])
 
   /* 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;