From d6bb56a90a52deeac4209b346a836ff9d9068ddd Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 12 Jun 2019 13:14:10 +0100 Subject: libcamera: Introduce V4L2Device base class The V4L2 devices and subdevices share a few common operations,like opening and closing a device node, and perform IOCTLs on the device. With the forthcoming introduction of support for V4L2 controls, the quantity of shared code will increase, as the control support implementation is identical for the two derived classes. To maximize code re-use and avoid duplications, provide a V4L2Device base class which groups the common operations and members. The newly introduced base class provides methods to open/close a device node, access the file descriptor, and perform IOCTLs on the device. Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/meson.build | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libcamera/meson.build') diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 15ab53b1..f26ad5b2 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -23,6 +23,7 @@ libcamera_sources = files([ 'stream.cpp', 'timer.cpp', 'utils.cpp', + 'v4l2_device.cpp', 'v4l2_subdevice.cpp', 'v4l2_videodevice.cpp', ]) @@ -41,6 +42,7 @@ libcamera_headers = files([ 'include/media_object.h', 'include/pipeline_handler.h', 'include/utils.h', + 'include/v4l2_device.h', 'include/v4l2_subdevice.h', 'include/v4l2_videodevice.h', ]) -- cgit v1.2.1