v4l2: Optimize negotiation by removing the query filter
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Wed, 19 Jun 2013 10:37:31 +0000 (12:37 +0200)
committerSjoerd Simons <sjoerd@luon.net>
Wed, 19 Jun 2013 13:05:25 +0000 (15:05 +0200)
commit8e43c0ec9ea627d3cea0cecf6d3e168bf4d5d09e
treea04a98c7e451524c6cd0ef88eb83cfd8b7b66336
parent5b32891ae13435fa7c769a85d9978056b60b1f0f
v4l2: Optimize negotiation by removing the query filter

As cameras tend to have a quite specific set of capabilities (specific
framerates for each resolution), getting the peer caps filtered by our
probed caps can cause a big increase in the caps size which slows down
things quire a bit.

As for negotiation v4l2 iterates through the caps of the peer to find the
first intersection with the probed caps, getting the fully expanded
intersection of capabilities is not useful.

Using the same testcase as for bug #702632, adding this patch on top of
the patches suggested there speeds up getting the inital frame from
around ~14-15 seconds to around ~3-4 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=702638
sys/v4l2/gstv4l2src.c