wrappercamerabinsrc: fix element linking order

Video source should be linked to videocrop and not to
videoconvert as it is done in the main linking path
This commit is contained in:
Thiago Santos 2015-05-01 19:31:45 -03:00
parent 105a5cce92
commit fc4f95bb7c

View file

@ -456,7 +456,6 @@ check_and_replace_src (GstWrapperCameraBinSrc * self)
{ {
GstBin *cbin = GST_BIN_CAST (self); GstBin *cbin = GST_BIN_CAST (self);
GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC_CAST (self); GstBaseCameraSrc *bcamsrc = GST_BASE_CAMERA_SRC_CAST (self);
GstElement *videoconvert;
if (self->src_vid_src && self->src_vid_src == self->app_vid_src) { if (self->src_vid_src && self->src_vid_src == self->app_vid_src) {
GST_DEBUG_OBJECT (self, "No need to change current videosrc"); GST_DEBUG_OBJECT (self, "No need to change current videosrc");
@ -496,13 +495,11 @@ check_and_replace_src (GstWrapperCameraBinSrc * self)
} }
/* check if we already have the next element to link to */ /* check if we already have the next element to link to */
videoconvert = gst_bin_get_by_name (cbin, "src-videoconvert"); if (self->src_crop) {
if (videoconvert) { if (!gst_element_link_pads (self->src_vid_src, "src", self->src_crop,
if (!gst_element_link_pads (self->src_vid_src, "src", videoconvert, "sink")) { "sink")) {
gst_object_unref (videoconvert);
return FALSE; return FALSE;
} }
gst_object_unref (videoconvert);
} }
/* we listen for changes to max-zoom in the video src so that /* we listen for changes to max-zoom in the video src so that