diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/media_device/media_device_link_test.cpp | 6 | ||||
-rw-r--r-- | test/v4l2_device/v4l2_device_test.cpp | 4 | ||||
-rw-r--r-- | test/v4l2_subdevice/v4l2_subdevice_test.cpp | 7 |
3 files changed, 5 insertions, 12 deletions
diff --git a/test/media_device/media_device_link_test.cpp b/test/media_device/media_device_link_test.cpp index 58a55cdf..484d3691 100644 --- a/test/media_device/media_device_link_test.cpp +++ b/test/media_device/media_device_link_test.cpp @@ -51,7 +51,11 @@ class MediaDeviceLinkTest : public Test return TestSkip; } - dev_->acquire(); + if (!dev_->acquire()) { + cerr << "Unable to acquire media device " + << dev_->deviceNode() << endl; + return TestSkip; + } if (dev_->open()) { cerr << "Failed to open media device at " diff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_device/v4l2_device_test.cpp index 4225291b..833038d5 100644 --- a/test/v4l2_device/v4l2_device_test.cpp +++ b/test/v4l2_device/v4l2_device_test.cpp @@ -46,8 +46,6 @@ int V4L2DeviceTest::init() if (!media_) return TestSkip; - media_->acquire(); - MediaEntity *entity = media_->getEntityByName("vivid-000-vid-cap"); if (!entity) return TestSkip; @@ -61,8 +59,6 @@ int V4L2DeviceTest::init() void V4L2DeviceTest::cleanup() { - media_->release(); - capture_->streamOff(); capture_->releaseBuffers(); capture_->close(); diff --git a/test/v4l2_subdevice/v4l2_subdevice_test.cpp b/test/v4l2_subdevice/v4l2_subdevice_test.cpp index 72d5f725..5810ef3c 100644 --- a/test/v4l2_subdevice/v4l2_subdevice_test.cpp +++ b/test/v4l2_subdevice/v4l2_subdevice_test.cpp @@ -45,20 +45,16 @@ int V4L2SubdeviceTest::init() return TestSkip; } - media_->acquire(); - int ret = media_->open(); if (ret) { cerr << "Unable to open media device: " << media_->deviceNode() << ": " << strerror(ret) << endl; - media_->release(); return TestSkip; } MediaEntity *videoEntity = media_->getEntityByName("Scaler"); if (!videoEntity) { cerr << "Unable to find media entity 'Scaler'" << endl; - media_->release(); return TestFail; } @@ -67,7 +63,6 @@ int V4L2SubdeviceTest::init() if (ret) { cerr << "Unable to open video subdevice " << scaler_->entity()->deviceNode() << endl; - media_->release(); return TestSkip; } @@ -76,7 +71,5 @@ int V4L2SubdeviceTest::init() void V4L2SubdeviceTest::cleanup() { - media_->release(); - delete scaler_; } |