-Subproject commit 86c508421de359776c4c2cb411a78c729330a250
+Subproject commit 2a013c06fe9bf1379966cd12e6bf8c30915c5f12
{
ffmpegdec->sinkpad = gst_pad_new_from_template(
GST_PAD_TEMPLATE_GET(sink_templ), "sink");
- gst_pad_set_connect_function(ffmpegdec->sinkpad,
+ gst_pad_set_link_function(ffmpegdec->sinkpad,
gst_ffmpegdecall_connect);
gst_pad_set_chain_function(ffmpegdec->sinkpad,
gst_ffmpegdecall_chain);
AVCodec *plugin;
if (!GST_CAPS_IS_FIXED(caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
avcodec_get_context_defaults(ffmpegdec->context);
if ((id = gst_ffmpeg_caps_to_codecid(caps, ffmpegdec->context)) == CODEC_ID_NONE) {
GST_DEBUG(GST_CAT_PLUGIN_INFO,
"Failed to find corresponding codecID");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
if ((plugin = avcodec_find_decoder(id)) == NULL) {
GST_DEBUG(GST_CAT_PLUGIN_INFO,
"Failed to find an avdecoder for id=%d", id);
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
/* we dont send complete frames */
if (avcodec_open(ffmpegdec->context, plugin)) {
GST_DEBUG(GST_CAT_PLUGIN_INFO,
"Failed to open FFMPEG codec for id=%d", id);
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
GstFFMpegDecClass *oclass = (GstFFMpegDecClass*)(G_OBJECT_GET_CLASS (ffmpegdec));
if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
if (gst_caps_has_property_typed (caps, "width", GST_PROPS_INT_TYPE))
gst_caps_get_int (caps, "width", &ffmpegdec->context->width);
/*
if (avcodec_open (ffmpegdec->context, avcodec_find_encoder(CODEC_ID_MPEG1VIDEO)) <0 ) {
g_warning ("ffmpegdec: could not open codec");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
*/
if (avcodec_open (ffmpegdec->context, oclass->in_plugin) < 0) {
g_warning ("ffmpegdec: could not open codec");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
ffmpegdec->context = avcodec_alloc_context();
ffmpegdec->sinkpad = gst_pad_new_from_template (oclass->templ, "sink");
- gst_pad_set_connect_function (ffmpegdec->sinkpad, gst_ffmpegdec_sinkconnect);
+ gst_pad_set_link_function (ffmpegdec->sinkpad, gst_ffmpegdec_sinkconnect);
if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
ffmpegdec->srcpad = gst_pad_new_from_template (
GstFFMpegEncClass *oclass = (GstFFMpegEncClass*)(G_OBJECT_GET_CLASS(ffmpegenc));
if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
if (strstr (gst_caps_get_mime (caps), "audio/raw")) {
gst_caps_get_int (caps, "rate", &ffmpegenc->context->sample_rate);
}
else {
g_warning ("ffmpegenc: invalid caps %s\n", gst_caps_get_mime (caps));
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
if (avcodec_open (ffmpegenc->context, oclass->in_plugin) < 0) {
g_warning ("ffmpegenc: could not open codec\n");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
ffmpegenc->context->channels);
ffmpegenc->buffer_pos = 0;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
ffmpegenc->context->sample_rate = -1;
}
- gst_pad_set_connect_function (ffmpegenc->sinkpad, gst_ffmpegenc_sinkconnect);
+ gst_pad_set_link_function (ffmpegenc->sinkpad, gst_ffmpegenc_sinkconnect);
gst_element_add_pad (GST_ELEMENT (ffmpegenc), ffmpegenc->sinkpad);
ffmpegenc->srcpad = gst_pad_new_from_template (
GstFFMpegMuxClass *oclass = (GstFFMpegMuxClass*)(G_OBJECT_GET_CLASS (ffmpegmux));
if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_CONNECT_DELAYED;
+ return GST_PAD_LINK_DELAYED;
if (gst_caps_has_property_typed (caps, "width", GST_PROPS_INT_TYPE))
gst_caps_get_int (caps, "width", &ffmpegmux->context->width);
/* FIXME bug in ffmpeg */
if (avcodec_open (ffmpegmux->context, avcodec_find_encoder(CODEC_ID_MPEG1VIDEO)) <0 ) {
g_warning ("ffmpegmux: could not open codec");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
if (avcodec_open (ffmpegmux->context, oclass->in_plugin) < 0) {
g_warning ("ffmpegmux: could not open codec");
- return GST_PAD_CONNECT_REFUSED;
+ return GST_PAD_LINK_REFUSED;
}
- return GST_PAD_CONNECT_OK;
+ return GST_PAD_LINK_OK;
}
static void
ffmpegmux->sinkpad = gst_pad_new_from_template (
GST_PAD_TEMPLATE_GET (gst_ffmpegmux_sink_factory), "sink");
- gst_pad_set_connect_function (ffmpegmux->sinkpad, gst_ffmpegmux_sinkconnect);
+ gst_pad_set_link_function (ffmpegmux->sinkpad, gst_ffmpegmux_sinkconnect);
if (oclass->in_plugin->type == CODEC_TYPE_VIDEO) {
ffmpegmux->srcpad = gst_pad_new_from_template (