GNOME Bugzilla – Bug 536994
Improve v4l2src negotiation a bit more
Last modified: 2008-06-09 08:51:52 UTC
The last change to the v4l2src makes it try to pick an optimal resolution. This currently only works nicely when the camera can actually deliver that resolution.. Say my camera can do up to 1600x1200 and the various resolutions it can provide includes 320x240, but not 300x200. In a pipeline with as target resolution 320x240 the camera will actually capture at that size, but if you request 300x200 then it'll capture at 1600x1200 and waste a lot of cpu on downscaling Instead if the intersection of the caps result in multiple (resolution) option it should pick the smallest one greater then the resolution specified in the first caps entry of the peer
Created attachment 112283 [details] [review] If an exact match isn't available, try to the closest resolution
2008-06-09 Sebastian Dröge <slomo@circular-chaos.org> Patch by: Sjoerd Simons <sjoerd at luon dot net> * sys/v4l2/gstv4l2src.c: (gst_v4l2src_negotiate): Improve negotiation a bit more by picking the smallest possible resolution that is larger than the resolution specified in the first caps entry of the peer caps. Fixes bug #536994.