summaryrefslogtreecommitdiff
path: root/test/v4l2_device
diff options
context:
space:
mode:
Diffstat (limited to 'test/v4l2_device')
-rw-r--r--test/v4l2_device/v4l2_device_test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_device/v4l2_device_test.cpp
index 18d014ca..a2a7ba82 100644
--- a/test/v4l2_device/v4l2_device_test.cpp
+++ b/test/v4l2_device/v4l2_device_test.cpp
@@ -39,22 +39,22 @@ int V4L2DeviceTest::init()
return TestFail;
}
- DeviceMatch dm("uvcvideo");
- media_ = std::move(enumerator_->search(dm));
+ DeviceMatch dm("vivid");
+ dm.add("vivid-000-vid-cap");
+
+ media_ = enumerator_->search(dm);
if (!media_)
return TestSkip;
media_->acquire();
- for (MediaEntity *entity : media_->entities()) {
- if (entity->flags() & MEDIA_ENT_FL_DEFAULT) {
- dev_ = new V4L2Device(entity);
- break;
- }
- }
+ MediaEntity *entity = media_->getEntityByName("vivid-000-vid-cap");
+ if (!entity)
+ return TestSkip;
+ dev_ = new V4L2Device(entity);
if (!dev_)
- return TestSkip;
+ return TestFail;
return dev_->open();
}