summaryrefslogtreecommitdiff
path: root/src/libcamera/include
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 /src/libcamera/include
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 'src/libcamera/include')
-rw-r--r--src/libcamera/include/media_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h
index 9f038093..88398505 100644
--- a/src/libcamera/include/media_device.h
+++ b/src/libcamera/include/media_device.h
@@ -27,7 +27,7 @@ public:
~MediaDevice();
bool acquire();
- void release() { acquired_ = false; }
+ void release();
bool busy() const { return acquired_; }
int open();