From 7f0079dec5da19072cfe64aee233ecacd8ef2ffd Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Tue, 19 Jun 2018 12:00:36 +0000
Subject: [PATCH] Output video-file has the same FPS as source video-stream. Exit from demo by ESC.
---
src/image.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/image.c b/src/image.c
index 5313964..dd0098f 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1068,6 +1068,18 @@
return im;
}
+int get_stream_fps(CvCapture *cap, int cpp_video_capture)
+{
+ int fps = 25;
+ if (cpp_video_capture) {
+ fps = get_stream_fps_cpp(cap);
+ }
+ else {
+ fps = cvGetCaptureProperty(cap, CV_CAP_PROP_FPS);
+ }
+ return fps;
+}
+
void save_image_jpg(image p, const char *name)
{
image copy = copy_image(p);
--
Gitblit v1.10.0