summaryrefslogtreecommitdiff
path: root/test/media_device
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-04-14 00:43:29 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-05-17 01:33:57 +0200
commit1a813a5c3ab71a91e327d538d0df5d945e50561e (patch)
tree2ac615e5dacbb8d36a6408d59994eb7e448a45a9 /test/media_device
parentef30be09eb0faba6739b4efee450d0c9751c121b (diff)
libcamera: media_device: Handle media device fd in acquire() and release()
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 <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/media_device')
-rw-r--r--test/media_device/media_device_link_test.cpp7
1 files changed, 0 insertions, 7 deletions
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();
}