diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2021-06-10 16:50:24 +0900 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-12-04 23:05:04 +0200 |
commit | a62a886a7d7f41bfb688c6d7f8602bddcda139bb (patch) | |
tree | c444c4bc9b33e258c8470bb713e054f2682c5a51 /include | |
parent | cfe4f9622ead96702d879835ca9dd2942d503399 (diff) |
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 <hiroh@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/v4l2_videodevice.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 <libcamera/base/class.h> #include <libcamera/base/log.h> #include <libcamera/base/signal.h> +#include <libcamera/base/unique_fd.h> #include <libcamera/framebuffer.h> #include <libcamera/geometry.h> @@ -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<std::unique_ptr<FrameBuffer>> *buffers); std::unique_ptr<FrameBuffer> createBuffer(unsigned int index); - FileDescriptor exportDmabufFd(unsigned int index, unsigned int plane); + UniqueFD exportDmabufFd(unsigned int index, unsigned int plane); void bufferAvailable(); FrameBuffer *dequeueBuffer(); |