diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2003-01-10 10:22:25 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2003-01-10 10:22:25 +0000 |
commit | 9032557b33f61faf596bf7cd981802d96365a0e5 (patch) | |
tree | 7c1c10922dc9dd51abc6e5bf9c0bf1ccbf95cba6 | |
parent | 346d1228b9e94130b8160eccf6cd29717d4029bb (diff) | |
download | gstreamer-plugins-base-9032557b33f61faf596bf7cd981802d96365a0e5.tar.gz |
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
27 files changed, 301 insertions, 304 deletions
diff --git a/common b/common -Subproject 86c508421de359776c4c2cb411a78c729330a25 +Subproject 2a013c06fe9bf1379966cd12e6bf8c30915c5f1 diff --git a/configure.ac b/configure.ac index 4ad07ad18..4240006d2 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/examples/dynparams/filter.c b/examples/dynparams/filter.c index 39240500d..7554101f5 100644 --- a/examples/dynparams/filter.c +++ b/examples/dynparams/filter.c @@ -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, diff --git a/examples/seeking/cdparanoia.c b/examples/seeking/cdparanoia.c index db7223ffe..f0e1fe1e5 100644 --- a/examples/seeking/cdparanoia.c +++ b/examples/seeking/cdparanoia.c @@ -112,15 +112,16 @@ get_track_info (GstElement *cdparanoia) } if (res) { - /* for the first track (i==0) we wait until we have the + /* for the first track (i==0) we wait until we have the * time of the next track */ 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 { @@ -142,7 +143,7 @@ main (int argc, char **argv) GstEvent *event; gint count; gboolean res; - + gst_init (&argc, &argv); pipeline = gst_pipeline_new ("pipeline"); @@ -157,11 +158,11 @@ 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_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (gst_element_default_deep_notify), NULL); - + gst_element_set_state (pipeline, GST_STATE_PAUSED); /* now we go into probe mode */ @@ -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) diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c index b8fcad774..b9055fbed 100644 --- a/examples/seeking/seek.c +++ b/examples/seeking/seek.c @@ -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); diff --git a/examples/seeking/spider_seek.c b/examples/seeking/spider_seek.c index 6c88ae441..3b155cdea 100644 --- a/examples/seeking/spider_seek.c +++ b/examples/seeking/spider_seek.c @@ -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); diff --git a/examples/seeking/vorbisfile.c b/examples/seeking/vorbisfile.c index 304c18511..9bc4adfc3 100644 --- a/examples/seeking/vorbisfile.c +++ b/examples/seeking/vorbisfile.c @@ -55,14 +55,12 @@ print_caps (GstCaps *caps) default: break; } - walk = g_list_next (walk); } } else { g_print (" unkown caps type\n"); } - } static void @@ -92,7 +90,7 @@ static void print_lbs_info (struct probe_context *context, gint stream) { const GstFormat *formats; - + /* FIXME: need a better name here */ g_print (" stream info:\n"); @@ -114,10 +112,10 @@ print_lbs_info (struct probe_context *context, gint stream) definition = gst_format_get_details (format); /* get start and end position of this stream */ - res = gst_pad_convert (context->pad, + res = gst_pad_convert (context->pad, context->ls_format, stream, &format, &value_start); - res &= gst_pad_convert (context->pad, + res &= gst_pad_convert (context->pad, context->ls_format, stream + 1, &format, &value_end); @@ -127,7 +125,7 @@ print_lbs_info (struct probe_context *context, gint stream) if (format == GST_FORMAT_TIME) { value_end /= (GST_SECOND/100); - g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, + g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, value_end/6000, (value_end/100)%60, (value_end%100)); } else { @@ -148,13 +146,13 @@ deep_notify (GObject *object, GstObject *origin, GValue value = { 0, }; if (!strcmp (pspec->name, "metadata")) { - + g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (origin), pspec->name, &value); context->metadata = g_value_peek_pointer (&value); } else if (!strcmp (pspec->name, "streaminfo")) { - + g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (origin), pspec->name, &value); context->streaminfo = g_value_peek_pointer (&value); @@ -175,7 +173,7 @@ collect_logical_stream_properties (struct probe_context *context, gint stream) GstEvent *event; gboolean res; gint count; - + g_print ("info for logical stream %d:\n", stream); /* seek to stream */ @@ -196,14 +194,14 @@ collect_logical_stream_properties (struct probe_context *context, gint stream) count++; if (count > 10) break; } - + print_caps (context->metadata); print_caps (context->streaminfo); print_format (context->caps); print_lbs_info (context, stream); g_print ("\n"); - + return TRUE; } @@ -226,11 +224,11 @@ collect_stream_properties (struct probe_context *context) gint64 value; gboolean res; GstFormat format; - + format = *formats; formats++; - res = gst_pad_query (context->pad, GST_QUERY_TOTAL, + res = gst_pad_query (context->pad, GST_QUERY_TOTAL, &format, &value); definition = gst_format_get_details (format); @@ -238,7 +236,7 @@ collect_stream_properties (struct probe_context *context) if (res) { if (format == GST_FORMAT_TIME) { value /= (GST_SECOND/100); - g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, + g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, value/6000, (value/100)%60, (value%100)); } else { @@ -265,7 +263,7 @@ main (int argc, char **argv) GstFormat logical_stream_format; struct probe_context *context; gint stream; - + gst_init (&argc, &argv); if (argc < 2) { @@ -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); @@ -300,9 +298,9 @@ main (int argc, char **argv) context->pad = pad; context->ls_format = logical_stream_format; - g_signal_connect (G_OBJECT (pipeline), "deep_notify", + g_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (deep_notify), context); - + gst_element_set_state (pipeline, GST_STATE_PLAYING); /* at this point we can inspect the stream */ @@ -314,7 +312,7 @@ main (int argc, char **argv) collect_logical_stream_properties (context, stream); stream++; } - + /* stop probe */ gst_element_set_state (pipeline, GST_STATE_NULL); diff --git a/ext/alsa/gstalsa.c b/ext/alsa/gstalsa.c index e140accda..b658d8ccc 100644 --- a/ext/alsa/gstalsa.c +++ b/ext/alsa/gstalsa.c @@ -327,7 +327,7 @@ gst_alsa_init(GstAlsa *this) gst_element_add_pad(GST_ELEMENT(this), GST_ALSA_PAD(this->pads)->pad); - gst_pad_set_connect_function(GST_ALSA_PAD(this->pads)->pad, gst_alsa_connect); + gst_pad_set_link_function(GST_ALSA_PAD(this->pads)->pad, gst_alsa_connect); gst_element_set_loop_function(GST_ELEMENT(this), gst_alsa_loop); } @@ -377,7 +377,7 @@ gst_alsa_request_new_pad (GstElement *element, GstPadTemplate *templ, const gcha pad->channel = channel; pad->pad = gst_pad_new_from_template (templ, newname); gst_element_add_pad (GST_ELEMENT (this), pad->pad); - gst_pad_set_connect_function(pad->pad, gst_alsa_connect); + gst_pad_set_link_function(pad->pad, gst_alsa_connect); if (this->data_interleaved && this->pads) { gst_element_remove_pad (GST_ELEMENT (this), GST_ALSA_PAD(this->pads)->pad); @@ -758,15 +758,15 @@ gst_alsa_connect(GstPad *pad, GstCaps *caps) GstAlsa *this; gboolean need_mmap; - g_return_val_if_fail (caps != NULL, GST_PAD_CONNECT_REFUSED); - g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_REFUSED); + g_return_val_if_fail (caps != NULL, GST_PAD_LINK_REFUSED); + g_return_val_if_fail (pad != NULL, GST_PAD_LINK_REFUSED); this = GST_ALSA(gst_pad_get_parent(pad)); if (GST_CAPS_IS_FIXED (caps)) { if (this->handle == NULL) if (!gst_alsa_open_audio(this)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; if (gst_alsa_parse_caps(this, caps)) { need_mmap = this->mmap_open; @@ -781,21 +781,21 @@ gst_alsa_connect(GstPad *pad, GstCaps *caps) /* FIXME send out another caps if nego fails */ if (!gst_alsa_open_audio(this)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; if (!gst_alsa_start_audio(this)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; if (need_mmap && !gst_alsa_get_channel_addresses(this)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; - return GST_PAD_CONNECT_OK; + return GST_PAD_LINK_OK; } - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } /* shamelessly stolen from pbd's audioengine and jack alsa_driver. thanks, paul! */ diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index db9cbff7c..7e4a360d4 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -175,7 +175,7 @@ gst_vorbisenc_sinkconnect (GstPad * pad, GstCaps * caps) vorbisenc = GST_VORBISENC (gst_pad_get_parent (pad)); if (!GST_CAPS_IS_FIXED (caps)) - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; gst_caps_get_int (caps, "channels", &vorbisenc->channels); gst_caps_get_int (caps, "rate", &vorbisenc->frequency); @@ -183,9 +183,9 @@ gst_vorbisenc_sinkconnect (GstPad * pad, GstCaps * caps) gst_vorbisenc_setup (vorbisenc); if (vorbisenc->setup) - return GST_PAD_CONNECT_OK; + return GST_PAD_LINK_OK; - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } static gboolean @@ -401,7 +401,7 @@ gst_vorbisenc_init (VorbisEnc * vorbisenc) vorbisenc->sinkpad = gst_pad_new_from_template (gst_vorbisenc_sink_template, "sink"); gst_element_add_pad (GST_ELEMENT (vorbisenc), vorbisenc->sinkpad); gst_pad_set_chain_function (vorbisenc->sinkpad, gst_vorbisenc_chain); - gst_pad_set_connect_function (vorbisenc->sinkpad, gst_vorbisenc_sinkconnect); + gst_pad_set_link_function (vorbisenc->sinkpad, gst_vorbisenc_sinkconnect); gst_pad_set_convert_function (vorbisenc->sinkpad, GST_DEBUG_FUNCPTR (gst_vorbisenc_convert_sink)); gst_pad_set_formats_function (vorbisenc->sinkpad, GST_DEBUG_FUNCPTR (gst_vorbisenc_get_formats)); diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c index 624a06a02..4e8f56b36 100644 --- a/gst-libs/gst/media-info/media-info.c +++ b/gst-libs/gst/media-info/media-info.c @@ -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"))) diff --git a/gst-libs/gst/play/playpipelines.c b/gst-libs/gst/play/playpipelines.c index dc04b011b..67e4d5a6f 100644 --- a/gst-libs/gst/play/playpipelines.c +++ b/gst-libs/gst/play/playpipelines.c @@ -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); diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index d4eae8871..e38bdf5b5 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -213,14 +213,14 @@ gst_adder_connect (GstPad *pad, GstCaps *caps) GSList *channels; GstPad *p; - g_return_val_if_fail (caps != NULL, GST_PAD_CONNECT_REFUSED); - g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_REFUSED); + g_return_val_if_fail (caps != NULL, GST_PAD_LINK_REFUSED); + g_return_val_if_fail (pad != NULL, GST_PAD_LINK_REFUSED); adder = GST_ADDER (GST_PAD_PARENT (pad)); if (GST_CAPS_IS_FIXED (caps)) { if (!gst_adder_parse_caps (adder, caps)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; if (pad == adder->srcpad || gst_pad_try_set_caps (adder->srcpad, caps) > 0) { sinkpads = gst_element_get_pad_list ((GstElement *) adder); @@ -229,11 +229,11 @@ gst_adder_connect (GstPad *pad, GstCaps *caps) if (p != pad && p != adder->srcpad) { if (gst_pad_try_set_caps (p, caps) <= 0) { GST_DEBUG (GST_CAT_PLUGIN_INFO, - "caps mismatch; disconnecting and removing pad %s:%s " + "caps mismatch; unlinking and removing pad %s:%s " "(peer %s:%s)", GST_DEBUG_PAD_NAME (p), GST_DEBUG_PAD_NAME (GST_PAD_PEER (p))); - gst_pad_disconnect (GST_PAD (GST_PAD_PEER (p)), p); + gst_pad_unlink (GST_PAD (GST_PAD_PEER (p)), p); remove = g_list_prepend (remove, p); } } @@ -258,12 +258,12 @@ gst_adder_connect (GstPad *pad, GstCaps *caps) } remove = g_list_next (remove); } - return GST_PAD_CONNECT_OK; + return GST_PAD_LINK_OK; } else { - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } } else { - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } } @@ -294,7 +294,7 @@ gst_adder_init (GstAdder *adder) "src"); gst_element_add_pad (GST_ELEMENT (adder), adder->srcpad); gst_element_set_loop_function (GST_ELEMENT (adder), gst_adder_loop); - gst_pad_set_connect_function (adder->srcpad, gst_adder_connect); + gst_pad_set_link_function (adder->srcpad, gst_adder_connect); adder->format = GST_ADDER_FORMAT_UNSET; @@ -336,7 +336,7 @@ gst_adder_request_new_pad (GstElement *element, GstPadTemplate *templ, input->bytestream = gst_bytestream_new (input->sinkpad); gst_element_add_pad (GST_ELEMENT (adder), input->sinkpad); - gst_pad_set_connect_function(input->sinkpad, gst_adder_connect); + gst_pad_set_link_function(input->sinkpad, gst_adder_connect); /* add the input_channel to the list of input channels */ diff --git a/gst/audioscale/gstaudioscale.c b/gst/audioscale/gstaudioscale.c index 47f3b16d2..156238cbf 100644 --- a/gst/audioscale/gstaudioscale.c +++ b/gst/audioscale/gstaudioscale.c @@ -186,7 +186,7 @@ gst_audioscale_sinkconnect (GstPad * pad, GstCaps * caps) if (GST_CAPS_IS_FIXED (caps)) return gst_pad_try_set_caps (audioscale->srcpad, newcaps); else - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } static void * @@ -211,7 +211,7 @@ gst_audioscale_init (Audioscale *audioscale) audioscale->sinkpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (sink_template), "sink"); gst_element_add_pad(GST_ELEMENT(audioscale),audioscale->sinkpad); gst_pad_set_chain_function(audioscale->sinkpad,gst_audioscale_chain); - gst_pad_set_connect_function (audioscale->sinkpad, gst_audioscale_sinkconnect); + gst_pad_set_link_function (audioscale->sinkpad, gst_audioscale_sinkconnect); audioscale->srcpad = gst_pad_new_from_template (GST_PAD_TEMPLATE_GET (src_template), "src"); diff --git a/gst/sine/demo-dparams.c b/gst/sine/demo-dparams.c index 09b67e7a4..4b8f3fb75 100644 --- a/gst/sine/demo-dparams.c +++ b/gst/sine/demo-dparams.c @@ -59,7 +59,7 @@ int main(int argc,char *argv[]) { osssink = gst_element_factory_make("osssink","sound-sink"); volfilter = gst_element_factory_make("volume","volume-filter"); gst_bin_add_many(GST_BIN(thread), sinesrc, volfilter, osssink, NULL); - gst_element_connect_many(sinesrc, volfilter, osssink, NULL); + gst_element_link_many(sinesrc, volfilter, osssink, NULL); /* this breaks with current alsa oss compat lib */ g_object_set(G_OBJECT(osssink),"fragment",0x00180008,NULL); g_object_set(G_OBJECT(osssink),"sync",FALSE,NULL); diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index 2ccc68c78..5086cb025 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -189,7 +189,7 @@ gst_videoscale_sinkconnect (GstPad *pad, GstCaps *caps) videoscale = GST_VIDEOSCALE (gst_pad_get_parent (pad)); if (!GST_CAPS_IS_FIXED (caps)) { - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } gst_caps_get_fourcc_int (caps, "format", &videoscale->format); @@ -221,7 +221,7 @@ gst_videoscale_init (GstVideoscale *videoscale) /*gst_pad_set_negotiate_function(videoscale->sinkpad,videoscale_negotiate_sink); */ gst_element_add_pad(GST_ELEMENT(videoscale),videoscale->sinkpad); gst_pad_set_chain_function(videoscale->sinkpad,gst_videoscale_chain); - gst_pad_set_connect_function(videoscale->sinkpad,gst_videoscale_sinkconnect); + gst_pad_set_link_function(videoscale->sinkpad,gst_videoscale_sinkconnect); videoscale->srcpad = gst_pad_new_from_template ( GST_PAD_TEMPLATE_GET (src_templ), "src"); diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index c1851dcb0..9ce26c735 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -172,7 +172,7 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps) #if 0 if (!GST_CAPS_IS_FIXED (caps)) { - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } #endif @@ -186,7 +186,7 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps) videotestsrc->format, videotestsrc->forced_format); if (videotestsrc->forced_format && videotestsrc->format != videotestsrc->forced_format) { - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } printf ("videotestsrc: using FOURCC 0x%08x\n", videotestsrc->format); @@ -205,7 +205,7 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps) GST_DEBUG (0, "size %d x %d", videotestsrc->width, videotestsrc->height); - return GST_PAD_CONNECT_OK; + return GST_PAD_LINK_OK; } static GstElementStateReturn @@ -283,7 +283,7 @@ gst_videotestsrc_init (GstVideotestsrc * videotestsrc) gst_pad_set_getcaps_function (videotestsrc->srcpad, gst_videotestsrc_getcaps); gst_element_add_pad (GST_ELEMENT (videotestsrc), videotestsrc->srcpad); gst_pad_set_get_function (videotestsrc->srcpad, gst_videotestsrc_get); - gst_pad_set_connect_function (videotestsrc->srcpad, gst_videotestsrc_srcconnect); + gst_pad_set_link_function (videotestsrc->srcpad, gst_videotestsrc_srcconnect); videotestsrc->width = 640; videotestsrc->height = 480; diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index 6408aa37a..0753aa2c1 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -140,14 +140,14 @@ volume_connect (GstPad *pad, GstCaps *caps) gint rate; filter = GST_VOLUME (gst_pad_get_parent (pad)); - g_return_val_if_fail (filter != NULL, GST_PAD_CONNECT_REFUSED); - g_return_val_if_fail (GST_IS_VOLUME (filter), GST_PAD_CONNECT_REFUSED); + g_return_val_if_fail (filter != NULL, GST_PAD_LINK_REFUSED); + g_return_val_if_fail (GST_IS_VOLUME (filter), GST_PAD_LINK_REFUSED); otherpad = (pad == filter->srcpad ? filter->sinkpad : filter->srcpad); if (GST_CAPS_IS_FIXED (caps)) { GstPadConnectReturn set_retval; if (!volume_parse_caps (filter, caps)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; if ((set_retval = gst_pad_try_set_caps(otherpad, caps)) > 0) if (gst_caps_get_int (caps, "rate", &rate)){ @@ -156,7 +156,7 @@ volume_connect (GstPad *pad, GstCaps *caps) return set_retval; } - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } static gboolean @@ -230,10 +230,10 @@ static void volume_init (GstVolume *filter) { filter->sinkpad = gst_pad_new_from_template(volume_sink_factory (),"sink"); - gst_pad_set_connect_function(filter->sinkpad,volume_connect); + gst_pad_set_link_function(filter->sinkpad,volume_connect); gst_pad_set_bufferpool_function(filter->sinkpad,volume_get_bufferpool); filter->srcpad = gst_pad_new_from_template(volume_src_factory (),"src"); - gst_pad_set_connect_function(filter->srcpad,volume_connect); + gst_pad_set_link_function(filter->srcpad,volume_connect); gst_element_add_pad(GST_ELEMENT(filter),filter->sinkpad); gst_element_add_pad(GST_ELEMENT(filter),filter->srcpad); diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c index 89361f8c1..d22fd4fc3 100644 --- a/sys/v4l/gstv4lmjpegsink.c +++ b/sys/v4l/gstv4lmjpegsink.c @@ -166,7 +166,7 @@ gst_v4lmjpegsink_init (GstV4lMjpegSink *v4lmjpegsink) gst_element_add_pad (GST_ELEMENT (v4lmjpegsink), v4lmjpegsink->sinkpad); gst_pad_set_chain_function (v4lmjpegsink->sinkpad, gst_v4lmjpegsink_chain); - gst_pad_set_connect_function (v4lmjpegsink->sinkpad, gst_v4lmjpegsink_sinkconnect); + gst_pad_set_link_function (v4lmjpegsink->sinkpad, gst_v4lmjpegsink_sinkconnect); v4lmjpegsink->clock = NULL; @@ -202,13 +202,13 @@ gst_v4lmjpegsink_sinkconnect (GstPad *pad, /* we are not going to act on variable caps */ if (!GST_CAPS_IS_FIXED (vscapslist) || !GST_V4L_IS_OPEN(GST_V4LELEMENT(v4lmjpegsink))) - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; /* in case the buffers are active (which means that we already * did capsnego before and didn't clean up), clean up anyways */ if (GST_V4L_IS_ACTIVE(GST_V4LELEMENT(v4lmjpegsink))) if (!gst_v4lmjpegsink_playback_deinit(v4lmjpegsink)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; for (caps = vscapslist; caps != NULL; caps = vscapslist = vscapslist->next) { @@ -231,11 +231,11 @@ gst_v4lmjpegsink_sinkconnect (GstPad *pad, g_signal_emit (G_OBJECT (v4lmjpegsink), gst_v4lmjpegsink_signals[SIGNAL_HAVE_SIZE], 0, v4lmjpegsink->width, v4lmjpegsink->height); - return GST_PAD_CONNECT_OK; + return GST_PAD_LINK_OK; } /* if we got here - it's not good */ - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 8f70dd02a..5a170df51 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -185,7 +185,7 @@ gst_v4lmjpegsrc_init (GstV4lMjpegSrc *v4lmjpegsrc) gst_element_add_pad(GST_ELEMENT(v4lmjpegsrc), v4lmjpegsrc->srcpad); gst_pad_set_get_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_get); - gst_pad_set_connect_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconnect); + gst_pad_set_link_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconnect); gst_pad_set_convert_function (v4lmjpegsrc->srcpad, gst_v4lmjpegsrc_srcconvert); v4lmjpegsrc->bufferpool = gst_buffer_pool_new( @@ -287,11 +287,11 @@ gst_v4lmjpegsrc_srcconnect (GstPad *pad, if (GST_V4L_IS_ACTIVE(GST_V4LELEMENT(v4lmjpegsrc))) { if (!gst_v4lmjpegsrc_capture_deinit(v4lmjpegsrc)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } else if (!GST_V4L_IS_OPEN(GST_V4LELEMENT(v4lmjpegsrc))) { - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } /* Note: basically, we don't give a damn about the opposite caps here. @@ -302,7 +302,7 @@ gst_v4lmjpegsrc_srcconnect (GstPad *pad, /* set buffer info */ if (!gst_v4lmjpegsrc_set_buffer(v4lmjpegsrc, v4lmjpegsrc->numbufs, v4lmjpegsrc->bufsize)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; /* set capture parameters and mmap the buffers */ if (!v4lmjpegsrc->frame_width && !v4lmjpegsrc->frame_height && @@ -311,7 +311,7 @@ gst_v4lmjpegsrc_srcconnect (GstPad *pad, { if (!gst_v4lmjpegsrc_set_capture(v4lmjpegsrc, v4lmjpegsrc->horizontal_decimation, v4lmjpegsrc->quality)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } else { @@ -320,7 +320,7 @@ gst_v4lmjpegsrc_srcconnect (GstPad *pad, v4lmjpegsrc->frame_width, v4lmjpegsrc->frame_height, v4lmjpegsrc->horizontal_decimation, v4lmjpegsrc->vertical_decimation, v4lmjpegsrc->quality)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } /* we now have an actual width/height - *set it* */ caps = gst_caps_new("v4lmjpegsrc_caps", @@ -329,15 +329,15 @@ gst_v4lmjpegsrc_srcconnect (GstPad *pad, "width", GST_PROPS_INT(v4lmjpegsrc->end_width), "height", GST_PROPS_INT(v4lmjpegsrc->end_height), NULL ) ); - if ((ret_val = gst_pad_try_set_caps(v4lmjpegsrc->srcpad, caps)) == GST_PAD_CONNECT_REFUSED) - return GST_PAD_CONNECT_REFUSED; - else if (ret_val == GST_PAD_CONNECT_DELAYED) - return GST_PAD_CONNECT_DELAYED; + if ((ret_val = gst_pad_try_set_caps(v4lmjpegsrc->srcpad, caps)) == GST_PAD_LINK_REFUSED) + return GST_PAD_LINK_REFUSED; + else if (ret_val == GST_PAD_LINK_DELAYED) + return GST_PAD_LINK_DELAYED; if (!gst_v4lmjpegsrc_capture_init(v4lmjpegsrc)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; - return GST_PAD_CONNECT_DONE; + return GST_PAD_LINK_DONE; } diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index 972b02496..df56b679e 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -162,7 +162,7 @@ gst_v4lsrc_init (GstV4lSrc *v4lsrc) gst_element_add_pad(GST_ELEMENT(v4lsrc), v4lsrc->srcpad); gst_pad_set_get_function (v4lsrc->srcpad, gst_v4lsrc_get); - gst_pad_set_connect_function (v4lsrc->srcpad, gst_v4lsrc_srcconnect); + gst_pad_set_link_function (v4lsrc->srcpad, gst_v4lsrc_srcconnect); gst_pad_set_convert_function (v4lsrc->srcpad, gst_v4lsrc_srcconvert); v4lsrc->bufferpool = gst_buffer_pool_new( @@ -255,11 +255,11 @@ gst_v4lsrc_srcconnect (GstPad *pad, if (GST_V4L_IS_ACTIVE(GST_V4LELEMENT(v4lsrc))) { if (!gst_v4lsrc_capture_deinit(v4lsrc)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } else if (!GST_V4L_IS_OPEN(GST_V4LELEMENT(v4lsrc))) { - return GST_PAD_CONNECT_DELAYED; + return GST_PAD_LINK_DELAYED; } palette = v4lsrc->palette; @@ -419,22 +419,22 @@ gst_v4lsrc_srcconnect (GstPad *pad, gst_caps_debug (newcaps, "new caps to set on v4lsrc's src pad"); - if ((ret_val = gst_pad_try_set_caps(v4lsrc->srcpad, newcaps)) == GST_PAD_CONNECT_REFUSED) + if ((ret_val = gst_pad_try_set_caps(v4lsrc->srcpad, newcaps)) == GST_PAD_LINK_REFUSED) continue; - else if (ret_val == GST_PAD_CONNECT_DELAYED) - return GST_PAD_CONNECT_DELAYED; + else if (ret_val == GST_PAD_LINK_DELAYED) + return GST_PAD_LINK_DELAYED; if (!gst_v4lsrc_set_capture(v4lsrc, v4lsrc->width, v4lsrc->height, palette)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; if (!gst_v4lsrc_capture_init(v4lsrc)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; - return GST_PAD_CONNECT_DONE; + return GST_PAD_LINK_DONE; } /* still nothing - no good caps */ - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; } diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index b8fcad774..b9055fbed 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -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); diff --git a/tests/examples/seek/spider_seek.c b/tests/examples/seek/spider_seek.c index 6c88ae441..3b155cdea 100644 --- a/tests/examples/seek/spider_seek.c +++ b/tests/examples/seek/spider_seek.c @@ -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); diff --git a/tests/examples/seek/vorbisfile.c b/tests/examples/seek/vorbisfile.c index 304c18511..9bc4adfc3 100644 --- a/tests/examples/seek/vorbisfile.c +++ b/tests/examples/seek/vorbisfile.c @@ -55,14 +55,12 @@ print_caps (GstCaps *caps) default: break; } - walk = g_list_next (walk); } } else { g_print (" unkown caps type\n"); } - } static void @@ -92,7 +90,7 @@ static void print_lbs_info (struct probe_context *context, gint stream) { const GstFormat *formats; - + /* FIXME: need a better name here */ g_print (" stream info:\n"); @@ -114,10 +112,10 @@ print_lbs_info (struct probe_context *context, gint stream) definition = gst_format_get_details (format); /* get start and end position of this stream */ - res = gst_pad_convert (context->pad, + res = gst_pad_convert (context->pad, context->ls_format, stream, &format, &value_start); - res &= gst_pad_convert (context->pad, + res &= gst_pad_convert (context->pad, context->ls_format, stream + 1, &format, &value_end); @@ -127,7 +125,7 @@ print_lbs_info (struct probe_context *context, gint stream) if (format == GST_FORMAT_TIME) { value_end /= (GST_SECOND/100); - g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, + g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, value_end/6000, (value_end/100)%60, (value_end%100)); } else { @@ -148,13 +146,13 @@ deep_notify (GObject *object, GstObject *origin, GValue value = { 0, }; if (!strcmp (pspec->name, "metadata")) { - + g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (origin), pspec->name, &value); context->metadata = g_value_peek_pointer (&value); } else if (!strcmp (pspec->name, "streaminfo")) { - + g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (origin), pspec->name, &value); context->streaminfo = g_value_peek_pointer (&value); @@ -175,7 +173,7 @@ collect_logical_stream_properties (struct probe_context *context, gint stream) GstEvent *event; gboolean res; gint count; - + g_print ("info for logical stream %d:\n", stream); /* seek to stream */ @@ -196,14 +194,14 @@ collect_logical_stream_properties (struct probe_context *context, gint stream) count++; if (count > 10) break; } - + print_caps (context->metadata); print_caps (context->streaminfo); print_format (context->caps); print_lbs_info (context, stream); g_print ("\n"); - + return TRUE; } @@ -226,11 +224,11 @@ collect_stream_properties (struct probe_context *context) gint64 value; gboolean res; GstFormat format; - + format = *formats; formats++; - res = gst_pad_query (context->pad, GST_QUERY_TOTAL, + res = gst_pad_query (context->pad, GST_QUERY_TOTAL, &format, &value); definition = gst_format_get_details (format); @@ -238,7 +236,7 @@ collect_stream_properties (struct probe_context *context) if (res) { if (format == GST_FORMAT_TIME) { value /= (GST_SECOND/100); - g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, + g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, value/6000, (value/100)%60, (value%100)); } else { @@ -265,7 +263,7 @@ main (int argc, char **argv) GstFormat logical_stream_format; struct probe_context *context; gint stream; - + gst_init (&argc, &argv); if (argc < 2) { @@ -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); @@ -300,9 +298,9 @@ main (int argc, char **argv) context->pad = pad; context->ls_format = logical_stream_format; - g_signal_connect (G_OBJECT (pipeline), "deep_notify", + g_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (deep_notify), context); - + gst_element_set_state (pipeline, GST_STATE_PLAYING); /* at this point we can inspect the stream */ @@ -314,7 +312,7 @@ main (int argc, char **argv) collect_logical_stream_properties (context, stream); stream++; } - + /* stop probe */ gst_element_set_state (pipeline, GST_STATE_NULL); diff --git a/tests/old/examples/dynparams/filter.c b/tests/old/examples/dynparams/filter.c index 39240500d..7554101f5 100644 --- a/tests/old/examples/dynparams/filter.c +++ b/tests/old/examples/dynparams/filter.c @@ -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, diff --git a/tests/old/examples/seek/cdparanoia.c b/tests/old/examples/seek/cdparanoia.c index db7223ffe..f0e1fe1e5 100644 --- a/tests/old/examples/seek/cdparanoia.c +++ b/tests/old/examples/seek/cdparanoia.c @@ -112,15 +112,16 @@ get_track_info (GstElement *cdparanoia) } if (res) { - /* for the first track (i==0) we wait until we have the + /* for the first track (i==0) we wait until we have the * time of the next track */ 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 { @@ -142,7 +143,7 @@ main (int argc, char **argv) GstEvent *event; gint count; gboolean res; - + gst_init (&argc, &argv); pipeline = gst_pipeline_new ("pipeline"); @@ -157,11 +158,11 @@ 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_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (gst_element_default_deep_notify), NULL); - + gst_element_set_state (pipeline, GST_STATE_PAUSED); /* now we go into probe mode */ @@ -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) diff --git a/tests/old/examples/seek/spider_seek.c b/tests/old/examples/seek/spider_seek.c index 6c88ae441..3b155cdea 100644 --- a/tests/old/examples/seek/spider_seek.c +++ b/tests/old/examples/seek/spider_seek.c @@ -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); diff --git a/tests/old/examples/seek/vorbisfile.c b/tests/old/examples/seek/vorbisfile.c index 304c18511..9bc4adfc3 100644 --- a/tests/old/examples/seek/vorbisfile.c +++ b/tests/old/examples/seek/vorbisfile.c @@ -55,14 +55,12 @@ print_caps (GstCaps *caps) default: break; } - walk = g_list_next (walk); } } else { g_print (" unkown caps type\n"); } - } static void @@ -92,7 +90,7 @@ static void print_lbs_info (struct probe_context *context, gint stream) { const GstFormat *formats; - + /* FIXME: need a better name here */ g_print (" stream info:\n"); @@ -114,10 +112,10 @@ print_lbs_info (struct probe_context *context, gint stream) definition = gst_format_get_details (format); /* get start and end position of this stream */ - res = gst_pad_convert (context->pad, + res = gst_pad_convert (context->pad, context->ls_format, stream, &format, &value_start); - res &= gst_pad_convert (context->pad, + res &= gst_pad_convert (context->pad, context->ls_format, stream + 1, &format, &value_end); @@ -127,7 +125,7 @@ print_lbs_info (struct probe_context *context, gint stream) if (format == GST_FORMAT_TIME) { value_end /= (GST_SECOND/100); - g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, + g_print (" %s: %lld:%02lld.%02lld\n", definition->nick, value_end/6000, (value_end/100)%60, (value_end%100)); } else { @@ -148,13 +146,13 @@ deep_notify (GObject *object, GstObject *origin, GValue value = { 0, }; if (!strcmp (pspec->name, "metadata")) { - + g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (origin), pspec->name, &value); context->metadata = g_value_peek_pointer (&value); } else if (!strcmp (pspec->name, "streaminfo")) { - + g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (origin), pspec->name, &value); context->streaminfo = g_value_peek_pointer (&value); @@ -175,7 +173,7 @@ collect_logical_stream_properties (struct probe_context *context, gint stream) GstEvent *event; gboolean res; gint count; - + g_print ("info for logical stream %d:\n", stream); /* seek to stream */ @@ -196,14 +194,14 @@ collect_logical_stream_properties (struct probe_context *context, gint stream) count++; if (count > 10) break; } - + print_caps (context->metadata); print_caps (context->streaminfo); print_format (context->caps); print_lbs_info (context, stream); g_print ("\n"); - + return TRUE; } @@ -226,11 +224,11 @@ collect_stream_properties (struct probe_context *context) gint64 value; gboolean res; GstFormat format; - + format = *formats; formats++; - res = gst_pad_query (context->pad, GST_QUERY_TOTAL, + res = gst_pad_query (context->pad, GST_QUERY_TOTAL, &format, &value); definition = gst_format_get_details (format); @@ -238,7 +236,7 @@ collect_stream_properties (struct probe_context *context) if (res) { if (format == GST_FORMAT_TIME) { value /= (GST_SECOND/100); - g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, + g_print (" total %s: %lld:%02lld.%02lld\n", definition->nick, value/6000, (value/100)%60, (value%100)); } else { @@ -265,7 +263,7 @@ main (int argc, char **argv) GstFormat logical_stream_format; struct probe_context *context; gint stream; - + gst_init (&argc, &argv); if (argc < 2) { @@ -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); @@ -300,9 +298,9 @@ main (int argc, char **argv) context->pad = pad; context->ls_format = logical_stream_format; - g_signal_connect (G_OBJECT (pipeline), "deep_notify", + g_signal_connect (G_OBJECT (pipeline), "deep_notify", G_CALLBACK (deep_notify), context); - + gst_element_set_state (pipeline, GST_STATE_PLAYING); /* at this point we can inspect the stream */ @@ -314,7 +312,7 @@ main (int argc, char **argv) collect_logical_stream_properties (context, stream); stream++; } - + /* stop probe */ gst_element_set_state (pipeline, GST_STATE_NULL); |