summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/device_enumerator.h2
-rw-r--r--include/libcamera/internal/device_match.h9
-rw-r--r--include/libcamera/internal/pipeline_handler.h4
3 files changed, 10 insertions, 5 deletions
diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
index 259a9e46..2afb9fa0 100644
--- a/include/libcamera/internal/device_enumerator.h
+++ b/include/libcamera/internal/device_enumerator.h
@@ -29,7 +29,7 @@ public:
virtual int init() = 0;
virtual int enumerate() = 0;
- std::shared_ptr<MediaDevice> search(const DeviceMatch &dm);
+ std::shared_ptr<MediaDevice> search(const MediaDeviceMatch &dm);
Signal<> devicesAdded;
diff --git a/include/libcamera/internal/device_match.h b/include/libcamera/internal/device_match.h
index 9f190f0c..6df7dece 100644
--- a/include/libcamera/internal/device_match.h
+++ b/include/libcamera/internal/device_match.h
@@ -17,11 +17,16 @@ class MediaDevice;
class DeviceMatch
{
public:
- DeviceMatch(const std::string &driver);
+ virtual bool match(const MediaDevice *device) const = 0;
+};
+class MediaDeviceMatch : public DeviceMatch
+{
+public:
void add(const std::string &entity);
+ MediaDeviceMatch(const std::string &driver);
- bool match(const MediaDevice *device) const;
+ bool match(const MediaDevice *device) const override;
private:
std::string driver_;
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index c96944f4..02b2f337 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -28,7 +28,7 @@ class Camera;
class CameraConfiguration;
class CameraManager;
class DeviceEnumerator;
-class DeviceMatch;
+class MediaDeviceMatch;
class FrameBuffer;
class MediaDevice;
class PipelineHandler;
@@ -43,7 +43,7 @@ public:
virtual bool match(DeviceEnumerator *enumerator) = 0;
MediaDevice *acquireMediaDevice(DeviceEnumerator *enumerator,
- const DeviceMatch &dm);
+ const MediaDeviceMatch &dm);
bool acquire();
void release(Camera *camera);