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 {
|
if enc == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_capabilities, 15.0)))
|
//unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_capabilities, 15.0)))
|
||||||
//enc = amfEncodeNamedNumber(enc, pend, &av_capabilities, 15.0)
|
enc = amfEncodeNamedNumber(enc, pend, &av_capabilities, 15.0)
|
||||||
if enc == nil {
|
if enc == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_audioCodecs, r.m_fAudioCodecs)))
|
// unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_audioCodecs, r.m_fAudioCodecs)))
|
||||||
//enc = amfEncodeNamedNumber(enc, pend, &av_audioCodecs, float64(r.m_fAudioCodecs))
|
enc = amfEncodeNamedNumber(enc, pend, &av_audioCodecs, float64(r.m_fAudioCodecs))
|
||||||
if enc == nil {
|
if enc == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoCodecs, r.m_fVideoCodecs)))
|
//unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoCodecs, r.m_fVideoCodecs)))
|
||||||
//enc = amfEncodeNamedNumber(enc, pend, &av_videoCodecs, float64(r.m_fVideoCodecs))
|
enc = amfEncodeNamedNumber(enc, pend, &av_videoCodecs, float64(r.m_fVideoCodecs))
|
||||||
if enc == nil {
|
if enc == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
//enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNamedNumber((*C.char)(
|
||||||
unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoFunction, 1.0)))
|
// unsafe.Pointer(enc)), (*C.char)(unsafe.Pointer(pend)), &av_videoFunction, 1.0)))
|
||||||
//enc = amfEncodeNamedNumber(enc, pend, &av_videoFunction, 1.0)
|
enc = amfEncodeNamedNumber(enc, pend, &av_videoFunction, 1.0)
|
||||||
if enc == nil {
|
if enc == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -1588,7 +1588,7 @@ func amfEncodeNamedNumber(output *byte, outend *byte, strName *C.AVal, dVal floa
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
output = amfEncodeInt16(output, outend, int16(strName.av_len))
|
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)))
|
output = (*byte)(incBytePtr(unsafe.Pointer(output), int(strName.av_len)))
|
||||||
return amfEncodeNumber(output, outend, dVal)
|
return amfEncodeNumber(output, outend, dVal)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue