summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_videodevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/v4l2_videodevice.cpp')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 033f7cc0..1dc9e193 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -922,9 +922,10 @@ int V4L2VideoDevice::createPlane(BufferMemory *buffer, unsigned int index,
return ret;
}
- buffer->planes().emplace_back();
- Plane &plane = buffer->planes().back();
- plane.setDmabuf(expbuf.fd, length);
+ FrameBuffer::Plane plane;
+ plane.fd = FileDescriptor(expbuf.fd);
+ plane.length = length;
+ buffer->planes().push_back(plane);
::close(expbuf.fd);
return 0;
@@ -987,14 +988,14 @@ int V4L2VideoDevice::queueBuffer(Buffer *buffer)
bool multiPlanar = V4L2_TYPE_IS_MULTIPLANAR(buf.type);
BufferMemory *mem = &bufferPool_->buffers()[buf.index];
- const std::vector<Plane> &planes = mem->planes();
+ const std::vector<FrameBuffer::Plane> &planes = mem->planes();
if (buf.memory == V4L2_MEMORY_DMABUF) {
if (multiPlanar) {
for (unsigned int p = 0; p < planes.size(); ++p)
- v4l2Planes[p].m.fd = planes[p].dmabuf();
+ v4l2Planes[p].m.fd = planes[p].fd.fd();
} else {
- buf.m.fd = planes[0].dmabuf();
+ buf.m.fd = planes[0].fd.fd();
}
}