Hello,
thanks for the reviews and comments. I updated the example as suggested by
Mauro and reimplemented the deadlock fix as suggested by Hans. Here is the
second version of those patches.
Thiago Santos (2):
v4l2grab: Add threaded producer/consumer option
libv4l2: release the lock before
-by: Thiago Santos ts.san...@sisa.samsung.com
---
contrib/test/Makefile.am | 2 +-
contrib/test/v4l2grab.c | 261 +++
2 files changed, 219 insertions(+), 44 deletions(-)
diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
index 80c7665
In blocking mode, if there are no buffers available the DQBUF will block
waiting for a QBUF to be called but it will block holding the streaming
lock which will prevent any QBUF from happening, causing a deadlock.
Can be tested with: v4l2grab -t -b -s 2000
Signed-off-by: Thiago Santos ts.san
In blocking mode, if there are no buffers available the DQBUF will block
waiting for a QBUF to be called but it will block holding the streaming
lock which will prevent any QBUF from happening, causing a deadlock.
Can be tested with: v4l2grab -t 1 -b 1 -s 2000
Signed-off-by: Thiago Santos ts.san
-off-by: Thiago Santos ts.san...@sisa.samsung.com
---
contrib/test/Makefile.am | 2 +-
contrib/test/v4l2grab.c | 265 +++
2 files changed, 223 insertions(+), 44 deletions(-)
diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
index
but,
as it blocks holding the stream_lock, a QBUF will never happen and we have
a deadlock.
Thiago Santos (2):
v4l2grab: Add threaded producer/consumer option
libv4l2: release the lock before doing a DQBUF
contrib/test/Makefile.am | 2 +-
contrib/test/v4l2grab.c | 265