gstreamer/gst/camerabin2
Thiago Santos c6f4e4cfd8 wrappercamerabinsrc: Rework cropping for zoom and dimension reduction
wrappercamerabinsrc has a videocrop element to be used for
zooming and for cropping when input caps is different when used
with the GstPhotography interface. The zooming part needs
the following elements:

capsfilter ! videocrop ! videoscale ! capsfilter

The capsfilters should always have the same caps to ensure the
zooming is done and preserves dimensions, unless when it is needed
to do more cropping due to input dimensions those caps
need to be modified accordingly to preserve the output dimensions.

This, however, makes it hard to get caps negotiation to work properly
as we need to have different caps in the capsfilters to account for
the extra cropping needed. It could be simple for fixed caps but it
gets tricky with unfixed ones.

To solve this, this patch splits the zooming and dimension reduction
cropping into 2 separate videocrop elements. The first one does
the dimension cropping, which is only needed when the GstPhotography
API is used and the source provides a caps that is different than
what is requested, while the second is dedicated to zoom crop only.

The first part of the pipeline goes from:

src ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter

to

src ! videocrop ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter

It might add an extra overhead in the image capture as the image might need
to be cropped twice but this can be solved by enabling videocrop to use
crop metas so only the later one does the real cropping.

It also makes the code a bit simpler.
2015-04-24 15:12:47 -03:00
..
camerabin2-src.txt camerabin: remove custom renegotiate event 2012-05-01 15:31:11 -03:00
camerabingeneral.c wrappercamerabinsrc: Don't unset the video-source property on pipeline start 2013-06-10 16:16:29 +02:00
camerabingeneral.h Fix FSF address 2012-11-04 00:09:59 +00:00
gstcamerabin2.c camerabin: remove hack around bug 648359 2015-03-14 18:29:28 +00:00
gstcamerabin2.h Fix FSF address 2012-11-04 00:09:59 +00:00
gstplugin.c Fix FSF address 2012-11-04 00:09:59 +00:00
gstviewfinderbin.c camerabin: add any feature to viewfinderbin static pad template 2014-04-09 08:56:01 +02:00
gstviewfinderbin.h Fix FSF address 2012-11-04 00:09:59 +00:00
gstwrappercamerabinsrc.c wrappercamerabinsrc: Rework cropping for zoom and dimension reduction 2015-04-24 15:12:47 -03:00
gstwrappercamerabinsrc.h wrappercamerabinsrc: Rework cropping for zoom and dimension reduction 2015-04-24 15:12:47 -03:00
Makefile.am gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
PORTING camerabin2: add location=NULL docs to PORTING 2011-07-25 10:32:51 -03:00