another batch of connect->link fixes please let me know about issues and...

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
parent 346d1228
common @ 2a013c06
Subproject commit 86c508421de359776c4c2cb411a78c729330a250
Subproject commit 2a013c06fe9bf1379966cd12e6bf8c30915c5f12
......@@ -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
......
......@@ -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,
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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! */
......
......@@ -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));
......
......@@ -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");