diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index f6ad194c..70f08380 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -1098,7 +1098,7 @@ func C_SendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int { //incPtr(unsafe.Pointer(&r.Link.extras.o_props), int(unsafe.Sizeof( //r.Link.extras.o_props)), i)), (*C.char)(unsafe.Pointer(enc)), (*C.char)( //unsafe.Pointer(pend))))) - enc = amfPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( + enc = C_AMFPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( &r.Link.extras.o_props), int(unsafe.Sizeof(r.Link.extras.o_props)), i)), enc, pend) @@ -1115,7 +1115,7 @@ func C_SendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int { return rtmpSendPacket(r, &packet, 1) } -func amfPropEncode(p *C.AMFObjectProperty, pBuffer *byte, pBufEnd *byte) *byte { +func C_AMFPropEncode(p *C.AMFObjectProperty, pBuffer *byte, pBufEnd *byte) *byte { if p.p_type == AMF_INVALID { return nil } @@ -1165,7 +1165,7 @@ func amfPropEncode(p *C.AMFObjectProperty, pBuffer *byte, pBufEnd *byte) *byte { //pBuffer = (*byte)(unsafe.Pointer(C.AMF_EncodeArray(&p.p_vu.p_object, (*C.char)(unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd))))) pBuffer = amfEncodeArray(&p.p_vu.p_object, pBuffer, pBufEnd) default: - log.Println("amfPropEncode: invalid type!") + log.Println("C_AMFPropEncode: invalid type!") pBuffer = nil } return pBuffer @@ -1180,7 +1180,7 @@ func amfEncode(obj *C.AMFObject, pBuffer *byte, pBufEnd *byte) *byte { pBuffer = (*byte)(incBytePtr(unsafe.Pointer(pBuffer), 1)) for i := 0; i < int(obj.o_num); i++ { - res := amfPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( + res := C_AMFPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( obj.o_props), i, int(unsafe.Sizeof(*obj.o_props)))), pBuffer, pBufEnd) if res == nil { log.Println("amfEncode: failed to encode property in index") @@ -1210,7 +1210,7 @@ func amfEncodeEcmaArray(obj *C.AMFObject, pBuffer *byte, pBufEnd *byte) *byte { pBuffer = amfEncodeInt32(pBuffer, pBufEnd, int32(obj.o_num)) for i := 0; i < int(obj.o_num); i++ { - res := amfPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( + res := C_AMFPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( obj.o_props), i, int(unsafe.Sizeof(*obj.o_props)))), pBuffer, pBufEnd) if res == nil { log.Println("amfEncodeEcmaArray: failed to encode property!") @@ -1240,7 +1240,7 @@ func amfEncodeArray(obj *C.AMFObject, pBuffer *byte, pBufEnd *byte) *byte { pBuffer = amfEncodeInt32(pBuffer, pBufEnd, int32(obj.o_num)) for i := 0; i < int(obj.o_num); i++ { - res := amfPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( + res := C_AMFPropEncode((*C.AMFObjectProperty)(incPtr(unsafe.Pointer( obj.o_props), i, int(unsafe.Sizeof(*obj.o_props)))), pBuffer, pBufEnd) if res == nil { log.Println("amfEncodeEcmaArray: failed to encode property!")