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;
/* 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;
}
/* 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;
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),
/* 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);