From a5f8ab82dfa3bb6531df0f9d7a4c3b4c8126a8a9 Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Mon, 10 May 2021 14:42:42 +0900 Subject: libcamera: V4L2Control: remove V4L2Control classes V4L2ControlId and V4L2ControlInfo are just convenience classes to create ControlId and ControlInfo from v4l2_query_ext_control. Therefore, there is no need of being a class. It is used only from V4L2Device. This removes the classes and put the equivalent functions of creating ControlId and ControlInfo in v4l2_device.cpp. Signed-off-by: Hirokazu Honda Reviewed-by: Jacopo Mondi Signed-off-by: Laurent Pinchart --- include/libcamera/internal/meson.build | 1 - include/libcamera/internal/v4l2_controls.h | 31 ------------------------------ include/libcamera/internal/v4l2_device.h | 4 ++-- 3 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 include/libcamera/internal/v4l2_controls.h (limited to 'include') diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build index 6cff1b90..f019cfb3 100644 --- a/include/libcamera/internal/meson.build +++ b/include/libcamera/internal/meson.build @@ -43,7 +43,6 @@ libcamera_internal_headers = files([ 'thread.h', 'timer.h', 'utils.h', - 'v4l2_controls.h', 'v4l2_device.h', 'v4l2_pixelformat.h', 'v4l2_subdevice.h', diff --git a/include/libcamera/internal/v4l2_controls.h b/include/libcamera/internal/v4l2_controls.h deleted file mode 100644 index 0851b8dd..00000000 --- a/include/libcamera/internal/v4l2_controls.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2019, Google Inc. - * - * v4l2_controls.h - V4L2 Controls Support - */ - -#ifndef __LIBCAMERA_INTERNAL_V4L2_CONTROLS_H__ -#define __LIBCAMERA_INTERNAL_V4L2_CONTROLS_H__ - -#include - -#include - -namespace libcamera { - -class V4L2ControlId : public ControlId -{ -public: - V4L2ControlId(const struct v4l2_query_ext_ctrl &ctrl); -}; - -class V4L2ControlInfo : public ControlInfo -{ -public: - V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl); -}; - -} /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_V4L2_CONTROLS_H__ */ diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h index 5ba9b23b..b82e2a14 100644 --- a/include/libcamera/internal/v4l2_device.h +++ b/include/libcamera/internal/v4l2_device.h @@ -13,11 +13,11 @@ #include +#include #include #include #include "libcamera/internal/log.h" -#include "libcamera/internal/v4l2_controls.h" namespace libcamera { @@ -63,7 +63,7 @@ private: void eventAvailable(EventNotifier *notifier); std::map controlInfo_; - std::vector> controlIds_; + std::vector> controlIds_; ControlInfoMap controls_; std::string deviceNode_; int fd_; -- cgit v1.2.1