diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-05 01:21:28 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-10 17:49:54 +0300 |
commit | 8108ba3202ae1161b6d62882eb6f5fc89be167e3 (patch) | |
tree | b1dc3eb9574131c98402ae50a1735f89fba68199 /src | |
parent | 87f507bbf2d6618d6c44473dadfbf20042553665 (diff) |
libcamera: v4l2_videodevice: Warn if bytesused == 0 when queuing output buffer
V4L2 has deprecated queuing output buffers with bytesused set to 0. Warn
if the caller attempts to do so.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Naushir Patuck <naush@raspberrypi.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/v4l2_videodevice.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 4d846f6b..e30858c9 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1623,6 +1623,11 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer) if (V4L2_TYPE_IS_OUTPUT(buf.type)) { const FrameMetadata &metadata = buffer->metadata(); + for (const auto &plane : metadata.planes()) { + if (!plane.bytesused) + LOG(V4L2, Warning) << "byteused == 0 is deprecated"; + } + if (numV4l2Planes != planes.size()) { /* * If we have a multi-planar buffer with a V4L2 |