From 3c0752f11213fb14eeae9e02fd6bc14f295ed378 Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期四, 26 十二月 2019 14:18:03 +0800 Subject: [PATCH] 修改bug --- 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