From 87fea24e8bba1bfbee707cdaa6f7979451531acc Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期六, 19 十月 2019 10:23:01 +0800
Subject: [PATCH] add interface rec duration

---
 csrc/wrapper.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp
index 7149cbf..058e499 100644
--- a/csrc/wrapper.cpp
+++ b/csrc/wrapper.cpp
@@ -188,7 +188,7 @@
                 sleep(2);
                 continue;
             }
-            
+
             int wTime = 1000000.0 / in->getFPS() ;
             wTime >>= 1;
             logIt("WAIT TIME PER FRAME: %d", wTime);
@@ -216,7 +216,7 @@
                 if (run_worker(in.get(), data, id) == -1){
                     break;
                 }
-                usleep(wTime);
+                // usleep(wTime);
 
                 id++;
             }
@@ -225,6 +225,10 @@
         }
     }
 
+    void Wrapper::SetRecMinCacheTime(const int mind){
+        rec_->SetRecMinCacheTime(mind);
+    }
+    
     void Wrapper::BuildRecorder(const char* id, const char *output, const int mindur, const int maxdur, const bool audio){
         bool a = audio;
         if (gb_) a = false;

--
Gitblit v1.8.0