summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-12-03 17:48:53 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-12-06 10:12:17 +0000
commit5f55adeb944e8b42f85800df9f36593e9be6ed78 (patch)
treedb6a4a3e865acdbaefd3400cca8794ed76ac2209
parent81e2d327782ea5364b46dadc3b039b4e78eee95a (diff)
libcamera-helpers: mapped_framebuffer: Update to new FD API
The plane file descriptors API has been updated in the libcamera base library. Update our mapped_framebuffer class accordingly. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera-helpers/mapped_framebuffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcamera-helpers/mapped_framebuffer.cpp b/src/libcamera-helpers/mapped_framebuffer.cpp
index a657408..3d23114 100644
--- a/src/libcamera-helpers/mapped_framebuffer.cpp
+++ b/src/libcamera-helpers/mapped_framebuffer.cpp
@@ -198,7 +198,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)
std::map<int, MappedBufferInfo> mappedBuffers;
for (const FrameBuffer::Plane &plane : buffer->planes()) {
- const int fd = plane.fd.fd();
+ const int fd = plane.fd.get();
if (mappedBuffers.find(fd) == mappedBuffers.end()) {
const size_t length = lseek(fd, 0, SEEK_END);
mappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length };
@@ -220,7 +220,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)
}
for (const FrameBuffer::Plane &plane : buffer->planes()) {
- const int fd = plane.fd.fd();
+ const int fd = plane.fd.get();
auto &info = mappedBuffers[fd];
if (!info.address) {
void *address = mmap(nullptr, info.mapLength, mmapFlags,