From 080acae08ec8cfe413c3e6e45bcf7f9222dfa02d Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期四, 24 十月 2019 16:50:28 +0800
Subject: [PATCH] update

---
 gorec.go |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gorec.go b/gorec.go
index dcf0f5e..eb44575 100644
--- a/gorec.go
+++ b/gorec.go
@@ -12,11 +12,11 @@
 func (h *GoFFMPEG) FireRecorder(sid string, id int64) {
 	csid := C.CString(sid)
 	defer C.free(unsafe.Pointer(csid))
-	C.wrap_fn_fire_recorder(h.ffmpeg, csid, C.long(id))
+	C.wrap_fn_fire_recorder(unsafe.Pointer(libcffmpeg), h.ffmpeg, csid, C.long(id))
 }
 
 // BuildRecorder build recorder
-func (h *GoFFMPEG) BuildRecorder(sid, output string, mind, maxd int, audio bool) {
+func (h *GoFFMPEG) BuildRecorder(sid, output string, id int64, mind, maxd int, audio bool) {
 	out := C.CString(output)
 	defer C.free(unsafe.Pointer(out))
 	csid := C.CString(sid)
@@ -26,7 +26,7 @@
 	if audio {
 		a = 1
 	}
-	C.wrap_fn_recorder(h.ffmpeg, csid, out, C.int(mind), C.int(maxd), C.int(a))
+	C.wrap_fn_recorder(unsafe.Pointer(libcffmpeg), h.ffmpeg, csid, out, C.long(id), C.int(mind), C.int(maxd), C.int(a))
 }
 
 // GetInfoRecorder info
@@ -39,7 +39,7 @@
 	var p *C.char
 	var pl C.int
 
-	C.wrap_fn_info_recorder(h.ffmpeg, &i, &id, &idl, &p, &pl)
+	C.wrap_fn_info_recorder(unsafe.Pointer(libcffmpeg), h.ffmpeg, &i, &id, &idl, &p, &pl)
 	// if p == nil {
 	// 	return -1, ""
 	// }
@@ -52,3 +52,8 @@
 
 	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