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 e116d853
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)
......
This diff is collapsed.
......@@ -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);
......
......@@ -244,7 +244,7 @@ gst_aasink_sinkconnect (GstPad *pad, GstCaps *caps)
aasink = GST_AASINK (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, "width", &aasink->width);
gst_caps_get_int (caps, "height", &aasink->height);
......@@ -256,7 +256,7 @@ gst_aasink_sinkconnect (GstPad *pad, GstCaps *caps)
g_signal_emit( G_OBJECT (aasink), gst_aasink_signals[SIGNAL_HAVE_SIZE], 0,
aasink->width, aasink->height);
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static void
......@@ -274,7 +274,7 @@ gst_aasink_init (GstAASink *aasink)
GST_PAD_TEMPLATE_GET (sink_template), "sink");
gst_element_add_pad (GST_ELEMENT (aasink), aasink->sinkpad);
gst_pad_set_chain_function (aasink->sinkpad, gst_aasink_chain);
gst_pad_set_connect_function (aasink->sinkpad, gst_aasink_sinkconnect);
gst_pad_set_link_function (aasink->sinkpad, gst_aasink_sinkconnect);
memcpy(&aasink->ascii_surf, &aa_defparams, sizeof (struct aa_hardware_params));
aasink->ascii_parms.bright = 0;
......
......@@ -784,7 +784,7 @@ gst_dvdec_loop (GstElement *element)
dvdec->next_ts += (GST_SECOND*100) / dvdec->framerate;
if (GST_PAD_IS_CONNECTED (dvdec->audiosrcpad)) {
if (GST_PAD_IS_LINKED (dvdec->audiosrcpad)) {
gint16 *a_ptr;
gint i, j;
......@@ -822,7 +822,7 @@ gst_dvdec_loop (GstElement *element)
gst_dvdec_push (dvdec, outbuf, dvdec->audiosrcpad, ts);
}
if (GST_PAD_IS_CONNECTED (dvdec->videosrcpad)) {
if (GST_PAD_IS_LINKED (dvdec->videosrcpad)) {
guint8 *outframe;
guint8 *outframe_ptrs[3];
gint outframe_pitches[3];
......
......@@ -193,7 +193,7 @@ gst_esdsink_init(GstEsdsink *esdsink)
GST_PAD_TEMPLATE_GET (sink_factory), "sink");
gst_element_add_pad(GST_ELEMENT(esdsink), esdsink->sinkpad);
gst_pad_set_chain_function(esdsink->sinkpad, GST_DEBUG_FUNCPTR(gst_esdsink_chain));
gst_pad_set_connect_function(esdsink->sinkpad, gst_esdsink_sinkconnect);
gst_pad_set_link_function(esdsink->sinkpad, gst_esdsink_sinkconnect);
esdsink->mute = FALSE;
esdsink->fd = -1;
......@@ -226,16 +226,16 @@ gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps)
esdsink = GST_ESDSINK (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, "depth", &esdsink->depth);
gst_caps_get_int (caps, "channels", &esdsink->channels);
gst_caps_get_int (caps, "rate", &esdsink->frequency);
if (gst_esdsink_sync_parms (esdsink))
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
static void
......
......@@ -265,7 +265,7 @@ gst_flacenc_init (FlacEnc *flacenc)
flacenc->sinkpad = gst_pad_new_from_template (gst_flacenc_sink_template, "sink");
gst_element_add_pad(GST_ELEMENT(flacenc),flacenc->sinkpad);
gst_pad_set_chain_function(flacenc->sinkpad,gst_flacenc_chain);
gst_pad_set_connect_function (flacenc->sinkpad, gst_flacenc_sinkconnect);
gst_pad_set_link_function (flacenc->sinkpad, gst_flacenc_sinkconnect);
flacenc->srcpad = gst_pad_new_from_template (gst_flacenc_src_template, "src");
gst_element_add_pad(GST_ELEMENT(flacenc),flacenc->srcpad);
......@@ -306,7 +306,7 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps)
flacenc = GST_FLACENC (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", &flacenc->channels);
gst_caps_get_int (caps, "depth", &flacenc->depth);
......@@ -321,7 +321,7 @@ gst_flacenc_sinkconnect (GstPad *pad, GstCaps *caps)
flacenc->negotiated = TRUE;
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static gboolean
......
......@@ -174,7 +174,7 @@ gst_jpegdec_chain (GstPad *pad, GstBuffer *buf)
jpegdec = GST_JPEGDEC (GST_OBJECT_PARENT (pad));
if (!GST_PAD_IS_CONNECTED (jpegdec->srcpad)) {
if (!GST_PAD_IS_LINKED (jpegdec->srcpad)) {
gst_buffer_unref (buf);
return;
}
......
......@@ -447,13 +447,13 @@ gst_ladspa_init (GstLADSPA *ladspa)
ladspa->newcaps = TRUE;
gst_pad_set_connect_function (ladspa->srcpads[0], gst_ladspa_connect_get);
gst_pad_set_link_function (ladspa->srcpads[0], gst_ladspa_connect_get);
gst_pad_set_get_function (ladspa->srcpads[0], gst_ladspa_get);
} else if (sinkcount==1){
/* with one sink we can use the chain function */
GST_DEBUG (0, "chain mode");
gst_pad_set_connect_function (ladspa->sinkpads[0], gst_ladspa_connect);
gst_pad_set_link_function (ladspa->sinkpads[0], gst_ladspa_connect);
gst_pad_set_chain_function (ladspa->sinkpads[0], gst_ladspa_chain);
gst_pad_set_bufferpool_function (ladspa->sinkpads[0], gst_ladspa_get_bufferpool);
} else if (sinkcount > 1){
......@@ -461,7 +461,7 @@ gst_ladspa_init (GstLADSPA *ladspa)
GST_DEBUG (0, "loop mode with %d sink pads and %d src pads", sinkcount, srccount);
for (i=0;i<sinkcount;i++) {
gst_pad_set_connect_function (ladspa->sinkpads[i], gst_ladspa_connect);
gst_pad_set_link_function (ladspa->sinkpads[i], gst_ladspa_connect);
gst_pad_set_bufferpool_function (ladspa->sinkpads[i], gst_ladspa_get_bufferpool);
}
gst_element_set_loop_function (GST_ELEMENT (ladspa), gst_ladspa_loop);
......@@ -490,8 +490,8 @@ gst_ladspa_connect (GstPad *pad, GstCaps *caps)
guint i;
gint rate;
g_return_val_if_fail (caps != NULL, GST_PAD_CONNECT_DELAYED);
g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_DELAYED);
g_return_val_if_fail (caps != NULL, GST_PAD_LINK_DELAYED);
g_return_val_if_fail (pad != NULL, GST_PAD_LINK_DELAYED);
if (gst_caps_get_int (caps, "rate", &rate)){
/* have to instantiate ladspa plugin when samplerate changes (groan) */
......@@ -499,7 +499,7 @@ gst_ladspa_connect (GstPad *pad, GstCaps *caps)
ladspa->samplerate = rate;
if (! gst_ladspa_instantiate(ladspa))
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
}
......@@ -509,11 +509,11 @@ gst_ladspa_connect (GstPad *pad, GstCaps *caps)
if (GST_CAPS_IS_FIXED (caps)) {
for (i=0;i<oclass->numsrcpads;i++) {
if (gst_pad_try_set_caps (ladspa->srcpads[i], caps) <= 0)
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
}
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static GstPadConnectReturn
......@@ -522,18 +522,18 @@ gst_ladspa_connect_get (GstPad *pad, GstCaps *caps)
GstLADSPA *ladspa = (GstLADSPA*)GST_OBJECT_PARENT (pad);
gint rate;
g_return_val_if_fail (caps != NULL, GST_PAD_CONNECT_DELAYED);
g_return_val_if_fail (pad != NULL, GST_PAD_CONNECT_DELAYED);
g_return_val_if_fail (caps != NULL, GST_PAD_LINK_DELAYED);
g_return_val_if_fail (pad != NULL, GST_PAD_LINK_DELAYED);
if (gst_caps_get_int (caps, "rate", &rate)){
if (ladspa->samplerate != rate) {
ladspa->samplerate = rate;
if (! gst_ladspa_instantiate(ladspa))
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
}
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static void
......
......@@ -116,7 +116,7 @@ gst_pngenc_sinkconnect (GstPad * pad, GstCaps * caps)
pngenc = GST_PNGENC (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, "width", &pngenc->width);
gst_caps_get_int (caps, "height", &pngenc->height);
......@@ -135,7 +135,7 @@ gst_pngenc_init (GstPngEnc * pngenc)
gst_element_add_pad (GST_ELEMENT (pngenc), pngenc->srcpad);
gst_pad_set_chain_function (pngenc->sinkpad, gst_pngenc_chain);
gst_pad_set_connect_function (pngenc->sinkpad, gst_pngenc_sinkconnect);
gst_pad_set_link_function (pngenc->sinkpad, gst_pngenc_sinkconnect);
pngenc->png_struct_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, (png_voidp)NULL, user_error_fn, user_warning_fn);
if ( pngenc->png_struct_ptr == NULL )
......
......@@ -196,7 +196,7 @@ gst_shout2send_init (GstShout2send *shout2send)
gst_element_add_pad(GST_ELEMENT(shout2send),shout2send->sinkpad);
gst_pad_set_chain_function(shout2send->sinkpad,gst_shout2send_chain);
gst_pad_set_connect_function (shout2send->sinkpad, gst_shout2send_connect);
gst_pad_set_link_function (shout2send->sinkpad, gst_shout2send_connect);
shout2send->ip = g_strdup ("127.0.0.1");
shout2send->port = 8000;
......@@ -361,16 +361,16 @@ gst_shout2send_connect (GstPad *pad, GstCaps *caps)
if (!strcmp(gst_caps_get_mime (caps), "audio/x-mp3"))
{
audio_format = SHOUT_FORMAT_MP3;
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
if (!strcmp(gst_caps_get_mime (caps), "application/x-ogg"))
{
audio_format = SHOUT_FORMAT_VORBIS;
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
else {
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
}
......
......@@ -93,7 +93,7 @@ gst_speexdec_init (GstSpeexDec *speexdec)
speexdec->sinkpad = gst_pad_new_from_template (speexdec_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (speexdec), speexdec->sinkpad);
gst_pad_set_chain_function (speexdec->sinkpad, gst_speexdec_chain);
gst_pad_set_connect_function (speexdec->sinkpad, gst_speexdec_sinkconnect);
gst_pad_set_link_function (speexdec->sinkpad, gst_speexdec_sinkconnect);
speexdec->srcpad = gst_pad_new_from_template (speexdec_src_template, "src");
gst_element_add_pad (GST_ELEMENT (speexdec), speexdec->srcpad);
......@@ -109,7 +109,7 @@ gst_speexdec_sinkconnect (GstPad *pad, GstCaps *caps)
speexdec = GST_SPEEXDEC (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, "rate", &rate);
......@@ -127,9 +127,9 @@ gst_speexdec_sinkconnect (GstPad *pad, GstCaps *caps)
"channels", GST_PROPS_INT (1)
)))
{
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
static void
......
......@@ -102,7 +102,7 @@ gst_speexenc_init (GstSpeexEnc *speexenc)
speexenc->sinkpad = gst_pad_new_from_template (speexenc_sink_template, "sink");
gst_element_add_pad (GST_ELEMENT (speexenc), speexenc->sinkpad);
gst_pad_set_chain_function (speexenc->sinkpad, gst_speexenc_chain);
gst_pad_set_connect_function (speexenc->sinkpad, gst_speexenc_sinkconnect);
gst_pad_set_link_function (speexenc->sinkpad, gst_speexenc_sinkconnect);
speexenc->srcpad = gst_pad_new_from_template (speexenc_src_template, "src");
gst_element_add_pad (GST_ELEMENT (speexenc), speexenc->srcpad);
......@@ -122,7 +122,7 @@ gst_speexenc_sinkconnect (GstPad *pad, GstCaps *caps)
speexenc = GST_SPEEXENC (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, "rate", &speexenc->rate);
if (gst_pad_try_set_caps (speexenc->srcpad, GST_CAPS_NEW (
......@@ -137,9 +137,9 @@ gst_speexenc_sinkconnect (GstPad *pad, GstCaps *caps)
speexenc->state = speex_encoder_init(speexenc->mode);
speex_encoder_ctl(speexenc->state, SPEEX_GET_FRAME_SIZE, &speexenc->frame_size);
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
}
......
......@@ -162,7 +162,7 @@ gst_bpwsinc_init (GstBPWSinc * filter)
{
filter->sinkpad = gst_pad_new_from_template (gst_filter_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_bpwsinc_chain);
gst_pad_set_connect_function (filter->sinkpad, gst_bpwsinc_sink_connect);
gst_pad_set_link_function (filter->sinkpad, gst_bpwsinc_sink_connect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_filter_src_factory (), "src");
......@@ -189,7 +189,7 @@ gst_bpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
g_assert (caps != NULL);
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
return GST_PAD_LINK_DELAYED;
set_retval = gst_pad_try_set_caps (filter->srcpad, caps);
......
......@@ -154,7 +154,7 @@ gst_lpwsinc_init (GstLPWSinc * filter)
{
filter->sinkpad = gst_pad_new_from_template (gst_filter_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_lpwsinc_chain);
gst_pad_set_connect_function (filter->sinkpad, gst_lpwsinc_sink_connect);
gst_pad_set_link_function (filter->sinkpad, gst_lpwsinc_sink_connect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_filter_src_factory (), "src");
......@@ -178,7 +178,7 @@ gst_lpwsinc_sink_connect (GstPad * pad, GstCaps * caps)
g_assert (caps != NULL);
if (!GST_CAPS_IS_FIXED (caps))
return GST_PAD_CONNECT_DELAYED;
return GST_PAD_LINK_DELAYED;
set_retval = gst_pad_try_set_caps(filter->srcpad, caps);
......
......@@ -303,7 +303,7 @@ gst_avimux_sinkconnect (GstPad *pad, GstCaps *vscaps)
/* we are not going to act on variable caps */
if (!GST_CAPS_IS_FIXED (vscaps))
return GST_PAD_CONNECT_DELAYED;
return GST_PAD_LINK_DELAYED;
GST_DEBUG (0, "avimux: sinkconnect triggered on %s", gst_pad_get_name (pad));
......@@ -435,10 +435,10 @@ gst_avimux_sinkconnect (GstPad *pad, GstCaps *vscaps)
goto done;
}
}
return GST_PAD_CONNECT_REFUSED;
return GST_PAD_LINK_REFUSED;
done:
return GST_PAD_CONNECT_OK;
return GST_PAD_LINK_OK;
}
static void
......@@ -467,7 +467,7 @@ gst_avimux_pad_connect (GstPad *pad,
}
static void
gst_avimux_pad_disconnect (GstPad *pad,
gst_avimux_pad_unlink (GstPad *pad,
GstPad *peer,
gpointer data)
{
......@@ -490,7 +490,7 @@ gst_avimux_pad_disconnect (GstPad *pad,
return;
}
GST_DEBUG(GST_CAT_PLUGIN_INFO, "pad '%s' disconnected", padname);
GST_DEBUG(GST_CAT_PLUGIN_INFO, "pad '%s' unlinked", padname);
/* is this allowed? */
gst_pad_destroy(pad);
......@@ -532,9 +532,9 @@ gst_avimux_request_new_pad (GstElement *element,
g_signal_connect(newpad, "connected",
G_CALLBACK(gst_avimux_pad_connect), (gpointer)avimux);
g_signal_connect(newpad, "disconnected",
G_CALLBACK(gst_avimux_pad_disconnect), (gpointer)avimux);
gst_pad_set_connect_function (newpad, gst_avimux_sinkconnect);
g_signal_connect(newpad, "unlinked",
G_CALLBACK(gst_avimux_pad_unlink), (gpointer)avimux);
gst_pad_set_link_function (newpad, gst_avimux_sinkconnect);
gst_element_add_pad (element, newpad);
gst_pad_set_event_function(newpad, gst_avimux_handle_event);
gst_pad_set_event_mask_function(newpad, gst_avimux_get_event_masks);
......
......@@ -115,13 +115,13 @@ gst_cutter_connect (GstPad *pad, GstCaps *caps)
GstPad *otherpad;
filter = GST_CUTTER (gst_pad_get_parent (pad));
g_return_val_if_fail (filter != NULL, GST_PAD_CONNECT_REFUSED);
g_return_val_if_fail (GST_IS_CUTTER (filter), GST_PAD_CONNECT_REFUSED);
g_return_val_if_fail (filter != NULL, GST_PAD_LINK_REFUSED);
g_return_val_if_fail (GST_IS_CUTTER (filter), GST_PAD_LINK_REFUSED);
otherpad = (pad == filter->srcpad ? filter->sinkpad : filter->srcpad);
if (GST_CAPS_IS_FIXED (caps))
return gst_pad_try_set_caps (otherpad, caps);
return GST_PAD_CONNECT_DELAYED;
return GST_PAD_LINK_DELAYED;
}
static void
......@@ -179,10 +179,10 @@ gst_cutter_init (GstCutter *filter)
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
gst_pad_set_chain_function (filter->sinkpad, gst_cutter_chain);
gst_pad_set_connect_function (filter->sinkpad, gst_cutter_connect);
gst_pad_set_link_function (filter->sinkpad, gst_cutter_connect);
filter->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
gst_pad_set_connect_function (filter->srcpad, gst_cutter_connect);
gst_pad_set_link_function (filter->srcpad, gst_cutter_connect);
}
static void
......
......@@ -157,7 +157,7 @@ gst_agingtv_sinkconnect (GstPad * pad, GstCaps * caps)
filter = GST_AGINGTV (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, "width", &filter->width);
gst_caps_get_int (caps, "height", &filter->height);
......@@ -174,7 +174,7 @@ gst_agingtv_init (GstAgingTV * filter)
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_agingtv_chain);
gst_pad_set_connect_function (filter->sinkpad, gst_agingtv_sinkconnect);
gst_pad_set_link_function (filter->sinkpad, gst_agingtv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
......
......@@ -163,7 +163,7 @@ gst_dicetv_sinkconnect (GstPad * pad, GstCaps * caps)
filter = GST_DICETV (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, "width", &filter->width);
gst_caps_get_int (caps, "height", &filter->height);
......@@ -180,7 +180,7 @@ gst_dicetv_init (GstDiceTV * filter)
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_dicetv_chain);
gst_pad_set_connect_function (filter->sinkpad, gst_dicetv_sinkconnect);
gst_pad_set_link_function (filter->sinkpad, gst_dicetv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
......
......@@ -137,7 +137,7 @@ gst_edgetv_sinkconnect (GstPad * pad, GstCaps * caps)
filter = GST_EDGETV (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, "width", &filter->width);
gst_caps_get_int (caps, "height", &filter->height);
......@@ -158,7 +158,7 @@ gst_edgetv_init (GstEdgeTV * filter)
{