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>
This commit is contained in:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user