summaryrefslogtreecommitdiff
path: root/src/cam/capture.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-24 15:24:39 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-27 17:31:13 +0200
commit30e0ea843eb96a93f8282466e3a328fdda7fafdc (patch)
tree0502913b4358b2e215b2fc30213205ec377c4a1c /src/cam/capture.h
parented734693350220f38aab768aee5e106b92dc9eb9 (diff)
cam: Add optional argument to --capture to specify how many frames to capture
Extend the '--capture' option with and optional numerical argument to be able to specify how many frames to capture before exiting. If the optional argument is not provided the old behavior of running until the user interrupts with a SIGINT is retained. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/capture.h')
-rw-r--r--src/cam/capture.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cam/capture.h b/src/cam/capture.h
index acdefc47..32940a2a 100644
--- a/src/cam/capture.h
+++ b/src/cam/capture.h
@@ -41,6 +41,8 @@ private:
std::chrono::steady_clock::time_point last_;
EventLoop *loop_;
+ unsigned int captureCount_;
+ unsigned int captureLimit_;
};
#endif /* __CAM_CAPTURE_H__ */