Getting ready for a test run

This commit is contained in:
saxon 2018-07-05 10:16:30 +09:30
parent 55db8289ca
commit 3d3b4d2af5
1 changed files with 8 additions and 1 deletions

View File

@ -86,6 +86,7 @@ func (s *session) Open() error {
return nil
}
/*
func (s *session) rtmpWrite(rtmp *C.RTMP, data []byte) bool {
var pkt *C.RTMPPacket = &rtmp.m_write
var pend, enc *C.char
@ -94,15 +95,21 @@ func (s *session) rtmpWrite(rtmp *C.RTMP, data []byte) bool {
}
*/
func (s *session) writeFrame(data []byte) uint {
if !C.RTMP_IsConnected(rtmp) {
return 1
}
// !C.RTMP_Write(s.rtmp, (const char*)(*C.char)(unsafe.Pointer(&data[0])), C.uint(dataLength))
if !C.RTMP_Write(s.rtmp, (const char*)(*C.char)(unsafe.Pointer(&data[0])), C.uint(dataLength)) {
return 2
}
/*
if rtmpWrite(s.rtmp, data) {
return 2
}
*/
return 0
}