From d9b84f5a9ea0adac7ee9c008cb4eef00da862a3d Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期一, 30 十二月 2019 13:15:33 +0800
Subject: [PATCH] update

---
 csrc/wrapper.cpp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp
index 9706071..cd82a90 100644
--- a/csrc/wrapper.cpp
+++ b/csrc/wrapper.cpp
@@ -403,5 +403,26 @@
 
         return flag;
     }
+
+    int GetGb28181Pic(const char *rtspUrl, char *retData, int *retDataLen){
+        int ret = 0;
+        std::string fn = rtspUrl;
+
+        auto handle_gb28181 = new GB28181API;
+        if(handle_gb28181->addCamera(fn) == -1){
+            delete(handle_gb28181);
+            logIt("do addCamera Error\n");
+            return -1;
+        }
+
+        int retLen = handle_gb28181->capturePic(handle_gb28181, retData, retDataLen);
+        if(retLen == 0){
+            logIt("do capturePic failed:%d");
+            ret = -1;
+        }
+
+        handle_gb28181->deleteCamera();
+        return ret;
+    }
 }
 

--
Gitblit v1.8.0