diff --git a/gst/camerabin/camerabingeneral.c b/gst/camerabin/camerabingeneral.c index 5b4df175fe..f1cf35da02 100644 --- a/gst/camerabin/camerabingeneral.c +++ b/gst/camerabin/camerabingeneral.c @@ -95,7 +95,8 @@ gst_camerabin_try_add_element (GstBin * bin, GstElement * new_elem) GST_DEBUG_PAD_NAME (bin_pad)); bin_elem = gst_pad_get_parent_element (bin_pad); gst_object_unref (bin_pad); - if (!gst_element_link (bin_elem, new_elem)) { + if (!gst_element_link_pads_full (bin_elem, NULL, new_elem, NULL, + GST_PAD_LINK_CHECK_CAPS)) { gst_object_ref (new_elem); gst_bin_remove (bin, new_elem); ret = FALSE; diff --git a/gst/camerabin/camerabinpreview.c b/gst/camerabin/camerabinpreview.c index 688991b6b5..d1d2a81c9c 100644 --- a/gst/camerabin/camerabinpreview.c +++ b/gst/camerabin/camerabinpreview.c @@ -106,30 +106,36 @@ gst_camerabin_preview_create_pipeline (GstCameraBin * camera, GstCaps * caps, /* FIXME: linking is still way too expensive, profile this properly */ GST_DEBUG ("linking src->vscale"); - if (!gst_element_link_pads (src, "src", vscale, "sink")) + if (!gst_element_link_pads_full (src, "src", vscale, "sink", + GST_PAD_LINK_CHECK_CAPS)) return FALSE; if (src_filter) { GST_DEBUG ("linking vscale->filter"); - if (!gst_element_link_pads (vscale, "src", src_filter, "sink")) { + if (!gst_element_link_pads_full (vscale, "src", src_filter, "sink", + GST_PAD_LINK_CHECK_CAPS)) { return FALSE; } GST_DEBUG ("linking filter->csp"); - if (!gst_element_link_pads (src_filter, "src", csp, "sink")) { + if (!gst_element_link_pads_full (src_filter, "src", csp, "sink", + GST_PAD_LINK_CHECK_CAPS)) { return FALSE; } } else { GST_DEBUG ("linking vscale->csp"); - if (!gst_element_link_pads (vscale, "src", csp, "sink")) + if (!gst_element_link_pads_full (vscale, "src", csp, "sink", + GST_PAD_LINK_CHECK_CAPS)) return FALSE; } GST_DEBUG ("linking csp->capsfilter"); - if (!gst_element_link_pads (csp, "src", filter, "sink")) + if (!gst_element_link_pads_full (csp, "src", filter, "sink", + GST_PAD_LINK_CHECK_CAPS)) return FALSE; GST_DEBUG ("linking capsfilter->sink"); - if (!gst_element_link_pads (filter, "src", sink, "sink")) + if (!gst_element_link_pads_full (filter, "src", sink, "sink", + GST_PAD_LINK_CHECK_CAPS)) return FALSE; return pipe; diff --git a/gst/camerabin/camerabinvideo.c b/gst/camerabin/camerabinvideo.c index 834ffcdc43..cd6d920862 100644 --- a/gst/camerabin/camerabinvideo.c +++ b/gst/camerabin/camerabinvideo.c @@ -660,7 +660,8 @@ gst_camerabin_video_create_elements (GstCameraBinVideo * vid) } /* Link audio part to the muxer */ - if (!gst_element_link (vid->aud_enc, vid->muxer)) { + if (!gst_element_link_pads_full (vid->aud_enc, NULL, vid->muxer, NULL, + GST_PAD_LINK_CHECK_CAPS)) { GST_ELEMENT_ERROR (vid, CORE, NEGOTIATION, (NULL), ("linking audio encoder and muxer failed")); goto error; diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 315ab34ccf..5f2ef6d702 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -772,7 +772,9 @@ camerabin_create_elements (GstCameraBin * camera) unconnected_pad = gst_bin_find_unlinked_pad (GST_BIN (camera), GST_PAD_SRC); camera->pad_view_vid = gst_element_get_request_pad (camera->view_in_sel, "sink%d"); - link_ret = gst_pad_link (unconnected_pad, camera->pad_view_vid); + link_ret = + gst_pad_link_full (unconnected_pad, camera->pad_view_vid, + GST_PAD_LINK_CHECK_CAPS); gst_object_unref (unconnected_pad); if (GST_PAD_LINK_FAILED (link_ret)) { GST_ELEMENT_ERROR (camera, CORE, NEGOTIATION, (NULL), @@ -1186,7 +1188,7 @@ gst_camerabin_get_allowed_input_caps (GstCameraBin * camera) /* Reset videosrc to NULL state, some drivers seem to need this */ gst_element_set_state (videosrc, GST_STATE_NULL); if (peer_pad) { - gst_pad_link (pad, peer_pad); + gst_pad_link_full (pad, peer_pad, GST_PAD_LINK_CHECK_CAPS); gst_object_unref (peer_pad); } gst_element_set_locked_state (videosrc, FALSE);