summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-11-29 20:14:14 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-04 23:05:04 +0200
commit415ac123997f86ebf6d7994020fd017a6bfa5f27 (patch)
treed9cdbc7049bab7b7e4e9f2e93ad420c7c3e0d634 /include
parenta62a886a7d7f41bfb688c6d7f8602bddcda139bb (diff)
libcamera: v4l2_videodevice: Pass FileDescriptor to open()
The V4L2VideoDevice::open() function that takes an open file handle duplicates it internally, and leaves the original handle untouched. This is documented but not enforced through language constructs. Fix it by passing a FileDescriptor to the function. 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index 80b66577..9f556f99 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -184,7 +184,7 @@ public:
~V4L2VideoDevice();
int open();
- int open(int handle, enum v4l2_buf_type type);
+ int open(FileDescriptor handle, enum v4l2_buf_type type);
void close();
const char *driverName() const { return caps_.driver(); }