Commit c6b54c3d authored by Wim Taymans's avatar Wim Taymans
Browse files

Don't use bad gst_element_get_pad().

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().
parent eda6d89b
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:
common @ 5e771924
Subproject commit d0749502b0e891038593866f619a75305367b409
Subproject commit 5e771924d59d9ac912237ea466d0c60ad95df5ab
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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");
......
......@@ -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);
......
......@@ -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);
......
......@@ -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));
......
......@@ -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);
......
......@@ -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 */