mirror of https://bitbucket.org/ausocean/av.git
Using my amfEncodeNamedNumber and amfEncodeNumber - tested and working
This commit is contained in:
parent
60b88dbf6c
commit
c205e3874a
26
rtmp/rtmp.go
26
rtmp/rtmp.go
|
@ -1020,27 +1020,27 @@ func sendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int {
|
|||
if enc == nil {
|
||||
return 0
|
||||
}
|
||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_capabilities, 15.0)))
|
||||
//enc = amfEncodeNamedNumber(enc, pend, &av_capabilities, 15.0)
|
||||
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
//unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_capabilities, 15.0)))
|
||||
enc = amfEncodeNamedNumber(enc, pend, &av_capabilities, 15.0)
|
||||
if enc == nil {
|
||||
return 0
|
||||
}
|
||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_audioCodecs, r.m_fAudioCodecs)))
|
||||
//enc = amfEncodeNamedNumber(enc, pend, &av_audioCodecs, float64(r.m_fAudioCodecs))
|
||||
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
// unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_audioCodecs, r.m_fAudioCodecs)))
|
||||
enc = amfEncodeNamedNumber(enc, pend, &av_audioCodecs, float64(r.m_fAudioCodecs))
|
||||
if enc == nil {
|
||||
return 0
|
||||
}
|
||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoCodecs, r.m_fVideoCodecs)))
|
||||
//enc = amfEncodeNamedNumber(enc, pend, &av_videoCodecs, float64(r.m_fVideoCodecs))
|
||||
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
//unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoCodecs, r.m_fVideoCodecs)))
|
||||
enc = amfEncodeNamedNumber(enc, pend, &av_videoCodecs, float64(r.m_fVideoCodecs))
|
||||
if enc == nil {
|
||||
return 0
|
||||
}
|
||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoFunction, 1.0)))
|
||||
//enc = amfEncodeNamedNumber(enc, pend, &av_videoFunction, 1.0)
|
||||
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||
// unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoFunction, 1.0)))
|
||||
enc = amfEncodeNamedNumber(enc, pend, &av_videoFunction, 1.0)
|
||||
if enc == nil {
|
||||
return 0
|
||||
}
|
||||
|
@ -1588,7 +1588,7 @@ func amfEncodeNamedNumber(output *byte, outend *byte, strName *C.AVal, dVal floa
|
|||
return nil
|
||||
}
|
||||
output = amfEncodeInt16(output, outend, int16(strName.av_len))
|
||||
memmove(unsafe.Pointer(output), unsafe.Pointer(outend), uintptr(strName.av_len))
|
||||
memmove(unsafe.Pointer(output), unsafe.Pointer(strName.av_val), uintptr(strName.av_len))
|
||||
output = (*byte)(incBytePtr(unsafe.Pointer(output), int(strName.av_len)))
|
||||
return amfEncodeNumber(output, outend, dVal)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue