v4l2-ctl: add streaming between two video devices using dmabuf
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 24 Feb 2014 14:57:42 +0000 (15:57 +0100)
committerHans Verkuil <hans.verkuil@cisco.com>
Mon, 24 Feb 2014 15:41:02 +0000 (16:41 +0100)
commit8902e1efb591ce5c9626aeaf3a25484ebda478aa
tree2eef44d0d3c07a785fd923a8e2743b24e70b729b
parent17ea88b11424e60080e24f1a655dae68d6546b35
v4l2-ctl: add streaming between two video devices using dmabuf

Implement support to streaming from one device to another, either using
mmap -> dmabuf, dmabuf -> mmap or userptr -> userptr. In all three
cases there is no need to copy from one buffer to another.

Eventually all combinations should be possible, but that requires more
work (a copy function) and the code could use some serious refactoring
before doing that.

The basic idea is to specify the video output device using --out-device.
And if you want one of the two sides to use dmabuf for streaming, then
specify --stream(-out)-dmabuf:

v4l2-ctl -d /dev/video0 -e /dev/video1 --stream-mmap=3 --stream-out-dmabuf

It will try to export the dmabuf file descriptors for 3 (the number given
to --stream-mmap) buffers and use those for the output stream buffers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-ctl/v4l2-ctl-common.cpp
utils/v4l2-ctl/v4l2-ctl-streaming.cpp
utils/v4l2-ctl/v4l2-ctl.cpp
utils/v4l2-ctl/v4l2-ctl.h