summaryrefslogtreecommitdiff
path: root/src/cam/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/main.cpp')
-rw-r--r--src/cam/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index 90435206..a567a7cc 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -38,6 +38,7 @@ public:
private:
void cameraAdded(std::shared_ptr<Camera> cam);
void cameraRemoved(std::shared_ptr<Camera> cam);
+ void captureDone();
int parseOptions(int argc, char *argv[]);
int prepareConfig();
int listControls();
@@ -330,6 +331,11 @@ void CamApp::cameraRemoved(std::shared_ptr<Camera> cam)
std::cout << "Camera Removed: " << cam->id() << std::endl;
}
+void CamApp::captureDone()
+{
+ EventLoop::instance()->exit(0);
+}
+
int CamApp::run()
{
int ret;
@@ -364,6 +370,7 @@ int CamApp::run()
if (options_.isSet(OptCapture)) {
CameraSession session(camera_, config_.get());
+ session.captureDone.connect(this, &CamApp::captureDone);
return session.run(options_);
}