mirror of https://bitbucket.org/ausocean/av.git
Getting ready for a test run
This commit is contained in:
parent
55db8289ca
commit
3d3b4d2af5
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue