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>