From a8b447be656145c9ba2a2d8319a10ae8f726de1f Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期五, 09 十月 2020 18:20:46 +0800
Subject: [PATCH] h264 mp4

---
 gorec.go |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/gorec.go b/gorec.go
index eb44575..2ed0aa1 100644
--- a/gorec.go
+++ b/gorec.go
@@ -8,11 +8,17 @@
 
 import "unsafe"
 
+// OpenRecorder rec func open
+func (h *GoFFMPEG) OpenRecorder() {
+	C.wrap_fn_open_rec(unsafe.Pointer(libcffmpeg), h.ffmpeg)
+}
+
 // FireRecorder fire recorder
-func (h *GoFFMPEG) FireRecorder(sid string, id int64) {
+func (h *GoFFMPEG) FireRecorder(sid string, id int64) int {
 	csid := C.CString(sid)
 	defer C.free(unsafe.Pointer(csid))
-	C.wrap_fn_fire_recorder(unsafe.Pointer(libcffmpeg), h.ffmpeg, csid, C.long(id))
+	ret := C.wrap_fn_fire_recorder(unsafe.Pointer(libcffmpeg), h.ffmpeg, csid, C.long(id))
+	return int(ret)
 }
 
 // BuildRecorder build recorder
@@ -51,9 +57,4 @@
 	// fmt.Println("Go get info : ", path, " len: ", l)
 
 	return gID, int(i), path
-}
-
-// SetRecDurationForCache cache
-func (h *GoFFMPEG) SetRecDurationForCache(min, max int) {
-	C.wrap_fn_rec_duration(unsafe.Pointer(libcffmpeg), h.ffmpeg, C.int(min), C.int(max))
 }

--
Gitblit v1.8.0