gstreamer/gst
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
..
accurip gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
adpcmdec adpcmdec: Require caps to be set before any data processing 2013-12-05 12:05:21 +01:00
adpcmenc Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
aiff Revert "aiffparse: make sure we have data before handling sink event" 2015-02-06 16:22:26 +00:00
asfmux asfmux: remove unnecessary conditional 2015-03-03 16:23:43 +00:00
audiobuffer remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
audiofxbad audiofxbad: Change plugin name to audiofxbad from audiochannelmix 2013-09-19 20:17:01 +02:00
audiomixer audiomixer: Allow downstream caps with a non-default channel-mask 2015-04-01 20:32:41 -04:00
audiovisualizers audiovisualizer: don't use private GMutex implementation details 2015-02-17 09:56:55 +00:00
autoconvert autoconvert: factories don't need the lock 2014-05-09 23:05:28 -04:00
bayer bayer2rgb: take into account filter in transform_caps function 2014-12-22 16:46:06 +00:00
camerabin2 wrappercamerabinsrc: Rework cropping for zoom and dimension reduction 2015-04-24 15:12:47 -03:00
cdxaparse gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
coloreffects remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
compositor compositor: Revert most of previous patch. 2015-03-16 04:00:44 +11:00
dataurisrc Revert "dataurisrc: Remove unnecessary else if condition" 2014-09-07 01:30:16 -03:00
dccp gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
debugutils remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
dvbsuboverlay dvbsuboverlay: Set query ALLOCATION need_pool to FALSE 2015-03-04 11:05:45 +01:00
dvdspu dvdspu: some optimizations 2015-02-08 06:17:01 +11:00
faceoverlay gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
festival festival: fix fd leak 2014-04-08 12:20:40 +01:00
fieldanalysis fieldanalysis: exception when block width to 0 2015-04-20 09:42:14 +01:00
freeverb Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
frei0r Improve and fix LATENCY query handling 2015-02-11 14:16:21 +01:00
games gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
gaudieffects remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
gdp gdppay: use public API for accessing stream header arrays in caps 2014-12-26 13:44:35 +00:00
geometrictransform mirror: Needs remap when the mode changes. 2014-12-09 05:03:11 +01:00
hdvparse gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
id3tag id3tag: Remove unused function to fix compiler warning 2014-02-27 21:41:53 +01:00
inter Improve and fix LATENCY query handling 2015-02-11 14:16:21 +01:00
interlace interlace: fix caps refcounting 2014-08-10 12:04:38 +01:00
ivfparse ivfparse: detect and propagate resolution changes. 2014-04-18 18:31:15 +02:00
ivtc ivtc: Use input framerate when possible 2013-08-20 16:02:59 +02:00
jp2kdecimator style: remove unnecessary break statements 2014-09-25 16:41:15 +01:00
jpegformat jpegparse: interlaced doesn't mean progressive scan 2015-02-24 18:50:28 +00:00
librfb Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
liveadder liveadder: Use default upstream latency querying logic 2015-02-27 01:05:51 +05:30
midi midiparse: mention fluiddec instead of fluidsynth 2014-10-10 11:29:45 +01:00
mixmatrix gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
mpeg1sys Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
mpegdemux mpegdemux: fix pad leak when not adding a new pad after no-more-pads 2015-04-16 13:35:40 +01:00
mpegpsmux Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
mpegtsdemux tsdemux: clean assignment typo 2015-04-20 11:30:28 +01:00
mpegtsmux mpegtsmux: drop some superfluous assertions 2015-03-15 16:10:31 +00:00
mve gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
mxf mxfdemux: fix memory leak 2015-04-04 19:47:40 +01:00
nuvdemux style: remove unnecessary break statements 2014-09-25 16:41:15 +01:00
onvif onvif: fix 'make dist' 2014-12-12 00:30:21 +00:00
overlay gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
patchdetect Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
pcapparse remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
pnm pnmenc: Port PNM Encoder to use GstVideoEncoder Class 2014-07-22 06:19:48 -03:00
rawparse rawparse: send SEEKING query upstream first 2014-11-22 17:51:01 +00:00
removesilence gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
rtjpeg gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
rtp remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
sdi gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
sdp remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
segmentclip gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
siren Remove a bunch of silly ';;' typos at the end of lines 2015-03-12 01:33:03 +11:00
smooth gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
smoothwave smoothwave: remove element unported from 0.8 2011-11-23 08:42:01 +01:00
speed speed: Fix position query some more 2014-06-09 10:57:32 +02:00
stereo stereo: Port to GStreamer 1.0 API 2013-12-06 17:58:13 -05:00
subenc webvttenc: Separate cues with two line breaks instead of one. 2013-07-05 18:32:43 +01:00
tta Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
vbidec Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
videofilters videofilters: Add support for more YUV formats 2014-09-23 19:34:06 +03:00
videomeasure Remove a bunch of silly ';;' typos at the end of lines 2015-03-12 01:33:03 +11:00
videoparsers remove unused enum items PROP_LAST 2015-04-24 16:48:26 +01:00
videosignal simplevideomarkdetect: move offset calculations out of inner loops 2015-02-19 10:15:54 -03:00
vmnc vmncdec: modify wrong packetized mode logic 2014-09-16 11:24:53 +03:00
y4m y4mdec: remove unnecessary semicolon 2015-03-09 08:42:11 +01:00
yadif yadif: basetransform is creating pads for us already, don't do it twice 2014-06-29 22:19:07 +02:00
Makefile.am