diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-07-05 07:15:53 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-07-22 17:13:43 +0300 |
commit | 4cd0f586fbc7bc8451bd18aaa3b59fbd8d53574e (patch) | |
tree | 6147fa3225677933db60aa7b78ba4936120e3894 /src/cam/camera_session.h | |
parent | 011b3ff288826460b76c59a5899c92ecd8226643 (diff) |
cam: Move event loop execution from CameraSession to CamApp
To prepare for multiple concurrent camera sessions, move the event loop
exec() call from the CameraSession class to the CamApp class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam/camera_session.h')
-rw-r--r-- | src/cam/camera_session.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cam/camera_session.h b/src/cam/camera_session.h index 2728d760..5131cfd4 100644 --- a/src/cam/camera_session.h +++ b/src/cam/camera_session.h @@ -28,12 +28,13 @@ public: CameraSession(std::shared_ptr<libcamera::Camera> camera, libcamera::CameraConfiguration *config); - int run(const OptionsParser::Options &options); + int start(const OptionsParser::Options &options); + void stop(); libcamera::Signal<> captureDone; private: - int capture(libcamera::FrameBufferAllocator *allocator); + int startCapture(); int queueRequest(libcamera::Request *request); void requestComplete(libcamera::Request *request); @@ -51,6 +52,7 @@ private: unsigned int captureLimit_; bool printMetadata_; + libcamera::FrameBufferAllocator *allocator_; std::vector<std::unique_ptr<libcamera::Request>> requests_; }; |