another batch of connect->link fixes please let me know about issues and please refrain of making them yourself, so t...

Original commit message from CVS:
another batch of connect->link fixes
please let me know about issues
and please refrain of making them yourself, so that I don't spend double
the time resolving conflicts
This commit is contained in:
Thomas Vander Stichele 2003-01-10 10:22:24 +00:00
parent d87c018584
commit 1669173743
14 changed files with 142 additions and 141 deletions

2
common

@ -1 +1 @@
Subproject commit 86c508421de359776c4c2cb411a78c729330a250
Subproject commit 2a013c06fe9bf1379966cd12e6bf8c30915c5f12

View file

@ -922,6 +922,9 @@ if test "x$USE_ATOMIC_H" = xyes; then
AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
fi
# do not use deprecated stuff
GST_CFLAGS="$GST_CFLAGS -DGST_DISABLE_DEPRECATED"
if test "x$USE_DEBUG" = xyes; then
GST_CFLAGS="$GST_CFLAGS -g"
fi

View file

@ -383,7 +383,7 @@ cb_parse_clicked (GtkButton *button, gpointer *user_data)
gst_element_add_pad (fd->input, src_pad);
gst_element_add_pad (fd->output, sink_pad);
gst_element_connect_many (fd->input, fd->filter, fd->output, NULL);
gst_element_link_many (fd->input, fd->filter, fd->output, NULL);
if (fd->pipe_string) g_free (fd->pipe_string);
fd->pipe_string = g_strdup_printf ("%s ! %s ! %s", fd->input_pipe,

View file

@ -117,10 +117,11 @@ get_track_info (GstElement *cdparanoia)
if (i > 0) {
gint64 length = time - time_count;
g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n", i-1,
time_count/60, time_count%60,
time/60, time%60,
length/60, length%60);
g_print ("track %d: %lld:%02lld -> %lld:%02lld, length: %lld:%02lld\n",
i-1,
time_count / 60, time_count % 60,
time / 60, time % 60,
length / 60, length % 60);
}
}
else {
@ -157,7 +158,7 @@ main (int argc, char **argv)
gst_bin_add (GST_BIN (pipeline), cdparanoia);
gst_bin_add (GST_BIN (pipeline), osssink);
gst_element_connect_pads (cdparanoia, "src", osssink, "sink");
gst_element_link_pads (cdparanoia, "src", osssink, "sink");
g_signal_connect (G_OBJECT (pipeline), "deep_notify",
G_CALLBACK (gst_element_default_deep_notify), NULL);
@ -177,7 +178,7 @@ main (int argc, char **argv)
/* seek to track3 */
event = gst_event_new_seek (track_format |
GST_SEEK_METHOD_SET |
GST_SEEK_FLAG_FLUSH,
GST_SEEK_FLAG_FLUSH,
3);
res = gst_pad_send_event (pad, event);
@ -198,7 +199,7 @@ main (int argc, char **argv)
/* seek to some seconds */
event = gst_event_new_segment_seek (GST_FORMAT_TIME |
GST_SEEK_METHOD_SET |
GST_SEEK_FLAG_FLUSH,
GST_SEEK_FLAG_FLUSH,
25 * GST_SECOND, 29 * GST_SECOND);
res = gst_pad_send_event (pad, event);
if (!res)

View file

@ -28,17 +28,17 @@ typedef struct
const gchar *padname;
GstPad *target;
GstElement *bin;
} dyn_connect;
} dyn_link;
static void
dynamic_connect (GstPadTemplate *templ, GstPad *newpad, gpointer data)
dynamic_link (GstPadTemplate *templ, GstPad *newpad, gpointer data)
{
dyn_connect *connect = (dyn_connect *) data;
dyn_link *connect = (dyn_link *) data;
if (!strcmp (gst_pad_get_name (newpad), connect->padname)) {
gst_element_set_state (pipeline, GST_STATE_PAUSED);
gst_bin_add (GST_BIN (pipeline), connect->bin);
gst_pad_connect (newpad, connect->target);
gst_pad_link (newpad, connect->target);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
seekable_pads = g_list_prepend (seekable_pads, newpad);
@ -47,16 +47,16 @@ dynamic_connect (GstPadTemplate *templ, GstPad *newpad, gpointer data)
}
static void
setup_dynamic_connection (GstElement *element, const gchar *padname, GstPad *target, GstElement *bin)
setup_dynamic_linkion (GstElement *element, const gchar *padname, GstPad *target, GstElement *bin)
{
dyn_connect *connect;
dyn_link *connect;
connect = g_new0 (dyn_connect, 1);
connect = g_new0 (dyn_link, 1);
connect->padname = g_strdup (padname);
connect->target = target;
connect->bin = bin;
g_signal_connect (G_OBJECT (element), "new_pad", G_CALLBACK (dynamic_connect), connect);
g_signal_connect (G_OBJECT (element), "new_pad", G_CALLBACK (dynamic_link), connect);
}
static GstElement*
@ -79,8 +79,8 @@ make_mod_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
gst_element_connect (src, decoder);
gst_element_connect (decoder, audiosink);
gst_element_link (src, decoder);
gst_element_link (decoder, audiosink);
seekable = gst_element_get_pad (decoder, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -112,9 +112,9 @@ make_dv_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), audiosink);
gst_bin_add (GST_BIN (pipeline), videosink);
gst_element_connect (src, decoder);
gst_element_connect (decoder, audiosink);
gst_element_connect (decoder, videosink);
gst_element_link (src, decoder);
gst_element_link (decoder, audiosink);
gst_element_link (decoder, videosink);
seekable = gst_element_get_pad (decoder, "video");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -147,8 +147,8 @@ make_wav_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
gst_element_connect (src, decoder);
gst_element_connect (decoder, audiosink);
gst_element_link (src, decoder);
gst_element_link (decoder, audiosink);
seekable = gst_element_get_pad (decoder, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -178,8 +178,8 @@ make_flac_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
gst_element_connect (src, decoder);
gst_element_connect (decoder, audiosink);
gst_element_link (src, decoder);
gst_element_link (decoder, audiosink);
seekable = gst_element_get_pad (decoder, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -209,8 +209,8 @@ make_sid_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
gst_element_connect (src, decoder);
gst_element_connect (decoder, audiosink);
gst_element_link (src, decoder);
gst_element_link (decoder, audiosink);
seekable = gst_element_get_pad (decoder, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -241,8 +241,8 @@ make_parse_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), parser);
gst_bin_add (GST_BIN (pipeline), fakesink);
gst_element_connect (src, parser);
gst_element_connect (parser, fakesink);
gst_element_link (src, parser);
gst_element_link (parser, fakesink);
seekable = gst_element_get_pad (parser, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -272,8 +272,8 @@ make_vorbis_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
gst_element_connect (src, decoder);
gst_element_connect (decoder, audiosink);
gst_element_link (src, decoder);
gst_element_link (decoder, audiosink);
seekable = gst_element_get_pad (decoder, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -310,9 +310,9 @@ make_mp3_pipeline (const gchar *location)
gst_bin_add (GST_BIN (audio_thread), osssink);
gst_bin_add (GST_BIN (pipeline), audio_thread);
gst_element_connect (src, decoder);
gst_element_connect (decoder, queue);
gst_element_connect (queue, osssink);
gst_element_link (src, decoder);
gst_element_link (decoder, queue);
gst_element_link (queue, osssink);
seekable = gst_element_get_pad (queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -340,7 +340,7 @@ make_avi_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), demux);
gst_element_connect (src, demux);
gst_element_link (src, demux);
audio_bin = gst_bin_new ("a_decoder_bin");
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
@ -348,15 +348,15 @@ make_avi_pipeline (const gchar *location)
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
gst_element_connect (a_decoder, a_queue);
gst_element_connect (a_queue, audiosink);
gst_element_link (a_decoder, a_queue);
gst_element_link (a_queue, audiosink);
gst_bin_add (GST_BIN (audio_bin), a_decoder);
gst_bin_add (GST_BIN (audio_bin), audio_thread);
gst_bin_add (GST_BIN (audio_thread), a_queue);
gst_bin_add (GST_BIN (audio_thread), audiosink);
gst_element_set_state (audio_bin, GST_STATE_PAUSED);
setup_dynamic_connection (demux, "audio_00", gst_element_get_pad (a_decoder, "sink"), audio_bin);
setup_dynamic_linkion (demux, "audio_00", gst_element_get_pad (a_decoder, "sink"), audio_bin);
seekable = gst_element_get_pad (a_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -373,8 +373,8 @@ make_avi_pipeline (const gchar *location)
//g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL);
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
//g_object_set (G_OBJECT (v_queue), "max_level", 10, NULL);
gst_element_connect (v_decoder, v_queue);
gst_element_connect (v_queue, videosink);
gst_element_link (v_decoder, v_queue);
gst_element_link (v_queue, videosink);
gst_bin_add (GST_BIN (video_bin), v_decoder);
gst_bin_add (GST_BIN (video_bin), video_thread);
gst_bin_add (GST_BIN (video_thread), v_queue);
@ -382,7 +382,7 @@ make_avi_pipeline (const gchar *location)
gst_element_set_state (video_bin, GST_STATE_PAUSED);
setup_dynamic_connection (demux, "video_00", gst_element_get_pad (v_decoder, "sink"), video_bin);
setup_dynamic_linkion (demux, "video_00", gst_element_get_pad (v_decoder, "sink"), video_bin);
seekable = gst_element_get_pad (v_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -413,7 +413,7 @@ make_mpeg_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), demux);
gst_element_connect (src, demux);
gst_element_link (src, demux);
audio_bin = gst_bin_new ("a_decoder_bin");
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
@ -421,14 +421,14 @@ make_mpeg_pipeline (const gchar *location)
a_queue = gst_element_factory_make_or_warn ("queue", "a_queue");
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
gst_element_connect (a_decoder, a_queue);
gst_element_connect (a_queue, audiosink);
gst_element_link (a_decoder, a_queue);
gst_element_link (a_queue, audiosink);
gst_bin_add (GST_BIN (audio_bin), a_decoder);
gst_bin_add (GST_BIN (audio_bin), audio_thread);
gst_bin_add (GST_BIN (audio_thread), a_queue);
gst_bin_add (GST_BIN (audio_thread), audiosink);
setup_dynamic_connection (demux, "audio_00", gst_element_get_pad (a_decoder, "sink"), audio_bin);
setup_dynamic_linkion (demux, "audio_00", gst_element_get_pad (a_decoder, "sink"), audio_bin);
seekable = gst_element_get_pad (a_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -442,13 +442,13 @@ make_mpeg_pipeline (const gchar *location)
v_queue = gst_element_factory_make_or_warn ("queue", "v_queue");
v_filter = gst_element_factory_make_or_warn ("colorspace", "v_filter");
videosink = gst_element_factory_make_or_warn ("xvideosink", "v_sink");
gst_element_connect_many (v_decoder, v_queue, v_filter, NULL);
gst_element_link_many (v_decoder, v_queue, v_filter, NULL);
gst_element_connect_pads (v_filter, "src", videosink, "sink");
gst_element_link (v_filter, videosink);
gst_bin_add_many (GST_BIN (video_bin), v_decoder, video_thread, NULL);
gst_bin_add_many (GST_BIN (video_thread), v_queue, v_filter, videosink, NULL);
setup_dynamic_connection (demux, "video_00", gst_element_get_pad (v_decoder, "sink"), video_bin);
setup_dynamic_linkion (demux, "video_00", gst_element_get_pad (v_decoder, "sink"), video_bin);
seekable = gst_element_get_pad (v_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -479,7 +479,7 @@ make_mpegnt_pipeline (const gchar *location)
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), demux);
gst_element_connect (src, demux);
gst_element_link (src, demux);
audio_bin = gst_bin_new ("a_decoder_bin");
a_decoder = gst_element_factory_make_or_warn ("mad", "a_dec");
@ -488,14 +488,14 @@ make_mpegnt_pipeline (const gchar *location)
audiosink = gst_element_factory_make_or_warn ("osssink", "a_sink");
//g_object_set (G_OBJECT (audiosink), "fragment", 0x00180008, NULL);
g_object_set (G_OBJECT (audiosink), "sync", FALSE, NULL);
gst_element_connect (a_decoder, a_queue);
gst_element_connect (a_queue, audiosink);
gst_element_link (a_decoder, a_queue);
gst_element_link (a_queue, audiosink);
gst_bin_add (GST_BIN (audio_bin), a_decoder);
gst_bin_add (GST_BIN (audio_bin), audio_thread);
gst_bin_add (GST_BIN (audio_thread), a_queue);
gst_bin_add (GST_BIN (audio_thread), audiosink);
setup_dynamic_connection (demux, "audio_00", gst_element_get_pad (a_decoder, "sink"), audio_bin);
setup_dynamic_linkion (demux, "audio_00", gst_element_get_pad (a_decoder, "sink"), audio_bin);
seekable = gst_element_get_pad (a_queue, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);
@ -506,12 +506,11 @@ make_mpegnt_pipeline (const gchar *location)
v_decoder = gst_element_factory_make_or_warn ("mpeg2dec", "v_dec");
v_filter = gst_element_factory_make_or_warn ("colorspace", "v_filter");
videosink = gst_element_factory_make_or_warn ("xvideosink", "v_sink");
gst_element_connect_many (v_decoder, v_filter, NULL);
gst_element_link_many (v_decoder, v_filter, videosink, NULL);
gst_element_connect_pads (v_filter, "src", videosink, "sink");
gst_bin_add_many (GST_BIN (video_bin), v_decoder, v_filter, videosink, NULL);
setup_dynamic_connection (demux, "video_00", gst_element_get_pad (v_decoder, "sink"), video_bin);
setup_dynamic_linkion (demux, "video_00", gst_element_get_pad (v_decoder, "sink"), video_bin);
seekable = gst_element_get_pad (v_decoder, "src");
seekable_pads = g_list_prepend (seekable_pads, seekable);

View file

@ -56,11 +56,11 @@ make_spider_pipeline (const gchar *location, gboolean thread)
gst_bin_add (GST_BIN (pipeline), a_thread);
gst_bin_add (GST_BIN (pipeline), v_thread);
gst_element_connect (src, decoder);
gst_element_connect (v_queue, videosink);
gst_element_connect (decoder, v_queue);
gst_element_connect (a_queue, audiosink);
gst_element_connect (decoder, a_queue);
gst_element_link (src, decoder);
gst_element_link (v_queue, videosink);
gst_element_link (decoder, v_queue);
gst_element_link (a_queue, audiosink);
gst_element_link (decoder, a_queue);
seekable_elements = g_list_prepend (seekable_elements, videosink);
seekable_elements = g_list_prepend (seekable_elements, audiosink);

View file

@ -55,14 +55,12 @@ print_caps (GstCaps *caps)
default:
break;
}
walk = g_list_next (walk);
}
}
else {
g_print (" unkown caps type\n");
}
}
static void
@ -286,7 +284,7 @@ main (int argc, char **argv)
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), vorbisfile);
gst_element_connect_pads (filesrc, "src", vorbisfile, "sink");
gst_element_link_pads (filesrc, "src", vorbisfile, "sink");
pad = gst_element_get_pad (vorbisfile, "src");
g_assert (pad);

View file

@ -336,7 +336,7 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
if (!GST_CAPS_IS_FIXED (caps)) {
GST_DEBUG (GST_CAT_CAPS, "caps on lame pad %s:%s not fixed, delayed",
GST_DEBUG_PAD_NAME (pad));
return GST_PAD_CONNECT_DELAYED;
return GST_PAD_LINK_DELAYED;
}
gst_caps_get_int (caps, "rate", &lame->samplerate);
@ -345,10 +345,10 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
if (!gst_lame_setup (lame)) {
gst_element_error (GST_ELEMENT (lame),
"could not initialize encoder (wrong parameters?)");
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static void
@ -359,7 +359,7 @@ gst_lame_init (GstLame *lame)
lame->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (gst_lame_sink_factory), "sink");
gst_element_add_pad (GST_ELEMENT (lame), lame->sinkpad);
gst_pad_set_chain_function (lame->sinkpad, gst_lame_chain);
gst_pad_set_connect_function (lame->sinkpad, gst_lame_sinkconnect);
gst_pad_set_link_function (lame->sinkpad, gst_lame_sinkconnect);
lame->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (gst_lame_src_factory), "src");
gst_element_add_pad (GST_ELEMENT (lame), lame->srcpad);

View file

@ -454,8 +454,8 @@ gst_media_info_find_type (GstMediaInfo *info, const char *location)
gst_bin_add (GST_BIN (priv->pipeline), priv->typefind);
g_object_set (G_OBJECT (priv->source), "location", location, NULL);
if (!gst_element_connect (priv->source, priv->typefind))
g_warning ("Couldn't connect source and typefind\n");
if (!gst_element_link (priv->source, priv->typefind))
g_warning ("Couldn't link source and typefind\n");
g_signal_connect (G_OBJECT (priv->typefind), "have-type",
G_CALLBACK (have_type_callback), info);
if (gst_element_set_state (priv->pipeline, GST_STATE_PLAYING)
@ -469,7 +469,7 @@ gst_media_info_find_type (GstMediaInfo *info, const char *location)
/*clear up typefind */
gst_element_set_state (priv->pipeline, GST_STATE_READY);
gst_element_disconnect (priv->source, priv->typefind);
gst_element_unlink (priv->source, priv->typefind);
gst_bin_remove (GST_BIN (priv->pipeline), priv->typefind);
}
/* get properties of complete physical stream
@ -683,7 +683,7 @@ gst_media_info_clear_decoder (GstMediaInfo *info)
/* clear up decoder */
/* FIXME: shouldn't need to set state here */
gst_element_set_state (info->priv->pipeline, GST_STATE_READY);
gst_element_disconnect (info->priv->source, info->priv->decoder);
gst_element_unlink (info->priv->source, info->priv->decoder);
gst_bin_remove (GST_BIN (info->priv->pipeline), info->priv->decoder);
info->priv->decoder = NULL;
}
@ -701,9 +701,9 @@ gst_media_info_set_decoder (GstMediaInfo *info, GstElement *decoder)
/* set up pipeline and connect signal handlers */
priv->decoder = decoder;
gst_bin_add (GST_BIN (priv->pipeline), decoder);
if (!gst_element_connect (priv->source, decoder))
g_warning ("Couldn't connect source and decoder\n");
/* FIXME: we should be connecting to ALL possible src pads */
if (!gst_element_link (priv->source, decoder))
g_warning ("Couldn't link source and decoder\n");
/* FIXME: we should be link to ALL possible src pads */
if (!(priv->decoder_pad = gst_element_get_pad (decoder, "src")))
g_warning ("Couldn't get decoder pad\n");
if (!(priv->source_pad = gst_element_get_pad (priv->source, "src")))

View file

@ -65,7 +65,7 @@ gst_play_audio_setup (GstPlay *play, GError **error)
GST_BIN (play->pipeline), play->volume,
play->audio_sink, NULL);
gst_element_connect (play->volume, play->audio_sink);
gst_element_link (play->volume, play->audio_sink);
gst_bin_set_pre_iterate_function(
GST_BIN (play->pipeline),
@ -126,7 +126,7 @@ gst_play_audiot_setup (GstPlay *play, GError **error)
GST_BIN (play->pipeline), play->volume,
play->audio_sink, NULL);
gst_element_connect (play->volume, play->audio_sink);
gst_element_link (play->volume, play->audio_sink);
gst_bin_set_pre_iterate_function(
GST_BIN (play->pipeline),
@ -150,13 +150,13 @@ gst_play_audiot_set_audio (GstPlay *play, GstElement *audio_sink)
if (play->audio_sink)
{
gst_element_disconnect (play->volume, play->audio_sink);
gst_element_unlink (play->volume, play->audio_sink);
gst_bin_remove (GST_BIN (play->pipeline), play->audio_sink);
}
play->audio_sink = audio_sink;
gst_bin_add (GST_BIN (play->pipeline), play->audio_sink);
gst_element_connect (play->volume, play->audio_sink);
gst_element_link (play->volume, play->audio_sink);
play->audio_sink_element = gst_play_get_sink_element (play, audio_sink);
@ -178,8 +178,8 @@ gst_play_audiot_set_auto (GstPlay *play, GstElement *autoplugger)
if (play->autoplugger) {
/* we need to remove the existing autoplugger before creating a new one */
gst_element_disconnect (play->autoplugger, play->volume);
gst_element_disconnect (play->autoplugger, play->source);
gst_element_unlink (play->autoplugger, play->volume);
gst_element_unlink (play->autoplugger, play->source);
gst_bin_remove (GST_BIN (play->pipeline), play->autoplugger);
}
@ -187,8 +187,8 @@ gst_play_audiot_set_auto (GstPlay *play, GstElement *autoplugger)
g_return_val_if_fail (play->autoplugger != NULL, FALSE);
gst_bin_add (GST_BIN (play->pipeline), play->autoplugger);
gst_element_connect (play->source, play->autoplugger);
gst_element_connect (play->autoplugger, play->volume);
gst_element_link (play->source, play->autoplugger);
gst_element_link (play->autoplugger, play->volume);
return TRUE;
}
@ -260,7 +260,7 @@ gst_play_audioht_setup (GstPlay *play, GError **error)
GST_BIN (audio_thread), audio_queue, play->volume,
play->audio_sink, NULL);
gst_element_connect_many (audio_queue, play->volume, play->audio_sink);
gst_element_link_many (audio_queue, play->volume, play->audio_sink);
gst_element_add_ghost_pad (
audio_thread, gst_element_get_pad (audio_queue, "sink"),
@ -294,13 +294,13 @@ gst_play_audioht_set_audio (GstPlay *play, GstElement *audio_sink)
if (play->audio_sink)
{
gst_element_disconnect (play->volume, play->audio_sink);
gst_element_unlink (play->volume, play->audio_sink);
gst_bin_remove (GST_BIN (audio_thread), play->audio_sink);
}
play->audio_sink = audio_sink;
gst_bin_add (GST_BIN (audio_thread), play->audio_sink);
gst_element_connect (play->volume, play->audio_sink);
gst_element_link (play->volume, play->audio_sink);
play->audio_sink_element = gst_play_get_sink_element (play, audio_sink);
@ -325,8 +325,8 @@ gst_play_audioht_set_auto (GstPlay *play, GstElement *autoplugger)
if (play->autoplugger) {
/* we need to remove the existing autoplugger before creating a new one */
gst_element_disconnect (play->autoplugger, audio_thread);
gst_element_disconnect (play->autoplugger, play->source);
gst_element_unlink (play->autoplugger, audio_thread);
gst_element_unlink (play->autoplugger, play->source);
gst_bin_remove (GST_BIN (play->pipeline), play->autoplugger);
}
@ -334,8 +334,8 @@ gst_play_audioht_set_auto (GstPlay *play, GstElement *autoplugger)
g_return_val_if_fail (play->autoplugger != NULL, FALSE);
gst_bin_add (GST_BIN (play->pipeline), play->autoplugger);
gst_element_connect (play->source, play->autoplugger);
gst_element_connect (play->autoplugger, audio_thread);
gst_element_link (play->source, play->autoplugger);
gst_element_link (play->autoplugger, audio_thread);
return TRUE;
}
@ -423,7 +423,7 @@ gst_play_video_setup (GstPlay *play, GError **error)
gst_bin_add_many (
GST_BIN (audio_bin), audio_queue, play->volume,
play->audio_sink, NULL);
gst_element_connect_many (audio_queue, play->volume,
gst_element_link_many (audio_queue, play->volume,
play->audio_sink, NULL);
gst_element_add_ghost_pad (
@ -470,7 +470,7 @@ gst_play_video_setup (GstPlay *play, GError **error)
gst_bin_add_many (GST_BIN (video_bin), video_queue, colorspace,
play->video_sink, NULL);
gst_element_connect_many (video_queue, colorspace,
gst_element_link_many (video_queue, colorspace,
play->video_sink, NULL);
/* setting up iterate functions */
@ -508,9 +508,9 @@ gst_play_video_set_auto (GstPlay *play, GstElement *autoplugger)
if (play->autoplugger) {
/* we need to remove the existing autoplugger before creating a new one */
gst_element_disconnect (play->autoplugger, audio_bin);
gst_element_disconnect (play->autoplugger, play->source);
gst_element_disconnect (play->autoplugger, video_bin);
gst_element_unlink (play->autoplugger, audio_bin);
gst_element_unlink (play->autoplugger, play->source);
gst_element_unlink (play->autoplugger, video_bin);
gst_bin_remove (GST_BIN (work_thread), play->autoplugger);
}
@ -519,9 +519,9 @@ gst_play_video_set_auto (GstPlay *play, GstElement *autoplugger)
g_return_val_if_fail (play->autoplugger != NULL, FALSE);
gst_bin_add (GST_BIN (work_thread), play->autoplugger);
gst_element_connect (play->source, play->autoplugger);
gst_element_connect (play->autoplugger, audio_bin);
gst_element_connect (play->autoplugger, video_bin);
gst_element_link (play->source, play->autoplugger);
gst_element_link (play->autoplugger, audio_bin);
gst_element_link (play->autoplugger, video_bin);
return TRUE;
}
@ -539,12 +539,12 @@ gst_play_video_set_video (GstPlay *play, GstElement *video_sink)
video_mate = g_hash_table_lookup(play->other_elements, "colorspace");
if (play->video_sink) {
gst_element_disconnect (video_mate, play->video_sink);
gst_element_unlink (video_mate, play->video_sink);
gst_bin_remove (GST_BIN (video_bin), play->video_sink);
}
play->video_sink = video_sink;
gst_bin_add (GST_BIN (video_bin), play->video_sink);
gst_element_connect (video_mate, play->video_sink);
gst_element_link (video_mate, play->video_sink);
play->video_sink_element = gst_play_get_sink_element (play, video_sink);
@ -571,13 +571,13 @@ gst_play_video_set_audio (GstPlay *play, GstElement *audio_sink)
if (play->audio_sink)
{
gst_element_disconnect (play->volume, play->audio_sink);
gst_element_unlink (play->volume, play->audio_sink);
gst_bin_remove (GST_BIN (audio_bin), play->audio_sink);
}
play->audio_sink = audio_sink;
gst_bin_add (GST_BIN (audio_bin), play->audio_sink);
gst_element_connect (play->volume, play->audio_sink);
gst_element_link (play->volume, play->audio_sink);
play->audio_sink_element = gst_play_get_sink_element (play, audio_sink);
@ -679,7 +679,7 @@ gst_play_videots_setup (GstPlay *play, GError **error)
GST_BIN (audio_bin), audio_queue,
play->volume, play->audio_sink, NULL);
gst_element_connect_many (
gst_element_link_many (
audio_queue, play->volume,
play->audio_sink, NULL);
@ -714,7 +714,7 @@ gst_play_videots_setup (GstPlay *play, GError **error)
GST_BIN (play->pipeline), video_queue,
play->video_sink, NULL);
gst_element_connect (video_queue, play->video_sink);
gst_element_link (video_queue, play->video_sink);
gst_bin_set_pre_iterate_function(
GST_BIN (play->pipeline),
@ -726,7 +726,7 @@ gst_play_videots_setup (GstPlay *play, GError **error)
(GstBinPrePostIterateFunction) callback_bin_post_iterate,
play->video_bin_mutex);
gst_element_connect (work_thread, video_queue);
gst_element_link (work_thread, video_queue);
return TRUE;
}
@ -748,9 +748,9 @@ gst_play_videots_set_auto (GstPlay *play, GstElement *autoplugger)
if (play->autoplugger) {
/* we need to remove the existing autoplugger
* before creating a new one */
gst_element_disconnect (play->autoplugger, audio_bin);
gst_element_disconnect (play->autoplugger, play->source);
gst_element_disconnect (play->autoplugger, auto_identity);
gst_element_unlink (play->autoplugger, audio_bin);
gst_element_unlink (play->autoplugger, play->source);
gst_element_unlink (play->autoplugger, auto_identity);
gst_bin_remove (GST_BIN (work_thread), play->autoplugger);
}
@ -759,9 +759,9 @@ gst_play_videots_set_auto (GstPlay *play, GstElement *autoplugger)
g_return_val_if_fail (play->autoplugger != NULL, FALSE);
gst_bin_add (GST_BIN (work_thread), play->autoplugger);
gst_element_connect (play->source, play->autoplugger);
gst_element_connect (play->autoplugger, audio_bin);
gst_element_connect (play->autoplugger, auto_identity);
gst_element_link (play->source, play->autoplugger);
gst_element_link (play->autoplugger, audio_bin);
gst_element_link (play->autoplugger, auto_identity);
return TRUE;
}
@ -778,12 +778,12 @@ gst_play_videots_set_video (GstPlay *play, GstElement *video_sink)
video_mate = g_hash_table_lookup (play->other_elements, "video_queue");
if (play->video_sink) {
gst_element_disconnect (video_mate, play->video_sink);
gst_element_unlink (video_mate, play->video_sink);
gst_bin_remove (GST_BIN (play->pipeline), play->video_sink);
}
play->video_sink = video_sink;
gst_bin_add (GST_BIN (play->pipeline), play->video_sink);
gst_element_connect (video_mate, play->video_sink);
gst_element_link (video_mate, play->video_sink);
return TRUE;
}
@ -801,13 +801,13 @@ gst_play_videots_set_audio (GstPlay *play, GstElement *audio_sink)
if (play->audio_sink)
{
gst_element_disconnect (play->volume, play->audio_sink);
gst_element_unlink (play->volume, play->audio_sink);
gst_bin_remove (GST_BIN (audio_bin), play->audio_sink);
}
play->audio_sink = audio_sink;
gst_bin_add (GST_BIN (audio_bin), play->audio_sink);
gst_element_connect (play->volume, play->audio_sink);
gst_element_link (play->volume, play->audio_sink);
play->audio_sink_element = gst_play_get_sink_element (play, audio_sink);

View file

@ -257,7 +257,7 @@ gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
outbuf = gst_buffer_create_sub(ac3parse->partialbuf,offset,bpf);
offset += bpf;
if (ac3parse->skip == 0 && GST_PAD_IS_CONNECTED(ac3parse->srcpad)) {
if (ac3parse->skip == 0 && GST_PAD_IS_LINKED(ac3parse->srcpad)) {
GST_DEBUG (0,"ac3parse: pushing buffer of %d bytes",GST_BUFFER_SIZE(outbuf));
gst_pad_push(ac3parse->srcpad,outbuf);
}

View file

@ -1138,7 +1138,7 @@ static gboolean gst_asf_demux_process_chunk (GstASFDemux *asf_demux,
format = GST_FORMAT_TIME;
gst_pad_query (stream->pad, GST_QUERY_POSITION, &format, &next_ts);
if (GST_PAD_IS_CONNECTED (stream->pad)) {
if (GST_PAD_IS_LINKED (stream->pad)) {
GstBuffer *buf;
got_bytes = gst_bytestream_peek (bs, &buf, segment_info->chunk_size);

View file

@ -649,7 +649,7 @@ done:
}
/* create the buffer and send it off to the Other Side */
if (GST_PAD_IS_CONNECTED (outpad) && datalen > 0) {
if (GST_PAD_IS_LINKED (outpad) && datalen > 0) {
GST_DEBUG (0, "creating subbuffer len %d", datalen);
/* if this is part of the buffer, create a subbuffer */

View file

@ -194,7 +194,7 @@ gst_synaesthesia_init (GstSynaesthesia *synaesthesia)
gst_element_add_pad (GST_ELEMENT (synaesthesia), synaesthesia->srcpad);
gst_pad_set_chain_function (synaesthesia->sinkpad, gst_synaesthesia_chain);
gst_pad_set_connect_function (synaesthesia->sinkpad, gst_synaesthesia_sinkconnect);
gst_pad_set_link_function (synaesthesia->sinkpad, gst_synaesthesia_sinkconnect);
synaesthesia->next_time = 0;
synaesthesia->peerpool = NULL;
@ -214,10 +214,10 @@ gst_synaesthesia_sinkconnect (GstPad *pad, GstCaps *caps)
synaesthesia = GST_SYNAESTHESIA (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) {
return GST_PAD_CONNECT_DELAYED;
return GST_PAD_LINK_DELAYED;
}
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static void