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>
This commit is contained in:
parent
87f507bbf2
commit
8108ba3202
1 changed files with 5 additions and 0 deletions
|
@ -1623,6 +1623,11 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer)
|
||||||
if (V4L2_TYPE_IS_OUTPUT(buf.type)) {
|
if (V4L2_TYPE_IS_OUTPUT(buf.type)) {
|
||||||
const FrameMetadata &metadata = buffer->metadata();
|
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 (numV4l2Planes != planes.size()) {
|
||||||
/*
|
/*
|
||||||
* If we have a multi-planar buffer with a V4L2
|
* If we have a multi-planar buffer with a V4L2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue