From 1a813a5c3ab71a91e327d538d0df5d945e50561e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sun, 14 Apr 2019 00:43:29 +0200 Subject: libcamera: media_device: Handle media device fd in acquire() and release() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To gain better control of when a file descriptor is open to the media device and reduce the work needed in pipeline handler implementations, handle the file descriptor in acquire() and release(). This changes the current behavior where a file descriptor is only open when requested by the pipeline handler to that one is always open as long a media device is acquired. This new behavior is desired to allow implementing exclusive access to a pipeline handler between processes. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- test/media_device/media_device_link_test.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'test/media_device') diff --git a/test/media_device/media_device_link_test.cpp b/test/media_device/media_device_link_test.cpp index 484d3691..334bb44a 100644 --- a/test/media_device/media_device_link_test.cpp +++ b/test/media_device/media_device_link_test.cpp @@ -57,12 +57,6 @@ class MediaDeviceLinkTest : public Test return TestSkip; } - if (dev_->open()) { - cerr << "Failed to open media device at " - << dev_->deviceNode() << endl; - return TestFail; - } - return 0; } @@ -238,7 +232,6 @@ class MediaDeviceLinkTest : public Test void cleanup() { - dev_->close(); dev_->release(); } -- cgit v1.2.1