From a62a886a7d7f41bfb688c6d7f8602bddcda139bb Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Thu, 10 Jun 2021 16:50:24 +0900 Subject: libcamera: v4l2_videodevice: Use fd for a file descriptor Manages file descriptors owned by V4L2VideoDevice by UniqueFD. This also changes the return type of exportDmabufFd to UniqueFD from FileDescriptor in order to represent a caller owns the returned file file descriptor. Signed-off-by: Hirokazu Honda Signed-off-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- include/libcamera/internal/v4l2_videodevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index 4a44b7fd..80b66577 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,6 @@ namespace libcamera { class EventNotifier; -class FileDescriptor; class MediaDevice; class MediaEntity; @@ -238,7 +238,7 @@ private: int createBuffers(unsigned int count, std::vector> *buffers); std::unique_ptr createBuffer(unsigned int index); - FileDescriptor exportDmabufFd(unsigned int index, unsigned int plane); + UniqueFD exportDmabufFd(unsigned int index, unsigned int plane); void bufferAvailable(); FrameBuffer *dequeueBuffer(); -- cgit v1.2.1