From 9d186f51bbc8548e849f132a55784b337e999200 Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Thu, 28 Jun 2018 03:32:16 +0930 Subject: [PATCH] started porting rtmpWrite func --- rtmp/rtmp.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 7eaa2ad1..ea6b0278 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -86,11 +86,16 @@ func (s *session) Open() error { return nil } +func (s *session) rtmpWrite(rtmp *C.RTMP, data []byte, dataLength uint ) bool { + +} + func (s *session) writeFrame(data []byte, dataLength uint) uint { if !C.RTMP_IsConnected(rtmp) { return 1 } - if !C.RTMP_Write(s.rtmp, (const char*)(*C.char)(unsafe.Pointer(&data[0])), C.uint(dataLength)) { + // !C.RTMP_Write(s.rtmp, (const char*)(*C.char)(unsafe.Pointer(&data[0])), C.uint(dataLength)) + if rtmpWrite(s.rtmp, data, dataLength) { return 2 } return 0