Ported AMFProp_GetNumber - tested and working

This commit is contained in:
saxon 2018-08-15 03:14:35 +09:30
parent 137c5a0c14
commit 9c460b90cf
1 changed files with 6 additions and 2 deletions

View File

@ -1942,9 +1942,7 @@ func C_HandleClientBW(r *C.RTMP, packet *C.RTMPPacket) {
// int HandleInvoke(RTMP* r, const char* body, unsigned int nBodySize);
// rtmp.c +2912
// TODO port AMFProp_GetObject (amf.c +342)
// TODO port AMFProp_GetNumber (amf.c +330)
// TODO port AMF_GetProp (amf.c +1249)
// TODO port AV_erase (rtmp.c +2393)
// TODO port SendReleaseStream (rtmp.c +1816)
// TODO port SendFCPublish (rtmp.c +1846)
@ -2293,6 +2291,12 @@ func C_AMF_GetProp(obj *C.AMFObject, name *C.AVal, nIndex int32) *C.AMFObjectPro
return (*C.AMFObjectProperty)(&AMFProp_Invalid)
}
// double AMFProp_GetNumber(AMFObjectProperty* prop);
// amf.c +330
func C_AMFProp_GetNumber(prop *C.AMFObjectProperty) float64 {
return float64(prop.p_vu.p_number)
}
// void RTMPPacket_Free(RTMPPacket* p);
// rtmp.c +203
func C_RTMPPacket_Free(p *C.RTMPPacket) {