~libv4l/libv4l/dev

Viewing all changes in revision 4739.

  • Committer: Hans Verkuil
  • Author(s): Dafna Hirschfeld
  • Date: 2021-08-04 13:17:37 UTC
  • Revision ID: git-v1:7952c0042ccf549959cf924fbd3e7dd894966e57
v4l2-ctl: fix bugs found in streaming_set_cap2out

When exporting buffers from a capture device
to an output device. There are several bugs:
1. The bytesused are set from the exported buffer,
the value might be bigger than the length of the output buffer.
2. The file descriptor field 'm.fd' in 'struct v4l2_buffer' is not set.

This patch fix those issues.

Testing:

modprobe vimc
modprobe vivid

//configure vimc pipeline
media-ctl -d platform:vimc -V '"Sensor A":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Debayer A":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Sensor B":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Debayer B":0[fmt:SBGGR8_1X8/640x480]'

v4l2-ctl -z platform:vimc -d "RGB/YUV Capture" -v width=1920,height=1440
v4l2-ctl -z platform:vimc -d "Raw Capture 0" -v pixelformat=BA81
v4l2-ctl -z platform:vimc -d "Raw Capture 1" -v pixelformat=BA81

// export buffers from vimc capture device (/dev/video2) to vivid output device (/dev/video4)
v4l2-ctl -d2 --stream-mmap --out-device /dev/video4 --stream-out-dmabuf

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: