mirror of https://bitbucket.org/ausocean/av.git
started porting rtmpWrite func
This commit is contained in:
parent
6b4ece57e5
commit
9d186f51bb
|
@ -86,11 +86,16 @@ func (s *session) Open() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *session) rtmpWrite(rtmp *C.RTMP, data []byte, dataLength uint ) bool {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (s *session) writeFrame(data []byte, dataLength uint) uint {
|
func (s *session) writeFrame(data []byte, dataLength uint) uint {
|
||||||
if !C.RTMP_IsConnected(rtmp) {
|
if !C.RTMP_IsConnected(rtmp) {
|
||||||
return 1
|
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 2
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue