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

---
 goffmpeg.go |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/goffmpeg.go b/goffmpeg.go
index 5ed9343..1844a22 100644
--- a/goffmpeg.go
+++ b/goffmpeg.go
@@ -140,3 +140,16 @@
 	}
 	C.free(unsafe.Pointer(p))
 }
+
+// GetGBJpg Get GB28181 Jpg
+func GetGBJpg(rtspUrl string) []byte {
+    rtsp := C.CString(rtspUrl)
+    defer C.free(unsafe.Pointer(rtsp))
+    var jpgLen C.int
+
+    pic := C.wrap_fn_get_gb28181_pic(unsafe.Pointer(libcffmpeg), rtsp, &jpgLen)
+    defer C.free(unsafe.Pointer(pic))
+
+    retJpg := C.GoBytes(unsafe.Pointer(pic), jpgLen)
+    return retJpg
+}
\ No newline at end of file

--
Gitblit v1.8.0