Don't use bad gst_element_get_pad().
authorWim Taymans <wim.taymans@gmail.com>
Wed, 21 May 2008 16:36:50 +0000 (16:36 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 21 May 2008 16:36:50 +0000 (16:36 +0000)
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
* gst/playback/decodetest.c: (new_decoded_pad_cb):
* gst/playback/gstdecodebin.c: (gst_decode_bin_init),
(try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
(cleanup_decodebin):
* gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
(connect_element), (gst_decode_group_control_demuxer_pad):
* gst/playback/gstplaybasebin.c: (queue_remove_probe),
(queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
(mute_group_type):
* gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
(gst_play_bin_set_property), (handoff), (gen_video_element),
(gen_text_element), (gen_audio_element), (gen_vis_element),
(remove_sinks), (add_sink), (setup_sinks):
* gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
* gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
(gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
(gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
(gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
(gen_video_chain), (gen_text_chain), (gen_audio_chain),
(gen_vis_chain), (gst_play_sink_reconfigure),
(gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
(gst_play_sink_request_pad):
* gst/playback/gsturidecodebin.c: (type_found), (setup_source):
* gst/playback/test.c: (gen_video_element), (gen_audio_element),
(cb_newpad):
* gst/playback/test6.c: (new_decoded_pad_cb):
* tests/check/elements/audioconvert.c: (GST_START_TEST):
* tests/check/elements/audiorate.c: (test_injector_chain),
(do_perfect_stream_test):
* tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
* tests/check/elements/gdpdepay.c: (GST_START_TEST):
* tests/check/elements/gnomevfssink.c:
* tests/check/elements/textoverlay.c:
(notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
* tests/check/libs/cddabasesrc.c: (GST_START_TEST):
* tests/check/pipelines/oggmux.c: (test_pipeline):
* tests/check/pipelines/streamheader.c: (GST_START_TEST):
* tests/check/pipelines/theoraenc.c: (GST_START_TEST):
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
* tests/examples/seek/scrubby.c: (make_wav_pipeline):
* tests/examples/seek/seek.c: (make_mod_pipeline),
(make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
(make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
(make_theora_pipeline), (make_vorbis_theora_pipeline),
(make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
(make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
(update_fill), (msg_buffering):
Don't use bad gst_element_get_pad().

27 files changed:
ChangeLog
common
ext/ogg/gstoggdemux.c
gst/playback/decodetest.c
gst/playback/gstdecodebin.c
gst/playback/gstdecodebin2.c
gst/playback/gstplaybasebin.c
gst/playback/gstplaybin.c
gst/playback/gstplaybin2.c
gst/playback/gstplaysink.c
gst/playback/gsturidecodebin.c
gst/playback/test.c
gst/playback/test6.c
tests/check/elements/audioconvert.c
tests/check/elements/audiorate.c
tests/check/elements/ffmpegcolorspace.c
tests/check/elements/gdpdepay.c
tests/check/elements/gnomevfssink.c
tests/check/elements/textoverlay.c
tests/check/elements/videotestsrc.c
tests/check/libs/cddabasesrc.c
tests/check/pipelines/oggmux.c
tests/check/pipelines/streamheader.c
tests/check/pipelines/theoraenc.c
tests/check/pipelines/vorbisenc.c
tests/examples/seek/scrubby.c
tests/examples/seek/seek.c

index 5c958d2..c7ea517 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+2008-05-21  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       * ext/ogg/gstoggdemux.c: (gst_ogg_pad_typefind):
+       * gst/playback/decodetest.c: (new_decoded_pad_cb):
+       * gst/playback/gstdecodebin.c: (gst_decode_bin_init),
+       (try_to_link_1), (elem_is_dynamic), (close_link), (type_found),
+       (cleanup_decodebin):
+       * gst/playback/gstdecodebin2.c: (gst_decode_bin_init),
+       (connect_element), (gst_decode_group_control_demuxer_pad):
+       * gst/playback/gstplaybasebin.c: (queue_remove_probe),
+       (queue_out_of_data), (gen_preroll_element), (preroll_unlinked),
+       (mute_group_type):
+       * gst/playback/gstplaybin.c: (gst_play_bin_vis_blocked),
+       (gst_play_bin_set_property), (handoff), (gen_video_element),
+       (gen_text_element), (gen_audio_element), (gen_vis_element),
+       (remove_sinks), (add_sink), (setup_sinks):
+       * gst/playback/gstplaybin2.c: (pad_added_cb), (no_more_pads_cb):
+       * gst/playback/gstplaysink.c: (gst_play_sink_get_video_sink),
+       (gst_play_sink_get_audio_sink), (gst_play_sink_vis_unblocked),
+       (gst_play_sink_vis_blocked), (gst_play_sink_set_vis_plugin),
+       (gst_play_sink_get_vis_plugin), (gst_play_sink_set_mute),
+       (gen_video_chain), (gen_text_chain), (gen_audio_chain),
+       (gen_vis_chain), (gst_play_sink_reconfigure),
+       (gst_play_sink_set_font_desc), (gst_play_sink_get_font_desc),
+       (gst_play_sink_request_pad):
+       * gst/playback/gsturidecodebin.c: (type_found), (setup_source):
+       * gst/playback/test.c: (gen_video_element), (gen_audio_element),
+       (cb_newpad):
+       * gst/playback/test6.c: (new_decoded_pad_cb):
+       * tests/check/elements/audioconvert.c: (GST_START_TEST):
+       * tests/check/elements/audiorate.c: (test_injector_chain),
+       (do_perfect_stream_test):
+       * tests/check/elements/ffmpegcolorspace.c: (GST_START_TEST):
+       * tests/check/elements/gdpdepay.c: (GST_START_TEST):
+       * tests/check/elements/gnomevfssink.c:
+       * tests/check/elements/textoverlay.c:
+       (notgst_check_setup_src_pad2), (notgst_check_teardown_src_pad2):
+       * tests/check/elements/videotestsrc.c: (GST_START_TEST):
+       * tests/check/libs/cddabasesrc.c: (GST_START_TEST):
+       * tests/check/pipelines/oggmux.c: (test_pipeline):
+       * tests/check/pipelines/streamheader.c: (GST_START_TEST):
+       * tests/check/pipelines/theoraenc.c: (GST_START_TEST):
+       * tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
+       * tests/examples/seek/scrubby.c: (make_wav_pipeline):
+       * tests/examples/seek/seek.c: (make_mod_pipeline),
+       (make_dv_pipeline), (make_wav_pipeline), (make_flac_pipeline),
+       (make_sid_pipeline), (make_parse_pipeline), (make_vorbis_pipeline),
+       (make_theora_pipeline), (make_vorbis_theora_pipeline),
+       (make_avi_msmpeg4v3_mp3_pipeline), (make_mp3_pipeline),
+       (make_avi_pipeline), (make_mpeg_pipeline), (make_mpegnt_pipeline),
+       (update_fill), (msg_buffering):
+       Don't use bad gst_element_get_pad().
+
 2008-05-21  Stefan Kost  <ensonic@users.sf.net>
 
        * gst-libs/gst/riff/riff-media.c:
diff --git a/common b/common
index d074950..5e77192 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit d0749502b0e891038593866f619a75305367b409
+Subproject commit 5e771924d59d9ac912237ea466d0c60ad95df5ab
index 16c19d6..c1d6840 100644 (file)
@@ -767,7 +767,7 @@ gst_ogg_pad_typefind (GstOggPad * pad, ogg_packet * packet)
         gst_object_sink (GST_OBJECT (element));
 
         /* FIXME, it might not be named "sink" */
-        pad->elem_pad = gst_element_get_pad (element, "sink");
+        pad->elem_pad = gst_element_get_static_pad (element, "sink");
         gst_element_set_state (element, GST_STATE_PAUSED);
         template = gst_static_pad_template_get (&internaltemplate);
         pad->elem_out = gst_pad_new_from_template (template, "internal");
@@ -781,7 +781,7 @@ gst_ogg_pad_typefind (GstOggPad * pad, ogg_packet * packet)
         {
           GstPad *p;
 
-          p = gst_element_get_pad (element, "src");
+          p = gst_element_get_static_pad (element, "src");
           if (p) {
             gst_pad_link (p, pad->elem_out);
             gst_object_unref (p);
index b982f1c..dd81c6b 100644 (file)
@@ -79,7 +79,7 @@ new_decoded_pad_cb (GstElement * decodebin, GstPad * pad, gboolean last,
   GstPad *fakesink_pad;
 
   fakesink = gst_element_factory_make ("fakesink", NULL);
-  fakesink_pad = gst_element_get_pad (fakesink, "sink");
+  fakesink_pad = gst_element_get_static_pad (fakesink, "sink");
 
   gst_bin_add (GST_BIN (pipeline), fakesink);
 
index 039babd..0f2e8dd 100644 (file)
@@ -337,7 +337,7 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
     }
 
     /* get the sinkpad */
-    pad = gst_element_get_pad (decode_bin->typefind, "sink");
+    pad = gst_element_get_static_pad (decode_bin->typefind, "sink");
 
     /* ghost the sink pad to ourself */
     gpad = gst_ghost_pad_new ("sink", pad);
@@ -919,8 +919,8 @@ try_to_link_1 (GstDecodeBin * decode_bin, GstElement * srcelement, GstPad * pad,
     g_object_set (G_OBJECT (queue), "max-size-bytes", 8192, NULL);
     gst_bin_add (GST_BIN (decode_bin), queue);
     gst_element_set_state (queue, GST_STATE_READY);
-    queuesinkpad = gst_element_get_pad (queue, "sink");
-    usedsrcpad = queuesrcpad = gst_element_get_pad (queue, "src");
+    queuesinkpad = gst_element_get_static_pad (queue, "sink");
+    usedsrcpad = queuesrcpad = gst_element_get_static_pad (queue, "src");
 
     dqlink = gst_pad_link (pad, queuesinkpad);
     g_return_val_if_fail (dqlink == GST_PAD_LINK_OK, NULL);
@@ -947,7 +947,7 @@ try_to_link_1 (GstDecodeBin * decode_bin, GstElement * srcelement, GstPad * pad,
     /* try to link the given pad to a sinkpad */
     /* FIXME, find the sinkpad by looping over the pads instead of
      * looking it up by name */
-    if ((sinkpad = gst_element_get_pad (element, "sink")) == NULL) {
+    if ((sinkpad = gst_element_get_static_pad (element, "sink")) == NULL) {
       /* if no pad is found we can't do anything */
       GST_WARNING_OBJECT (decode_bin, "could not find sinkpad in element");
       continue;
@@ -1418,7 +1418,7 @@ elem_is_dynamic (GstElement * element, GstDecodeBin * decode_bin)
       {
         /* try to get the pad to see if it is already created or
          * not */
-        GstPad *pad = gst_element_get_pad (element, templ_name);
+        GstPad *pad = gst_element_get_static_pad (element, templ_name);
 
         if (pad) {
           GST_DEBUG_OBJECT (decode_bin, "got the pad for sometimes template %s",
@@ -1505,7 +1505,7 @@ close_link (GstElement * element, GstDecodeBin * decode_bin)
       case GST_PAD_ALWAYS:
       {
         /* get the pad that we need to autoplug */
-        GstPad *pad = gst_element_get_pad (element, templ_name);
+        GstPad *pad = gst_element_get_static_pad (element, templ_name);
 
         if (pad) {
           GST_DEBUG_OBJECT (decode_bin, "got the pad for always template %s",
@@ -1524,7 +1524,7 @@ close_link (GstElement * element, GstDecodeBin * decode_bin)
       {
         /* try to get the pad to see if it is already created or
          * not */
-        GstPad *pad = gst_element_get_pad (element, templ_name);
+        GstPad *pad = gst_element_get_static_pad (element, templ_name);
 
         if (pad) {
           GST_DEBUG_OBJECT (decode_bin, "got the pad for sometimes template %s",
@@ -1625,7 +1625,7 @@ type_found (GstElement * typefind, guint probability, GstCaps * caps,
   }
 
   /* autoplug the new pad with the caps that the signal gave us. */
-  pad = gst_element_get_pad (typefind, "src");
+  pad = gst_element_get_static_pad (typefind, "src");
   close_pad_link (typefind, pad, caps, decode_bin, FALSE);
   gst_object_unref (pad);
 
@@ -1691,7 +1691,7 @@ cleanup_decodebin (GstDecodeBin * decode_bin)
 
   GST_DEBUG_OBJECT (decode_bin, "cleaning up decodebin");
 
-  typefind_pad = gst_element_get_pad (decode_bin->typefind, "src");
+  typefind_pad = gst_element_get_static_pad (decode_bin->typefind, "src");
   if (GST_IS_PAD (typefind_pad)) {
     g_signal_handlers_block_by_func (typefind_pad, (gpointer) unlinked,
         decode_bin);
index d871acc..521d319 100644 (file)
@@ -598,7 +598,7 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
     }
 
     /* get the sinkpad */
-    pad = gst_element_get_pad (decode_bin->typefind, "sink");
+    pad = gst_element_get_static_pad (decode_bin->typefind, "sink");
 
     /* ghost the sink pad to ourself */
     gpad = gst_ghost_pad_new ("sink", pad);
@@ -1249,7 +1249,7 @@ connect_element (GstDecodeBin * dbin, GstElement * element,
       case GST_PAD_ALWAYS:
       {
         /* get the pad that we need to autoplug */
-        GstPad *pad = gst_element_get_pad (element, templ_name);
+        GstPad *pad = gst_element_get_static_pad (element, templ_name);
 
         if (pad) {
           GST_DEBUG_OBJECT (dbin, "got the pad for always template %s",
@@ -1268,7 +1268,7 @@ connect_element (GstDecodeBin * dbin, GstElement * element,
       {
         /* try to get the pad to see if it is already created or
          * not */
-        GstPad *pad = gst_element_get_pad (element, templ_name);
+        GstPad *pad = gst_element_get_static_pad (element, templ_name);
 
         if (pad) {
           GST_DEBUG_OBJECT (dbin, "got the pad for sometimes template %s",
@@ -1739,7 +1739,7 @@ gst_decode_group_control_demuxer_pad (GstDecodeGroup * group, GstPad * pad)
 
   GROUP_MUTEX_LOCK (group);
 
-  if (!(srcpad = gst_element_get_pad (group->multiqueue, srcname))) {
+  if (!(srcpad = gst_element_get_static_pad (group->multiqueue, srcname))) {
     GST_ERROR ("Couldn't get srcpad %s from multiqueue", srcname);
     goto chiringuito;
   }
index 58de4c5..d44f272 100644 (file)
@@ -628,7 +628,7 @@ queue_remove_probe (GstElement * queue, GstPlayBaseBin * play_base_bin)
   GstPad *sinkpad;
 
   data = g_object_get_data (G_OBJECT (queue), "probe");
-  sinkpad = gst_element_get_pad (queue, "sink");
+  sinkpad = gst_element_get_static_pad (queue, "sink");
 
   if (data) {
     GST_DEBUG_OBJECT (play_base_bin,
@@ -752,7 +752,7 @@ queue_out_of_data (GstElement * queue, GstPlayBaseBin * play_base_bin)
     GstPad *sinkpad;
     guint id;
 
-    sinkpad = gst_element_get_pad (queue, "sink");
+    sinkpad = gst_element_get_static_pad (queue, "sink");
     id = gst_pad_add_buffer_probe (sinkpad, G_CALLBACK (check_queue), queue);
     g_object_set_data (G_OBJECT (queue), "probe", GINT_TO_POINTER (id));
     GST_DEBUG_OBJECT (play_base_bin,
@@ -863,7 +863,7 @@ gen_preroll_element (GstPlayBaseBin * play_base_bin,
     g_object_set_data (G_OBJECT (preroll), "pbb", play_base_bin);
 
     /* give updates on queue size */
-    sinkpad = gst_element_get_pad (preroll, "sink");
+    sinkpad = gst_element_get_static_pad (preroll, "sink");
     id = gst_pad_add_buffer_probe (sinkpad, G_CALLBACK (check_queue), preroll);
     GST_DEBUG_OBJECT (play_base_bin, "Attaching probe to pad %s:%s (%p)",
         GST_DEBUG_PAD_NAME (sinkpad), sinkpad);
@@ -884,7 +884,7 @@ gen_preroll_element (GstPlayBaseBin * play_base_bin,
   }
 
   /* listen for EOS so we can switch groups when one ended. */
-  preroll_pad = gst_element_get_pad (preroll, "src");
+  preroll_pad = gst_element_get_static_pad (preroll, "src");
   gst_pad_add_event_probe (preroll_pad, G_CALLBACK (probe_triggered), info);
   gst_object_unref (preroll_pad);
 
@@ -1250,7 +1250,7 @@ preroll_unlinked (GstPad * pad, GstPad * peerpad,
 
   GST_DEBUG ("patching unlinked pad %s:%s", GST_DEBUG_PAD_NAME (pad));
 
-  srcpad = gst_element_get_pad (fakesrc, "src");
+  srcpad = gst_element_get_static_pad (fakesrc, "src");
   gst_bin_add (GST_BIN_CAST (play_base_bin), fakesrc);
   gst_pad_link (srcpad, pad);
   gst_object_unref (srcpad);
@@ -2345,13 +2345,13 @@ mute_group_type (GstPlayBaseGroup * group, GstStreamType type, gboolean mute)
   gboolean active = !mute;
   GstPad *pad;
 
-  pad = gst_element_get_pad (group->type[type - 1].preroll, "src");
+  pad = gst_element_get_static_pad (group->type[type - 1].preroll, "src");
   gst_pad_set_active (pad, active);
   gst_object_unref (pad);
-  pad = gst_element_get_pad (group->type[type - 1].preroll, "sink");
+  pad = gst_element_get_static_pad (group->type[type - 1].preroll, "sink");
   gst_pad_set_active (pad, active);
   gst_object_unref (pad);
-  pad = gst_element_get_pad (group->type[type - 1].selector, "src");
+  pad = gst_element_get_static_pad (group->type[type - 1].selector, "src");
   gst_pad_set_active (pad, active);
   gst_object_unref (pad);
 
index 90f9d3e..1c9bbe0 100644 (file)
@@ -537,7 +537,7 @@ gst_play_bin_vis_blocked (GstPad * tee_pad, gboolean blocked,
     goto beach;
   }
 
-  vis_src_pad = gst_element_get_pad (play_bin->visualisation, "src");
+  vis_src_pad = gst_element_get_static_pad (play_bin->visualisation, "src");
   vis_sink_pad = gst_pad_get_peer (tee_pad);
 
   /* Can be fakesink */
@@ -580,8 +580,8 @@ gst_play_bin_vis_blocked (GstPad * tee_pad, gboolean blocked,
     /* Synchronizing state */
     gst_element_set_state (pending_visualisation, bin_state);
 
-    vis_sink_pad = gst_element_get_pad (pending_visualisation, "sink");
-    vis_src_pad = gst_element_get_pad (pending_visualisation, "src");
+    vis_sink_pad = gst_element_get_static_pad (pending_visualisation, "sink");
+    vis_src_pad = gst_element_get_static_pad (pending_visualisation, "src");
 
     if (!GST_IS_PAD (vis_sink_pad) || !GST_IS_PAD (vis_src_pad)) {
       goto beach;
@@ -681,7 +681,7 @@ gst_play_bin_set_property (GObject * object, guint prop_id,
             GstPad *vis_sink_pad = NULL, *tee_pad = NULL;
 
             /* Now get tee pad and block it async */
-            vis_sink_pad = gst_element_get_pad (play_bin->visualisation,
+            vis_sink_pad = gst_element_get_static_pad (play_bin->visualisation,
                 "sink");
             if (!GST_IS_PAD (vis_sink_pad)) {
               goto beach;
@@ -780,7 +780,7 @@ handoff (GstElement * identity, GstBuffer * frame, gpointer data)
   if (GST_BUFFER_CAPS (frame) == NULL) {
     GstPad *pad;
 
-    if ((pad = gst_element_get_pad (identity, "sink"))) {
+    if ((pad = gst_element_get_static_pad (identity, "sink"))) {
       gst_buffer_set_caps (frame, GST_PAD_CAPS (pad));
       gst_object_unref (pad);
     }
@@ -869,7 +869,7 @@ gen_video_element (GstPlayBin * play_bin)
   if (!gst_element_link_pads (scale, "src", sink, NULL))
     goto link_failed;
 
-  pad = gst_element_get_pad (identity, "sink");
+  pad = gst_element_get_static_pad (identity, "sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
@@ -975,11 +975,11 @@ gen_text_element (GstPlayBin * play_bin)
   gst_element_link_pads (overlay, "src", vbin, "sink");
 
   /* Add ghost pads on the subtitle bin */
-  pad = gst_element_get_pad (overlay, "text_sink");
+  pad = gst_element_get_static_pad (overlay, "text_sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("text_sink", pad));
   gst_object_unref (pad);
 
-  pad = gst_element_get_pad (csp, "sink");
+  pad = gst_element_get_static_pad (csp, "sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
@@ -1067,7 +1067,7 @@ gen_audio_element (GstPlayBin * play_bin)
   if (!res)
     goto link_failed;
 
-  pad = gst_element_get_pad (conv, "sink");
+  pad = gst_element_get_static_pad (conv, "sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
@@ -1217,20 +1217,20 @@ gen_vis_element (GstPlayBin * play_bin)
   if (!res)
     goto link_failed;
 
-  pad = gst_element_get_pad (aqueue, "sink");
+  pad = gst_element_get_static_pad (aqueue, "sink");
   rpad = gst_element_get_request_pad (tee, "src%d");
   gst_pad_link (rpad, pad);
   gst_object_unref (rpad);
   gst_object_unref (pad);
   gst_element_link_pads (aqueue, "src", asink, "sink");
 
-  pad = gst_element_get_pad (vqueue, "sink");
+  pad = gst_element_get_static_pad (vqueue, "sink");
   rpad = gst_element_get_request_pad (tee, "src%d");
   gst_pad_link (rpad, pad);
   gst_object_unref (rpad);
   gst_object_unref (pad);
 
-  pad = gst_element_get_pad (tee, "sink");
+  pad = gst_element_get_static_pad (tee, "sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
@@ -1298,7 +1298,7 @@ remove_sinks (GstPlayBin * play_bin)
       gst_bin_remove (GST_BIN_CAST (parent), element);
       gst_object_unref (parent);
     }
-    pad = gst_element_get_pad (element, "sink");
+    pad = gst_element_get_static_pad (element, "sink");
     if (pad != NULL) {
       peer = gst_pad_get_peer (pad);
       if (peer != NULL) {
@@ -1317,7 +1317,7 @@ remove_sinks (GstPlayBin * play_bin)
       gst_bin_remove (GST_BIN_CAST (parent), element);
       gst_object_unref (parent);
     }
-    pad = gst_element_get_pad (element, "sink");
+    pad = gst_element_get_static_pad (element, "sink");
     if (pad != NULL) {
       peer = gst_pad_get_peer (pad);
       if (peer != NULL) {
@@ -1333,7 +1333,7 @@ remove_sinks (GstPlayBin * play_bin)
     GstPad *pad;
     GstPad *peer;
 
-    pad = gst_element_get_pad (element, "sink");
+    pad = gst_element_get_static_pad (element, "sink");
 
     GST_LOG ("removing sink %p", element);
 
@@ -1417,7 +1417,7 @@ add_sink (GstPlayBin * play_bin, GstElement * sink, GstPad * srcpad,
     goto state_failed;
 
   /* we found a sink for this stream, now try to install it */
-  sinkpad = gst_element_get_pad (sink, "sink");
+  sinkpad = gst_element_get_static_pad (sink, "sink");
   linkres = gst_pad_link (srcpad, sinkpad);
   gst_object_unref (sinkpad);
 
@@ -1426,7 +1426,7 @@ add_sink (GstPlayBin * play_bin, GstElement * sink, GstPad * srcpad,
     goto link_failed;
 
   if (GST_IS_PAD (subtitle_pad)) {
-    sinkpad = gst_element_get_pad (sink, "text_sink");
+    sinkpad = gst_element_get_static_pad (sink, "text_sink");
     linkres = gst_pad_link (subtitle_pad, sinkpad);
     gst_object_unref (sinkpad);
   }
@@ -1527,8 +1527,9 @@ setup_sinks (GstPlayBaseBin * play_base_bin, GstPlayBaseGroup * group)
     if (!sink)
       return FALSE;
 
-    pad = gst_element_get_pad (group->type[GST_STREAM_TYPE_AUDIO - 1].preroll,
-        "src");
+    pad =
+        gst_element_get_static_pad (group->type[GST_STREAM_TYPE_AUDIO -
+            1].preroll, "src");
     res = add_sink (play_bin, sink, pad, NULL);
     gst_object_unref (pad);
   }
@@ -1541,8 +1542,8 @@ setup_sinks (GstPlayBaseBin * play_base_bin, GstPlayBaseGroup * group)
 
       sink = gen_text_element (play_bin);
       textsrcpad =
-          gst_element_get_pad (group->type[GST_STREAM_TYPE_TEXT - 1].preroll,
-          "src");
+          gst_element_get_static_pad (group->type[GST_STREAM_TYPE_TEXT -
+              1].preroll, "src");
 
       /* This pad is from subtitle-bin, we need to create a ghost pad to have
          common grandparents */
@@ -1608,8 +1609,9 @@ setup_sinks (GstPlayBaseBin * play_base_bin, GstPlayBaseGroup * group)
   beach:
     if (!sink)
       return FALSE;
-    pad = gst_element_get_pad (group->type[GST_STREAM_TYPE_VIDEO - 1].preroll,
-        "src");
+    pad =
+        gst_element_get_static_pad (group->type[GST_STREAM_TYPE_VIDEO -
+            1].preroll, "src");
     res = add_sink (play_bin, sink, pad, textsrcpad);
     gst_object_unref (pad);
     if (textsrcpad)
index 92d5793..e3178d7 100644 (file)
@@ -1462,7 +1462,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
     gst_element_set_state (select->selector, GST_STATE_PAUSED);
 
     /* save source pad */
-    select->srcpad = gst_element_get_pad (select->selector, "src");
+    select->srcpad = gst_element_get_static_pad (select->selector, "src");
   }
 
   /* get sinkpad for the new stream */
index b1903b8..18d052e 100644 (file)
@@ -396,8 +396,8 @@ gst_play_sink_vis_blocked (GstPad * tee_pad, gboolean blocked,
   gst_element_set_state (chain->vis, GST_STATE_PLAYING);
 
   /* get pads */
-  chain->vissinkpad = gst_element_get_pad (chain->vis, "sink");
-  chain->vissrcpad = gst_element_get_pad (chain->vis, "src");
+  chain->vissinkpad = gst_element_get_static_pad (chain->vis, "sink");
+  chain->vissrcpad = gst_element_get_static_pad (chain->vis, "src");
 
   /* link pads */
   gst_pad_link (chain->blockpad, chain->vissinkpad);
@@ -717,11 +717,11 @@ gen_video_chain (GstPlaySink * playsink, gboolean raw, gboolean async)
     if (!gst_element_link_pads (chain->scale, "src", chain->sink, NULL))
       goto link_failed;
 
-    pad = gst_element_get_pad (chain->queue, "sink");
+    pad = gst_element_get_static_pad (chain->queue, "sink");
   } else {
     if (!gst_element_link_pads (chain->queue, "src", chain->sink, NULL))
       goto link_failed;
-    pad = gst_element_get_pad (chain->queue, "sink");
+    pad = gst_element_get_static_pad (chain->queue, "sink");
   }
 
   chain->sinkpad = gst_ghost_pad_new ("sink", pad);
@@ -818,17 +818,17 @@ gen_text_chain (GstPlaySink * playsink)
   gst_element_link_pads (chain->conv, "src", chain->overlay, "video_sink");
 
   /* Add ghost pads on the subtitle bin */
-  pad = gst_element_get_pad (chain->overlay, "text_sink");
+  pad = gst_element_get_static_pad (chain->overlay, "text_sink");
   chain->textsinkpad = gst_ghost_pad_new ("text_sink", pad);
   gst_object_unref (pad);
   gst_element_add_pad (chain->chain.bin, chain->textsinkpad);
 
-  pad = gst_element_get_pad (chain->conv, "sink");
+  pad = gst_element_get_static_pad (chain->conv, "sink");
   chain->videosinkpad = gst_ghost_pad_new ("sink", pad);
   gst_object_unref (pad);
   gst_element_add_pad (chain->chain.bin, chain->videosinkpad);
 
-  pad = gst_element_get_pad (chain->overlay, "src");
+  pad = gst_element_get_static_pad (chain->overlay, "src");
   chain->srcpad = gst_ghost_pad_new ("src", pad);
   gst_object_unref (pad);
   gst_element_add_pad (chain->chain.bin, chain->srcpad);
@@ -968,16 +968,16 @@ gen_audio_chain (GstPlaySink * playsink, gboolean raw, gboolean queue)
 
     if (queue) {
       res = gst_element_link_pads (chain->queue, "src", chain->conv, "sink");
-      pad = gst_element_get_pad (chain->queue, "sink");
+      pad = gst_element_get_static_pad (chain->queue, "sink");
     } else {
-      pad = gst_element_get_pad (chain->conv, "sink");
+      pad = gst_element_get_static_pad (chain->conv, "sink");
     }
   } else {
     if (queue) {
       res = gst_element_link_pads (chain->queue, "src", chain->sink, "sink");
-      pad = gst_element_get_pad (chain->queue, "sink");
+      pad = gst_element_get_static_pad (chain->queue, "sink");
     } else {
-      pad = gst_element_get_pad (chain->sink, "sink");
+      pad = gst_element_get_static_pad (chain->sink, "sink");
     }
   }
   /* post a warning if we have no way to configure the volume */
@@ -1082,7 +1082,7 @@ gen_vis_chain (GstPlaySink * playsink)
 
   /* this pad will be used for blocking the dataflow and switching the vis
    * plugin */
-  chain->blockpad = gst_element_get_pad (chain->resample, "src");
+  chain->blockpad = gst_element_get_static_pad (chain->resample, "src");
 
   if (playsink->visualisation) {
     chain->vis = gst_object_ref (playsink->visualisation);
@@ -1099,10 +1099,10 @@ gen_vis_chain (GstPlaySink * playsink)
   if (!res)
     goto link_failed;
 
-  chain->vissinkpad = gst_element_get_pad (chain->vis, "sink");
-  chain->vissrcpad = gst_element_get_pad (chain->vis, "src");
+  chain->vissinkpad = gst_element_get_static_pad (chain->vis, "sink");
+  chain->vissrcpad = gst_element_get_static_pad (chain->vis, "src");
 
-  pad = gst_element_get_pad (chain->queue, "sink");
+  pad = gst_element_get_static_pad (chain->queue, "sink");
   chain->sinkpad = gst_ghost_pad_new ("sink", pad);
   gst_object_unref (pad);
   gst_element_add_pad (chain->chain.bin, chain->sinkpad);
@@ -1292,8 +1292,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
     GST_DEBUG_OBJECT (playsink, "adding visualisation");
 
     srcpad =
-        gst_element_get_pad (GST_ELEMENT_CAST (playsink->vischain->chain.bin),
-        "src");
+        gst_element_get_static_pad (GST_ELEMENT_CAST (playsink->vischain->chain.
+            bin), "src");
     add_chain (GST_PLAY_CHAIN (playsink->vischain), TRUE);
     gst_pad_link (playsink->audio_tee_vissrc, playsink->vischain->sinkpad);
     gst_pad_link (srcpad, playsink->videochain->sinkpad);
@@ -1458,7 +1458,7 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type)
          * and the vis chain. */
         playsink->audio_tee = gst_element_factory_make ("tee", "audiotee");
         playsink->audio_tee_sink =
-            gst_element_get_pad (playsink->audio_tee, "sink");
+            gst_element_get_static_pad (playsink->audio_tee, "sink");
         /* get two request pads */
         playsink->audio_tee_vissrc =
             gst_element_get_request_pad (playsink->audio_tee, "src%d");
index 590e302..e4bf2f0 100644 (file)
@@ -1095,7 +1095,7 @@ type_found (GstElement * typefind, guint probability,
     goto no_queue2;
 
   g_object_set (G_OBJECT (queue), "use-buffering", TRUE, NULL);
-  //g_object_set (G_OBJECT (queue), "temp-location", "temp", NULL);
+//  g_object_set (G_OBJECT (queue), "temp-location", "temp", NULL);
 
   gst_bin_add (GST_BIN_CAST (decoder), queue);
 
index 7117b63..3c944ec 100644 (file)
@@ -42,7 +42,7 @@ gen_video_element (void)
   gst_bin_add (GST_BIN (element), sink);
   gst_element_link_pads (conv, "src", sink, "sink");
 
-  pad = gst_element_get_pad (conv, "sink");
+  pad = gst_element_get_static_pad (conv, "sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
@@ -65,7 +65,7 @@ gen_audio_element (void)
   gst_bin_add (GST_BIN (element), sink);
   gst_element_link_pads (conv, "src", sink, "sink");
 
-  pad = gst_element_get_pad (conv, "sink");
+  pad = gst_element_get_static_pad (conv, "sink");
   gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
@@ -112,7 +112,7 @@ cb_newpad (GstElement * decodebin, GstPad * pad, gboolean last, gpointer data)
       goto state_error;
 
     /* get the ghostpad of the sink bin */
-    sinkpad = gst_element_get_pad (sink, "sink");
+    sinkpad = gst_element_get_static_pad (sink, "sink");
 
     /* link'n'play */
     lret = gst_pad_link (pad, sinkpad);
index 6dd5a24..17e50f9 100644 (file)
@@ -37,7 +37,7 @@ new_decoded_pad_cb (GstElement * decodebin, GstPad * new_pad, gboolean last,
   fakesink = gst_element_factory_make ("fakesink", NULL);
   gst_bin_add (GST_BIN (pipeline), fakesink);
 
-  sinkpad = gst_element_get_pad (fakesink, "sink");
+  sinkpad = gst_element_get_static_pad (fakesink, "sink");
   if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, sinkpad))) {
     g_warning ("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME (new_pad),
         GST_DEBUG_PAD_NAME (sinkpad));
index 0bd2aff..becb7a6 100644 (file)
@@ -1188,7 +1188,7 @@ GST_START_TEST (test_caps_negotiation)
   ac2 = gst_element_factory_make ("audioconvert", "ac2");
   ac3 = gst_element_factory_make ("audioconvert", "ac3");
   sink = gst_element_factory_make ("fakesink", "sink");
-  ac3_src = gst_element_get_pad (ac3, "src");
+  ac3_src = gst_element_get_static_pad (ac3, "src");
 
   /* test with 2 audioconvert elements */
   gst_bin_add_many (GST_BIN (pipeline), src, ac1, ac3, sink, NULL);
index 97fe8c0..75654dd 100644 (file)
@@ -79,7 +79,8 @@ test_injector_chain (GstPad * pad, GstBuffer * buf)
   GstFlowReturn ret;
   GstPad *srcpad;
 
-  srcpad = gst_element_get_pad (GST_ELEMENT (GST_PAD_PARENT (pad)), "src");
+  srcpad =
+      gst_element_get_static_pad (GST_ELEMENT (GST_PAD_PARENT (pad)), "src");
 
   /* since we're increasing timestamp/offsets, push this one first */
   GST_LOG (" passing buffer   [t=%" GST_TIME_FORMAT "-%" GST_TIME_FORMAT
@@ -223,7 +224,7 @@ do_perfect_stream_test (guint rate, guint width, gdouble drop_probability,
 
   injector = GST_ELEMENT (g_object_new (test_injector_get_type (), NULL));
 
-  srcpad = gst_element_get_pad (injector, "src");
+  srcpad = gst_element_get_static_pad (injector, "src");
   fail_unless (srcpad != NULL);
   gst_pad_add_buffer_probe (srcpad, G_CALLBACK (probe_cb), &drop_probability);
   gst_object_unref (srcpad);
index 5c4764d..60179c6 100644 (file)
@@ -287,7 +287,7 @@ GST_START_TEST (test_rgb_to_rgb)
   fail_unless (gst_element_link (csp, filter2));
   fail_unless (gst_element_link (filter2, sink));
 
-  srcpad = gst_element_get_pad (src, "src");
+  srcpad = gst_element_get_static_pad (src, "src");
   template_caps = gst_pad_get_pad_template_caps (srcpad);
   gst_object_unref (srcpad);
 
index 55f23b3..b88d32b 100644 (file)
@@ -120,7 +120,7 @@ GST_START_TEST (test_audio_per_byte)
   pk = gst_dp_packetizer_new (GST_DP_VERSION_1_0);
 
   gdpdepay = setup_gdpdepay ();
-  srcpad = gst_element_get_pad (gdpdepay, "src");
+  srcpad = gst_element_get_static_pad (gdpdepay, "src");
 
   fail_unless (gst_element_set_state (gdpdepay,
           GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
@@ -196,7 +196,7 @@ GST_START_TEST (test_audio_in_one_buffer)
   pk = gst_dp_packetizer_new (GST_DP_VERSION_1_0);
 
   gdpdepay = setup_gdpdepay ();
-  srcpad = gst_element_get_pad (gdpdepay, "src");
+  srcpad = gst_element_get_static_pad (gdpdepay, "src");
 
   fail_unless (gst_element_set_state (gdpdepay,
           GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
@@ -298,7 +298,7 @@ GST_START_TEST (test_streamheader)
   pk = gst_dp_packetizer_new (GST_DP_VERSION_1_0);
 
   gdpdepay = setup_gdpdepay_streamheader ();
-  srcpad = gst_element_get_pad (gdpdepay, "src");
+  srcpad = gst_element_get_static_pad (gdpdepay, "src");
   ASSERT_OBJECT_REFCOUNT (gdpdepay, "gdpdepay", 1);
 
   fail_unless (gst_element_set_state (gdpdepay,
index 61effa7..f0cf64d 100644 (file)
@@ -71,12 +71,12 @@ cleanup_gnomevfssink (GstElement * gnomevfssink)
       fail_unless_equals_int (pos, position);                            \
     } G_STMT_END
 #else
-#define CHECK_QUERY_POSITION(gnomevfssink,format,position)                   \
+#define CHECK_QUERY_POSITION(gnomevfssink,format,position)               \
     G_STMT_START {                                                       \
       GstFormat fmt = format;                                            \
       GstPad *pad;                                                       \
       gint64 pos;                                                        \
-      pad = gst_element_get_pad (gnomevfssink, "sink");                      \
+      pad = gst_element_get_static_pad (gnomevfssink, "sink");           \
       fail_unless (gst_pad_query_position (pad, &fmt, &pos));            \
       fail_unless_equals_int (pos, position);                            \
       gst_object_unref (pad);                                            \
index c5ad320..63dd31d 100644 (file)
@@ -86,7 +86,8 @@ notgst_check_setup_src_pad2 (GstElement * element,
   fail_if (srcpad == NULL, "Could not create a srcpad");
   ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 1);
 
-  sinkpad = gst_element_get_pad (element, sink_template_name);
+  if (!(sinkpad = gst_element_get_static_pad (element, sink_template_name)))
+    sinkpad = gst_element_get_request_pad (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);
@@ -110,7 +111,8 @@ notgst_check_teardown_src_pad2 (GstElement * element,
     sink_template_name = "sink";
 
   /* clean up floating src pad */
-  sinkpad = gst_element_get_pad (element, sink_template_name);
+  if (!(sinkpad = gst_element_get_static_pad (element, sink_template_name)))
+    sinkpad = gst_element_get_request_pad (element, sink_template_name);
   ASSERT_OBJECT_REFCOUNT (sinkpad, "sinkpad", 2);
   srcpad = gst_pad_get_peer (sinkpad);
 
index a2a8c7b..827c5b3 100644 (file)
@@ -283,7 +283,7 @@ GST_START_TEST (test_rgb_formats)
   fail_unless (gst_element_link (src, filter));
   fail_unless (gst_element_link (filter, sink));
 
-  srcpad = gst_element_get_pad (src, "src");
+  srcpad = gst_element_get_static_pad (src, "src");
   template_caps = gst_pad_get_pad_template_caps (srcpad);
   gst_object_unref (srcpad);
 
index c737c8c..bada500 100644 (file)
@@ -310,7 +310,7 @@ GST_START_TEST (test_buffer_timestamps)
   fakesink = gst_element_factory_make ("fakesink", "fakesink");
   gst_bin_add_many (GST_BIN (pipeline), foosrc, fakesink, NULL);
   fail_unless (gst_element_link (foosrc, fakesink));
-  sinkpad = gst_element_get_pad (fakesink, "sink");
+  sinkpad = gst_element_get_static_pad (fakesink, "sink");
 
   GST_CD_FOO_SRC (foosrc)->cur_disc = 0;
 
index dbb607b..07abf13 100644 (file)
@@ -270,7 +270,7 @@ test_pipeline (const char *pipeline)
   sink = gst_element_factory_make ("fakesink", "fake_sink");
   fail_unless (sink != NULL, "Could create fakesink");
   fail_unless (gst_bin_add (GST_BIN (bin), sink), "Could not insert fakesink");
-  sinkpad = gst_element_get_pad (sink, "sink");
+  sinkpad = gst_element_get_static_pad (sink, "sink");
   fail_unless (sinkpad != NULL, "Could not get fakesink src pad");
 
   linkret = gst_pad_link (pad, sinkpad);
index ebd86e4..daf3179 100644 (file)
@@ -91,7 +91,7 @@ GST_START_TEST (test_multifdsink_gdp_tag)
   depay = gst_bin_get_by_name (GST_BIN (p2), "depay");
   fail_if (depay == NULL);
 
-  pad = gst_element_get_pad (depay, "src");
+  pad = gst_element_get_static_pad (depay, "src");
   fail_unless (pad != NULL, "Could not get pad out of depay");
   gst_object_unref (depay);
 
@@ -188,7 +188,7 @@ GST_START_TEST (test_multifdsink_gdp_vorbisenc)
   depay = gst_bin_get_by_name (GST_BIN (p2), "depay");
   fail_if (depay == NULL);
 
-  pad = gst_element_get_pad (depay, "src");
+  pad = gst_element_get_static_pad (depay, "src");
   fail_unless (pad != NULL, "Could not get pad out of depay");
   gst_object_unref (depay);
 
index 76cb8a9..818627a 100644 (file)
@@ -148,7 +148,7 @@ GST_START_TEST (test_granulepos_offset)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0");
 
     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-    pad = gst_element_get_pad (sink, "sink");
+    pad = gst_element_get_static_pad (sink, "sink");
     fail_unless (pad != NULL, "Could not get pad out of fakesink");
     gst_object_unref (sink);
   }
@@ -241,7 +241,7 @@ GST_START_TEST (test_continuity)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0");
 
     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-    pad = gst_element_get_pad (sink, "sink");
+    pad = gst_element_get_static_pad (sink, "sink");
     fail_unless (pad != NULL, "Could not get pad out of fakesink");
     gst_object_unref (sink);
   }
@@ -342,7 +342,7 @@ GST_START_TEST (test_discontinuity)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "theoraenc0");
 
     fail_unless (sink != NULL, "Could not get theoraenc out of bin");
-    droppad = gst_element_get_pad (sink, "sink");
+    droppad = gst_element_get_static_pad (sink, "sink");
     fail_unless (droppad != NULL, "Could not get pad out of theoraenc");
     gst_object_unref (sink);
   }
@@ -352,7 +352,7 @@ GST_START_TEST (test_discontinuity)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0");
 
     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-    pad = gst_element_get_pad (sink, "sink");
+    pad = gst_element_get_static_pad (sink, "sink");
     fail_unless (pad != NULL, "Could not get pad out of fakesink");
     gst_object_unref (sink);
   }
index 0f2bff0..b207dff 100644 (file)
@@ -108,7 +108,7 @@ GST_START_TEST (test_granulepos_offset)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fakesink0");
 
     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-    pad = gst_element_get_pad (sink, "sink");
+    pad = gst_element_get_static_pad (sink, "sink");
     fail_unless (pad != NULL, "Could not get pad out of fakesink");
     gst_object_unref (sink);
   }
@@ -199,7 +199,7 @@ GST_START_TEST (test_timestamps)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fakesink0");
 
     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-    pad = gst_element_get_pad (sink, "sink");
+    pad = gst_element_get_static_pad (sink, "sink");
     fail_unless (pad != NULL, "Could not get pad out of fakesink");
     gst_object_unref (sink);
   }
@@ -292,7 +292,7 @@ GST_START_TEST (test_discontinuity)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "vorbisenc0");
 
     fail_unless (sink != NULL, "Could not get vorbisenc out of bin");
-    droppad = gst_element_get_pad (sink, "sink");
+    droppad = gst_element_get_static_pad (sink, "sink");
     fail_unless (droppad != NULL, "Could not get pad out of vorbisenc");
     gst_object_unref (sink);
   }
@@ -302,7 +302,7 @@ GST_START_TEST (test_discontinuity)
     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fakesink0");
 
     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-    pad = gst_element_get_pad (sink, "sink");
+    pad = gst_element_get_static_pad (sink, "sink");
     fail_unless (pad != NULL, "Could not get pad out of fakesink");
     gst_object_unref (sink);
   }
index f619b87..5883303 100644 (file)
@@ -109,8 +109,8 @@ make_wav_pipeline (const gchar * location)
 
   gst_element_link (src, decoder);
 
-  setup_dynamic_link (decoder, "src", gst_element_get_pad (audiosink, "sink"),
-      NULL);
+  setup_dynamic_link (decoder, "src", gst_element_get_static_pad (audiosink,
+          "sink"), NULL);
 
   return pipeline;
 }
index 6d15d99..56f11ba 100644 (file)
@@ -185,10 +185,11 @@ make_mod_pipeline (const gchar * location)
   gst_element_link (src, decoder);
   gst_element_link (decoder, audiosink);
 
-  seekable = gst_element_get_pad (decoder, "src");
+  seekable = gst_element_get_static_pad (decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (decoder, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
 
   return pipeline;
 }
@@ -226,12 +227,12 @@ make_dv_pipeline (const gchar * location)
   gst_element_link (v_queue, decoder);
   gst_element_link (decoder, videosink);
 
-  setup_dynamic_link (demux, "video", gst_element_get_pad (v_queue, "sink"),
-      NULL);
-  setup_dynamic_link (demux, "audio", gst_element_get_pad (a_queue, "sink"),
-      NULL);
+  setup_dynamic_link (demux, "video", gst_element_get_static_pad (v_queue,
+          "sink"), NULL);
+  setup_dynamic_link (demux, "audio", gst_element_get_static_pad (a_queue,
+          "sink"), NULL);
 
-  seekable = gst_element_get_pad (decoder, "src");
+  seekable = gst_element_get_static_pad (decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
 
@@ -258,8 +259,8 @@ make_wav_pipeline (const gchar * location)
 
   gst_element_link (src, decoder);
 
-  setup_dynamic_link (decoder, "src", gst_element_get_pad (audiosink, "sink"),
-      NULL);
+  setup_dynamic_link (decoder, "src", gst_element_get_static_pad (audiosink,
+          "sink"), NULL);
 
   seekable_elements = g_list_prepend (seekable_elements, audiosink);
 
@@ -292,10 +293,11 @@ make_flac_pipeline (const gchar * location)
   gst_element_link (src, decoder);
   gst_element_link (decoder, audiosink);
 
-  seekable = gst_element_get_pad (decoder, "src");
+  seekable = gst_element_get_static_pad (decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (decoder, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
 
   return pipeline;
 }
@@ -323,10 +325,11 @@ make_sid_pipeline (const gchar * location)
   gst_element_link (src, decoder);
   gst_element_link (decoder, audiosink);
 
-  seekable = gst_element_get_pad (decoder, "src");
+  seekable = gst_element_get_static_pad (decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (decoder, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
 
   return pipeline;
 }
@@ -355,10 +358,11 @@ make_parse_pipeline (const gchar * location)
   gst_element_link (src, parser);
   gst_element_link (parser, fakesink);
 
-  seekable = gst_element_get_pad (parser, "src");
+  seekable = gst_element_get_static_pad (parser, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (parser, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (parser, "sink"));
 
   return pipeline;
 }
@@ -394,17 +398,18 @@ make_vorbis_pipeline (const gchar * location)
   gst_element_link (decoder, convert);
   gst_element_link (convert, audiosink);
 
-  pad = gst_element_get_pad (decoder, "sink");
+  pad = gst_element_get_static_pad (decoder, "sink");
   gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, NULL, gst_element_get_pad (audio_bin, "sink"),
-      NULL);
+  setup_dynamic_link (demux, NULL, gst_element_get_static_pad (audio_bin,
+          "sink"), NULL);
 
-  seekable = gst_element_get_pad (decoder, "src");
+  seekable = gst_element_get_static_pad (decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (decoder, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
 
   return pipeline;
 }
@@ -439,17 +444,18 @@ make_theora_pipeline (const gchar * location)
   gst_element_link (decoder, convert);
   gst_element_link (convert, videosink);
 
-  pad = gst_element_get_pad (decoder, "sink");
+  pad = gst_element_get_static_pad (decoder, "sink");
   gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, NULL, gst_element_get_pad (video_bin, "sink"),
-      NULL);
+  setup_dynamic_link (demux, NULL, gst_element_get_static_pad (video_bin,
+          "sink"), NULL);
 
-  seekable = gst_element_get_pad (decoder, "src");
+  seekable = gst_element_get_static_pad (decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (decoder, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
 
   return pipeline;
 }
@@ -492,12 +498,12 @@ make_vorbis_theora_pipeline (const gchar * location)
   gst_element_link (a_decoder, a_convert);
   gst_element_link (a_convert, audiosink);
 
-  pad = gst_element_get_pad (a_queue, "sink");
+  pad = gst_element_get_static_pad (a_queue, "sink");
   gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, NULL, gst_element_get_pad (audio_bin, "sink"),
-      NULL);
+  setup_dynamic_link (demux, NULL, gst_element_get_static_pad (audio_bin,
+          "sink"), NULL);
 
   video_bin = gst_bin_new ("v_decoder_bin");
   v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
@@ -518,18 +524,19 @@ make_vorbis_theora_pipeline (const gchar * location)
   gst_element_link_many (v_queue, v_decoder, v_convert, v_scale, videosink,
       NULL);
 
-  pad = gst_element_get_pad (v_queue, "sink");
+  pad = gst_element_get_static_pad (v_queue, "sink");
   gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, NULL, gst_element_get_pad (video_bin, "sink"),
-      NULL);
+  setup_dynamic_link (demux, NULL, gst_element_get_static_pad (video_bin,
+          "sink"), NULL);
 
-  seekable = gst_element_get_pad (a_decoder, "src");
+  seekable = gst_element_get_static_pad (a_decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (a_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
+          "sink"));
 
   return pipeline;
 }
@@ -571,12 +578,12 @@ make_avi_msmpeg4v3_mp3_pipeline (const gchar * location)
 
   gst_bin_add (GST_BIN (pipeline), audio_bin);
 
-  pad = gst_element_get_pad (a_queue, "sink");
+  pad = gst_element_get_static_pad (a_queue, "sink");
   gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, NULL, gst_element_get_pad (audio_bin, "sink"),
-      NULL);
+  setup_dynamic_link (demux, NULL, gst_element_get_static_pad (audio_bin,
+          "sink"), NULL);
 
   video_bin = gst_bin_new ("v_decoder_bin");
   v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
@@ -594,18 +601,19 @@ make_avi_msmpeg4v3_mp3_pipeline (const gchar * location)
 
   gst_bin_add (GST_BIN (pipeline), video_bin);
 
-  pad = gst_element_get_pad (v_queue, "sink");
+  pad = gst_element_get_static_pad (v_queue, "sink");
   gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, NULL, gst_element_get_pad (video_bin, "sink"),
-      NULL);
+  setup_dynamic_link (demux, NULL, gst_element_get_static_pad (video_bin,
+          "sink"), NULL);
 
-  seekable = gst_element_get_pad (a_decoder, "src");
+  seekable = gst_element_get_static_pad (a_decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (a_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
+          "sink"));
 
   return pipeline;
 }
@@ -638,10 +646,11 @@ make_mp3_pipeline (const gchar * location)
   gst_element_link (decoder, queue);
   gst_element_link (queue, osssink);
 
-  seekable = gst_element_get_pad (queue, "src");
+  seekable = gst_element_get_static_pad (queue, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
-  rate_pads = g_list_prepend (rate_pads, gst_element_get_pad (decoder, "sink"));
+  rate_pads =
+      g_list_prepend (rate_pads, gst_element_get_static_pad (decoder, "sink"));
 
   return pipeline;
 }
@@ -677,14 +686,15 @@ make_avi_pipeline (const gchar * location)
   gst_bin_add (GST_BIN (audio_bin), audiosink);
   gst_element_set_state (audio_bin, GST_STATE_PAUSED);
 
-  setup_dynamic_link (demux, "audio_00", gst_element_get_pad (a_decoder,
+  setup_dynamic_link (demux, "audio_00", gst_element_get_static_pad (a_decoder,
           "sink"), audio_bin);
 
-  seekable = gst_element_get_pad (a_queue, "src");
+  seekable = gst_element_get_static_pad (a_queue, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (a_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
+          "sink"));
 
   video_bin = gst_bin_new ("v_decoder_bin");
   v_decoder = gst_element_factory_make_or_warn ("ffmpegdecall", "v_dec");
@@ -698,14 +708,15 @@ make_avi_pipeline (const gchar * location)
 
   gst_element_set_state (video_bin, GST_STATE_PAUSED);
 
-  setup_dynamic_link (demux, "video_00", gst_element_get_pad (v_decoder,
+  setup_dynamic_link (demux, "video_00", gst_element_get_static_pad (v_decoder,
           "sink"), video_bin);
 
-  seekable = gst_element_get_pad (v_queue, "src");
+  seekable = gst_element_get_static_pad (v_queue, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (v_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (v_decoder,
+          "sink"));
 
   return pipeline;
 }
@@ -745,11 +756,11 @@ make_mpeg_pipeline (const gchar * location)
 
   gst_bin_add (GST_BIN (pipeline), audio_bin);
 
-  pad = gst_element_get_pad (a_decoder, "sink");
+  pad = gst_element_get_static_pad (a_decoder, "sink");
   gst_element_add_pad (audio_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, "audio_c0", gst_element_get_pad (audio_bin,
+  setup_dynamic_link (demux, "audio_c0", gst_element_get_static_pad (audio_bin,
           "sink"), NULL);
 
   video_bin = gst_bin_new ("v_decoder_bin");
@@ -769,18 +780,19 @@ make_mpeg_pipeline (const gchar * location)
 
   gst_bin_add (GST_BIN (pipeline), video_bin);
 
-  pad = gst_element_get_pad (v_decoder, "sink");
+  pad = gst_element_get_static_pad (v_decoder, "sink");
   gst_element_add_pad (video_bin, gst_ghost_pad_new ("sink", pad));
   gst_object_unref (pad);
 
-  setup_dynamic_link (demux, "video_e0", gst_element_get_pad (video_bin,
+  setup_dynamic_link (demux, "video_e0", gst_element_get_static_pad (video_bin,
           "sink"), NULL);
 
-  seekable = gst_element_get_pad (v_filter, "src");
+  seekable = gst_element_get_static_pad (v_filter, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (v_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (v_decoder,
+          "sink"));
 
   return pipeline;
 }
@@ -820,14 +832,15 @@ make_mpegnt_pipeline (const gchar * location)
   gst_bin_add (GST_BIN (audio_bin), a_queue);
   gst_bin_add (GST_BIN (audio_bin), audiosink);
 
-  setup_dynamic_link (demux, "audio_00", gst_element_get_pad (a_decoder,
+  setup_dynamic_link (demux, "audio_00", gst_element_get_static_pad (a_decoder,
           "sink"), audio_bin);
 
-  seekable = gst_element_get_pad (a_queue, "src");
+  seekable = gst_element_get_static_pad (a_queue, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (a_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (a_decoder,
+          "sink"));
 
   video_bin = gst_bin_new ("v_decoder_bin");
   v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec");
@@ -837,14 +850,15 @@ make_mpegnt_pipeline (const gchar * location)
 
   gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL);
 
-  setup_dynamic_link (demux, "video_00", gst_element_get_pad (v_decoder,
+  setup_dynamic_link (demux, "video_00", gst_element_get_static_pad (v_decoder,
           "sink"), video_bin);
 
-  seekable = gst_element_get_pad (v_decoder, "src");
+  seekable = gst_element_get_static_pad (v_decoder, "src");
   seekable_pads = g_list_prepend (seekable_pads, seekable);
   rate_pads = g_list_prepend (rate_pads, seekable);
   rate_pads =
-      g_list_prepend (rate_pads, gst_element_get_pad (v_decoder, "sink"));
+      g_list_prepend (rate_pads, gst_element_get_static_pad (v_decoder,
+          "sink"));
 
   return pipeline;
 }