diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/device_enumerator.h | 16 | ||||
-rw-r--r-- | include/libcamera/internal/device_match.h | 31 | ||||
-rw-r--r-- | include/libcamera/internal/meson.build | 1 |
3 files changed, 34 insertions, 14 deletions
diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h index 72ec9a60..259a9e46 100644 --- a/include/libcamera/internal/device_enumerator.h +++ b/include/libcamera/internal/device_enumerator.h @@ -13,24 +13,12 @@ #include <libcamera/base/signal.h> +#include "libcamera/internal/device_match.h" + namespace libcamera { class MediaDevice; -class DeviceMatch -{ -public: - DeviceMatch(const std::string &driver); - - void add(const std::string &entity); - - bool match(const MediaDevice *device) const; - -private: - std::string driver_; - std::vector<std::string> entities_; -}; - class DeviceEnumerator { public: diff --git a/include/libcamera/internal/device_match.h b/include/libcamera/internal/device_match.h new file mode 100644 index 00000000..9f190f0c --- /dev/null +++ b/include/libcamera/internal/device_match.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2023, Ideas On Board Oy + * + * device_match.h - Match and identify devices to create cameras with + */ + +#pragma once + +#include <string> +#include <vector> + +namespace libcamera { + +class MediaDevice; + +class DeviceMatch +{ +public: + DeviceMatch(const std::string &driver); + + void add(const std::string &entity); + + bool match(const MediaDevice *device) const; + +private: + std::string driver_; + std::vector<std::string> entities_; +}; + +}; /* namespace libcamera */ diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build index 7f1f3440..169e0655 100644 --- a/include/libcamera/internal/meson.build +++ b/include/libcamera/internal/meson.build @@ -25,6 +25,7 @@ libcamera_internal_headers = files([ 'device_enumerator.h', 'device_enumerator_sysfs.h', 'device_enumerator_udev.h', + 'device_match.h', 'formats.h', 'framebuffer.h', 'ipa_manager.h', |