v4l2grab: Add threaded producer/consumer option
Adds options to allow the buffer dqbuf to happen on one thread while
the qbuf happens on another. This is useful to test concurrency access to
the v4l2 features. To enable this, 3 new options were added:
t: enable threaded mode (off by default and will use the loop)
b: enable blocking io mode (off by default
s: how much the consumer thread will sleep after reading a buffer, this is to
simulate the time that it takes to process a buffer in a real application
(in ms)
For example, you can simulate an application that takes 1s to process a buffer
with:
v4l2grab -t -b -s 1000
Signed-off-by: Thiago Santos <ts.santos@sisa.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>