mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-18 01:45:10 +03:00
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:
parent
011b3ff288
commit
4cd0f586fb
3 changed files with 34 additions and 27 deletions
|
@ -371,7 +371,17 @@ int CamApp::run()
|
|||
if (options_.isSet(OptCapture)) {
|
||||
CameraSession session(camera_, config_.get());
|
||||
session.captureDone.connect(this, &CamApp::captureDone);
|
||||
return session.run(options_);
|
||||
|
||||
ret = session.start(options_);
|
||||
if (ret) {
|
||||
std::cout << "Failed to start camera session" << std::endl;
|
||||
return ret;
|
||||
}
|
||||
|
||||
loop_.exec();
|
||||
|
||||
session.stop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (options_.isSet(OptMonitor)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue