diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-08-07 10:13:16 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-08-07 10:13:16 +0200 |
commit | 2f3565efb5377768e3c2e1ef85eec99668f485de (patch) | |
tree | 3813d2d3ed6d4a59e912894dccee8e9a179c5c84 /test | |
parent | 07a1ac5f01caf27aa309e4e743961123d3609291 (diff) |
libcamera: Define and use MediaDeviceMatch
The xistingdevice search and match criteria implemented by libcamera
only supports 'media device' based cameras, which are supported in the
Linux kernel by the usage of the V4L2/MC API.
Define a MediaDeviceMatch class derived from DeviceMatch and use it
wherever DeviceMatch was used in order to later introduce new derived
classes to support searching and matching devices of a different type.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/camera-sensor.cpp | 2 | ||||
-rw-r--r-- | test/delayed_controls.cpp | 2 | ||||
-rw-r--r-- | test/libtest/buffer_source.cpp | 2 | ||||
-rw-r--r-- | test/media_device/media_device_test.cpp | 2 | ||||
-rw-r--r-- | test/v4l2_subdevice/v4l2_subdevice_test.cpp | 2 | ||||
-rw-r--r-- | test/v4l2_videodevice/v4l2_m2mdevice.cpp | 2 | ||||
-rw-r--r-- | test/v4l2_videodevice/v4l2_videodevice_test.cpp | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp index 2a17cc79..e35126ca 100644 --- a/test/camera-sensor.cpp +++ b/test/camera-sensor.cpp @@ -39,7 +39,7 @@ protected: return TestFail; } - DeviceMatch dm("vimc"); + MediaDeviceMatch dm("vimc"); media_ = enumerator_->search(dm); if (!media_) { cerr << "Unable to find \'vimc\' media device node" << endl; diff --git a/test/delayed_controls.cpp b/test/delayed_controls.cpp index a8ce9828..9063ef3e 100644 --- a/test/delayed_controls.cpp +++ b/test/delayed_controls.cpp @@ -38,7 +38,7 @@ protected: return TestFail; } - DeviceMatch dm("vivid"); + MediaDeviceMatch dm("vivid"); dm.add("vivid-000-vid-cap"); media_ = enumerator_->search(dm); diff --git a/test/libtest/buffer_source.cpp b/test/libtest/buffer_source.cpp index dde11f36..8cb6f635 100644 --- a/test/libtest/buffer_source.cpp +++ b/test/libtest/buffer_source.cpp @@ -43,7 +43,7 @@ int BufferSource::allocate(const StreamConfiguration &config) return TestFail; } - DeviceMatch dm("vivid"); + MediaDeviceMatch dm("vivid"); dm.add(videoDeviceName); media_ = enumerator->search(dm); diff --git a/test/media_device/media_device_test.cpp b/test/media_device/media_device_test.cpp index 1397d123..8189e068 100644 --- a/test/media_device/media_device_test.cpp +++ b/test/media_device/media_device_test.cpp @@ -25,7 +25,7 @@ int MediaDeviceTest::init() return TestFail; } - DeviceMatch dm("vimc"); + MediaDeviceMatch dm("vimc"); media_ = enumerator_->search(dm); if (!media_) { cerr << "No VIMC media device found: skip test" << endl; diff --git a/test/v4l2_subdevice/v4l2_subdevice_test.cpp b/test/v4l2_subdevice/v4l2_subdevice_test.cpp index d8fbfd9f..56e5cc83 100644 --- a/test/v4l2_subdevice/v4l2_subdevice_test.cpp +++ b/test/v4l2_subdevice/v4l2_subdevice_test.cpp @@ -39,7 +39,7 @@ int V4L2SubdeviceTest::init() return TestFail; } - DeviceMatch dm("vimc"); + MediaDeviceMatch dm("vimc"); media_ = enumerator_->search(dm); if (!media_) { cerr << "Unable to find \'vimc\' media device node" << endl; diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp index c45f581a..0effbf19 100644 --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp @@ -65,7 +65,7 @@ protected: return TestFail; } - DeviceMatch dm("vim2m"); + MediaDeviceMatch dm("vim2m"); dm.add("vim2m-source"); dm.add("vim2m-sink"); diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp index 125aafd6..addc47d2 100644 --- a/test/v4l2_videodevice/v4l2_videodevice_test.cpp +++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp @@ -30,7 +30,7 @@ int V4L2VideoDeviceTest::init() return TestFail; } - DeviceMatch dm(driver_); + MediaDeviceMatch dm(driver_); dm.add(entity_); media_ = enumerator_->search(dm); |