v4l2bufferpool: Validate that capture buffers were queued
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 13 Jul 2018 20:51:24 +0000 (16:51 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Sat, 14 Jul 2018 03:13:44 +0000 (23:13 -0400)
commit9e79821b1dc0f3f97ac7bdd72b3394f646042280
treeb2867cc30cc502a7f8b966bc48f5a3b466c3a530
parent3b364cea941478e1b31b437755b92c63171a1d51
v4l2bufferpool: Validate that capture buffers were queued

When the pool is started, we allocate and release buffer, expecting
the pool release-buffer handler to queue them. Though, as we rely
on release function, there is no direct way to detect that this
process didn't work.

To check this, validate that the number of queued buffer is the same
as the number of allocated buffers. This allow returning an error
when buffer importation was refused by the driver.

https://bugzilla.gnome.org/show_bug.cgi?id=583890
sys/v4l2/gstv4l2bufferpool.c