summaryrefslogtreecommitdiff
path: root/src/cam/capture.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-24 15:16:57 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-27 17:31:13 +0200
commited734693350220f38aab768aee5e106b92dc9eb9 (patch)
tree85ae837edd9d0433fc3902a61c5acf7703d663db /src/cam/capture.h
parent01ea694003094b51bd96883055b11e52a011bef9 (diff)
cam: capture: Cache the EventLoop handler
Prepare for the ability to exit the event loop based on conditions in the request complete handler by caching the pointer instead of passing it as an argument. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/capture.h')
-rw-r--r--src/cam/capture.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cam/capture.h b/src/cam/capture.h
index 9bca5661..acdefc47 100644
--- a/src/cam/capture.h
+++ b/src/cam/capture.h
@@ -24,12 +24,12 @@ class Capture
{
public:
Capture(std::shared_ptr<libcamera::Camera> camera,
- libcamera::CameraConfiguration *config);
+ libcamera::CameraConfiguration *config,
+ EventLoop *loop);
- int run(EventLoop *loop, const OptionsParser::Options &options);
+ int run(const OptionsParser::Options &options);
private:
- int capture(EventLoop *loop,
- libcamera::FrameBufferAllocator *allocator);
+ int capture(libcamera::FrameBufferAllocator *allocator);
void requestComplete(libcamera::Request *request);
@@ -39,6 +39,8 @@ private:
std::map<libcamera::Stream *, std::string> streamName_;
BufferWriter *writer_;
std::chrono::steady_clock::time_point last_;
+
+ EventLoop *loop_;
};
#endif /* __CAM_CAPTURE_H__ */