-Subproject commit 86c508421de359776c4c2cb411a78c729330a250
+Subproject commit 2a013c06fe9bf1379966cd12e6bf8c30915c5f12
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
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,
}
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 {
GstEvent *event;
gint count;
gboolean res;
-
+
gst_init (&argc, &argv);
pipeline = gst_pipeline_new ("pipeline");
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 */
/* 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);
/* 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)
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);
}
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*
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);
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);
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);
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);
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);
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);
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);
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);
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");
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);
//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);
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);
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");
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);
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);
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");
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);
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);
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);
default:
break;
}
-
walk = g_list_next (walk);
}
}
else {
g_print (" unkown caps type\n");
}
-
}
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");
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);
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 {
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);
GstEvent *event;
gboolean res;
gint count;
-
+
g_print ("info for logical stream %d:\n", stream);
/* seek to 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;
}
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);
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 {
GstFormat logical_stream_format;
struct probe_context *context;
gint stream;
-
+
gst_init (&argc, &argv);
if (argc < 2) {
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);
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 */
collect_logical_stream_properties (context, stream);
stream++;
}
-
+
/* stop probe */
gst_element_set_state (pipeline, GST_STATE_NULL);
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);
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
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;
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;
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];
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;
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
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);
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);
flacenc->negotiated = TRUE;
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static gboolean
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;
}
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){
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);
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) */
ladspa->samplerate = rate;
if (! gst_ladspa_instantiate(ladspa))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
}
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
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
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);
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 )
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;
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;
}
}
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);
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);
"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
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);
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 (
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;
}
{
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");
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);
{
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");
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);
/* 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));
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
}
static void
-gst_avimux_pad_disconnect (GstPad *pad,
+gst_avimux_pad_unlink (GstPad *pad,
GstPad *peer,
gpointer data)
{
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);
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);
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
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
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);
{
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");
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);
{
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");
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);
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_edgetv_chain);
- gst_pad_set_connect_function (filter->sinkpad, gst_edgetv_sinkconnect);
+ gst_pad_set_link_function (filter->sinkpad, gst_edgetv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
filter = GST_QUARKTV (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);
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_quarktv_chain);
- gst_pad_set_connect_function (filter->sinkpad, gst_quarktv_sinkconnect);
+ gst_pad_set_link_function (filter->sinkpad, gst_quarktv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
filter = GST_REVTV (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);
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_revtv_chain);
- gst_pad_set_connect_function (filter->sinkpad, gst_revtv_sinkconnect);
+ gst_pad_set_link_function (filter->sinkpad, gst_revtv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
filter = GST_SHAGADELICTV (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);
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_shagadelictv_chain);
- gst_pad_set_connect_function (filter->sinkpad, gst_shagadelictv_sinkconnect);
+ gst_pad_set_link_function (filter->sinkpad, gst_shagadelictv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
filter = GST_VERTIGOTV (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);
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_vertigotv_chain);
- gst_pad_set_connect_function (filter->sinkpad, gst_vertigotv_sinkconnect);
+ gst_pad_set_link_function (filter->sinkpad, gst_vertigotv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
filter = GST_WARPTV (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);
{
filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_warptv_chain);
- gst_pad_set_connect_function (filter->sinkpad, gst_warptv_sinkconnect);
+ gst_pad_set_link_function (filter->sinkpad, gst_warptv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
gst_element_add_pad (GST_ELEMENT (goom), goom->srcpad);
gst_pad_set_chain_function (goom->sinkpad, gst_goom_chain);
- gst_pad_set_connect_function (goom->sinkpad, gst_goom_sinkconnect);
+ gst_pad_set_link_function (goom->sinkpad, gst_goom_sinkconnect);
goom->next_time = 0;
goom->peerpool = NULL;
goom = GST_GOOM (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) {
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
GstMuLawDec* mulawdec=GST_MULAWDEC (GST_OBJECT_PARENT (pad));
if (caps==NULL)
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
newcaps = gst_caps_copy(caps);
if (GST_CAPS_IS_FIXED (newcaps))
return gst_pad_try_set_caps (mulawdec->srcpad, newcaps);
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
}
GType
{
mulawdec->sinkpad = gst_pad_new_from_template(mulawdec_sink_template,"sink");
mulawdec->srcpad = gst_pad_new_from_template(mulawdec_src_template,"src");
- gst_pad_set_connect_function(mulawdec->sinkpad, mulawdec_connect_sink);
+ gst_pad_set_link_function(mulawdec->sinkpad, mulawdec_connect_sink);
gst_element_add_pad(GST_ELEMENT(mulawdec),mulawdec->sinkpad);
gst_pad_set_chain_function(mulawdec->sinkpad,gst_mulawdec_chain);
GstPad *otherpad;
filter = GST_LEVEL (gst_pad_get_parent (pad));
- g_return_val_if_fail (filter != NULL, GST_PAD_CONNECT_REFUSED);
- g_return_val_if_fail (GST_IS_LEVEL (filter), GST_PAD_CONNECT_REFUSED);
+ g_return_val_if_fail (filter != NULL, GST_PAD_LINK_REFUSED);
+ g_return_val_if_fail (GST_IS_LEVEL (filter), GST_PAD_LINK_REFUSED);
otherpad = (pad == filter->srcpad ? filter->sinkpad : filter->srcpad);
if (GST_CAPS_IS_FIXED (caps))
/*if ( !volume_parse_caps (filter, caps) || */
return gst_pad_try_set_caps (otherpad, caps);
}
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
}
static void
gst_level_init (GstLevel *filter)
{
filter->sinkpad = gst_pad_new_from_template (level_sink_factory (), "sink");
- gst_pad_set_connect_function (filter->sinkpad, gst_level_connect);
+ gst_pad_set_link_function (filter->sinkpad, gst_level_connect);
filter->srcpad = gst_pad_new_from_template (level_src_factory (), "src");
- gst_pad_set_connect_function (filter->srcpad, gst_level_connect);
+ gst_pad_set_link_function (filter->srcpad, gst_level_connect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
gst_pad_set_chain_function (filter->sinkpad, gst_level_chain);
filter = GST_MEDIAN (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);
{
median->sinkpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (median_sink_factory), "sink");
- gst_pad_set_connect_function (median->sinkpad, gst_median_sinkconnect);
+ gst_pad_set_link_function (median->sinkpad, gst_median_sinkconnect);
gst_pad_set_chain_function (median->sinkpad, gst_median_chain);
gst_element_add_pad (GST_ELEMENT (median), median->sinkpad);
gst_element_add_pad (GST_ELEMENT (monoscope), monoscope->srcpad);
gst_pad_set_chain_function (monoscope->sinkpad, gst_monoscope_chain);
- gst_pad_set_connect_function (monoscope->sinkpad, gst_monoscope_sinkconnect);
+ gst_pad_set_link_function (monoscope->sinkpad, gst_monoscope_sinkconnect);
monoscope->next_time = 0;
monoscope->peerpool = NULL;
monoscope = GST_MONOSCOPE (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps)) {
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
if (qtdemux->bs_pos < sample->offset) {
gst_qtp_skip(qtdemux,sample->offset - qtdemux->bs_pos);
- if (sample->track->pad && GST_PAD_IS_CONNECTED(sample->track->pad)) {
+ if (sample->track->pad && GST_PAD_IS_LINKED(sample->track->pad)) {
GstBuffer * buf;
buf = gst_qtp_read(qtdemux,sample->size);
GST_BUFFER_TIMESTAMP(buf) = sample->timestamp;
smpte = GST_SMPTE (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", &smpte->width);
gst_caps_get_int (caps, "height", &smpte->height);
{
smpte->sinkpad1 = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (smpte_sink1_factory), "sink1");
- gst_pad_set_connect_function (smpte->sinkpad1, gst_smpte_sinkconnect);
+ gst_pad_set_link_function (smpte->sinkpad1, gst_smpte_sinkconnect);
gst_element_add_pad (GST_ELEMENT (smpte), smpte->sinkpad1);
smpte->sinkpad2 = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (smpte_sink2_factory), "sink2");
- gst_pad_set_connect_function (smpte->sinkpad2, gst_smpte_sinkconnect);
+ gst_pad_set_link_function (smpte->sinkpad2, gst_smpte_sinkconnect);
gst_element_add_pad (GST_ELEMENT (smpte), smpte->sinkpad2);
smpte->srcpad = gst_pad_new_from_template (
serverhost = gethostbyname(udpsink->host);
if (serverhost == (struct hostent *)0) {
perror("gethostbyname");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
case CONTROL_UDP:
if ((fd = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
perror("socket");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
/* We can only do broadcast in udp */
if (sendto (fd, buf, buf_size, 0, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) == -1)
{
perror("sending");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
close (fd);
case CONTROL_TCP:
if ((fd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
perror("socket");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) {
g_printerr ("udpsink: connect to %s port %d failed: %s\n",
udpsink->host, udpsink->port, g_strerror(errno));
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
f = fdopen (dup (fd), "wb");
break;
case CONTROL_NONE:
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
break;
default:
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
break;
}
#endif
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
udpsink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
gst_element_add_pad (GST_ELEMENT (udpsink), udpsink->sinkpad);
gst_pad_set_chain_function (udpsink->sinkpad, gst_udpsink_chain);
- gst_pad_set_connect_function (udpsink->sinkpad, gst_udpsink_sinkconnect);
+ gst_pad_set_link_function (udpsink->sinkpad, gst_udpsink_sinkconnect);
udpsink->host = g_strdup (UDP_DEFAULT_HOST);
udpsink->port = UDP_DEFAULT_PORT;
caps = gst_caps_load_thyself(doc->xmlRootNode);
/* foward the connect, we don't signal back the result here... */
- gst_pad_proxy_connect (udpsrc->srcpad, caps);
+ gst_pad_proxy_link (udpsrc->srcpad, caps);
#endif
g_free (buf);
GST_PAD_TEMPLATE_GET (video_crop_sink_template_factory), "sink");
gst_element_add_pad (GST_ELEMENT (video_crop), video_crop->sinkpad);
gst_pad_set_chain_function (video_crop->sinkpad, GST_DEBUG_FUNCPTR (gst_video_crop_chain));
- gst_pad_set_connect_function (video_crop->sinkpad, GST_DEBUG_FUNCPTR (gst_video_crop_sink_connect));
+ gst_pad_set_link_function (video_crop->sinkpad, GST_DEBUG_FUNCPTR (gst_video_crop_sink_connect));
video_crop->srcpad = gst_pad_new_from_template(
GST_PAD_TEMPLATE_GET (video_crop_src_template_factory), "src");
/* we are not going to act on variable caps */
if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
video_crop = GST_VIDEO_CROP (gst_pad_get_parent (pad));
if (video_crop->crop_height + video_crop->crop_y > video_crop->height)
video_crop->crop_height = video_crop->height - video_crop->crop_y;
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
wavenc = GST_WAVENC (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", &wavenc->channels);
gst_wavenc_setup (wavenc);
if (wavenc->setup) {
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
static void
wavenc->sinkpad = gst_pad_new_from_template (sinktemplate, "sink");
gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->sinkpad);
gst_pad_set_chain_function (wavenc->sinkpad, gst_wavenc_chain);
- gst_pad_set_connect_function (wavenc->sinkpad, gst_wavenc_sinkconnect);
+ gst_pad_set_link_function (wavenc->sinkpad, gst_wavenc_sinkconnect);
wavenc->srcpad = gst_pad_new_from_template (srctemplate, "src");
gst_element_add_pad (GST_ELEMENT (wavenc), wavenc->srcpad);
osssink->sinkpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (osssink_sink_factory), "sink");
gst_element_add_pad (GST_ELEMENT (osssink), osssink->sinkpad);
- gst_pad_set_connect_function (osssink->sinkpad, gst_osssink_sinkconnect);
+ gst_pad_set_link_function (osssink->sinkpad, gst_osssink_sinkconnect);
gst_pad_set_bufferpool_function (osssink->sinkpad, gst_osssink_get_bufferpool);
gst_pad_set_convert_function (osssink->sinkpad, gst_osssink_convert);
gst_pad_set_query_function (osssink->sinkpad, gst_osssink_sink_query);
GstOssSink *osssink = GST_OSSSINK (gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
if (!gst_osscommon_parse_caps (&osssink->common, caps))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
if (!gst_osscommon_sync_parms (&osssink->common)) {
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static inline gint64
osssrc->srcpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (osssrc_src_factory), "src");
gst_pad_set_get_function (osssrc->srcpad, gst_osssrc_get);
- gst_pad_set_connect_function (osssrc->srcpad, gst_osssrc_srcconnect);
+ gst_pad_set_link_function (osssrc->srcpad, gst_osssrc_srcconnect);
gst_pad_set_convert_function (osssrc->srcpad, gst_osssrc_convert);
gst_pad_set_formats_function (osssrc->srcpad, gst_osssrc_get_formats);
gst_pad_set_event_function (osssrc->srcpad, gst_osssrc_src_event);
src = GST_OSSSRC(gst_pad_get_parent (pad));
if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
if (!gst_osscommon_parse_caps (&src->common, caps))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
if (!gst_osscommon_sync_parms (&src->common))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static gboolean
gst_element_add_pad(GST_ELEMENT(v4l2src), v4l2src->srcpad);
gst_pad_set_get_function(v4l2src->srcpad, gst_v4l2src_get);
- gst_pad_set_connect_function(v4l2src->srcpad, gst_v4l2src_srcconnect);
+ gst_pad_set_link_function(v4l2src->srcpad, gst_v4l2src_srcconnect);
gst_pad_set_convert_function (v4l2src->srcpad, gst_v4l2src_srcconvert);
gst_pad_set_getcaps_function (v4l2src->srcpad, gst_v4l2src_getcaps);
* capture session */
if (GST_V4L2_IS_ACTIVE(v4l2element)) {
if (!gst_v4l2src_capture_deinit(v4l2src))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
} else if (!GST_V4L2_IS_OPEN(v4l2element)) {
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
}
/* build our own capslist */
/* and now, get the caps that we have in common */
if (!(caps = gst_v4l2src_caps_intersect(owncapslist, vscapslist)))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
/* and get them back to V4L2-compatible fourcc codes */
if (!(fourccs = gst_v4l2_caps_to_v4l2fourcc(v4l2src, caps)))
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
/* we now have the fourcc codes. try out each of them */
for (i=0;i<g_list_length(fourccs);i++) {
v4l2src->width, v4l2src->height)) {
/* it fits! Now, get the proper counterpart and retry
* it on the other side (again...) - if it works, we're
- * done -> GST_PAD_CONNECT_OK */
+ * done -> GST_PAD_LINK_OK */
GstCaps *lastcaps = gst_v4l2src_v4l2fourcc_to_caps(format->pixelformat,
v4l2src->format.fmt.pix.width, v4l2src->format.fmt.pix.height,
format->flags & V4L2_FMT_FLAG_COMPRESSED);
onecaps = gst_caps_copy_1(lastcaps);
if ((ret_val = gst_pad_try_set_caps(v4l2src->srcpad, onecaps)) > 0) {
if (gst_v4l2src_capture_init(v4l2src))
- return GST_PAD_CONNECT_DONE;
- } else if (ret_val == GST_PAD_CONNECT_DELAYED) {
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DONE;
+ } else if (ret_val == GST_PAD_LINK_DELAYED) {
+ return GST_PAD_LINK_DELAYED;
}
}
}
}
}
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}