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>
This commit is contained in:
Laurent Pinchart
2021-07-05 07:15:53 +03:00
parent 011b3ff288
commit 4cd0f586fb
3 changed files with 34 additions and 27 deletions
+4 -2
View File
@@ -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_;
};