mirror of https://bitbucket.org/ausocean/av.git
rtmp: added more funcs to NOT_PORTED and removed commented out sections from AMFProp_Decode in amf.go
This commit is contained in:
parent
01f3caa8ec
commit
e0c3cd3b32
54
rtmp/amf.go
54
rtmp/amf.go
|
@ -531,13 +531,7 @@ func C_AMFProp_Decode(prop *C_AMFObjectProperty, pBuffer *byte, nSize, bDecodeNa
|
|||
|
||||
case AMF_BOOLEAN:
|
||||
panic("AMF_BOOLEAN not supported")
|
||||
/*
|
||||
if nSize < 1 {
|
||||
return -1
|
||||
}
|
||||
prop.p_vu.p_number = float64(C_AMF_DecodeBoolean((*byte)(unsafe.Pointer(pBuffer))))
|
||||
nSize--
|
||||
*/
|
||||
|
||||
case AMF_STRING:
|
||||
var nStringSize = C_AMF_DecodeInt16(pBuffer)
|
||||
|
||||
|
@ -588,47 +582,13 @@ func C_AMFProp_Decode(prop *C_AMFObjectProperty, pBuffer *byte, nSize, bDecodeNa
|
|||
|
||||
case AMF_STRICT_ARRAY:
|
||||
panic("AMF_STRICT_ARRAY not supported")
|
||||
/*
|
||||
nArrayLen := int32(C_AMF_DecodeInt32(pBuffer))
|
||||
nSize -= 4
|
||||
|
||||
nRes = C_AMF_DecodeArray(&prop.p_vu.p_object, (*byte)(incBytePtr(unsafe.Pointer(pBuffer), 4)), nSize, int32(nArrayLen), FALSE)
|
||||
if nRes == -1 {
|
||||
return -1
|
||||
}
|
||||
nSize -= nRes
|
||||
*/
|
||||
|
||||
case AMF_DATE:
|
||||
panic("AMF_DATE not supported")
|
||||
|
||||
/*
|
||||
// TODO use new logger here
|
||||
//RTMP_Log(RTMP_LOGDEBUG, "AMF_DATE");
|
||||
|
||||
if nSize < 10 {
|
||||
return -1
|
||||
}
|
||||
|
||||
prop.p_vu.p_number = float64(C_AMF_DecodeNumber(pBuffer))
|
||||
prop.p_UTCoffset = C.int16_t(C_AMF_DecodeInt16((*byte)(incBytePtr(unsafe.Pointer(pBuffer), 8))))
|
||||
|
||||
nSize -= 10
|
||||
|
||||
*/
|
||||
case AMF_LONG_STRING, AMF_XML_DOC:
|
||||
panic("AMF_LONG_STRING, AMF_XML_DOC not supported")
|
||||
/*
|
||||
var nStringSize uint32 = C_AMF_DecodeInt32(pBuffer)
|
||||
if int64(nSize) < int64(nStringSize)+4 {
|
||||
return -1
|
||||
}
|
||||
C_AMF_DecodeLongString(pBuffer, &prop.p_vu.p_aval)
|
||||
nSize -= int32(4 + nStringSize)
|
||||
if prop.p_type == AMF_LONG_STRING {
|
||||
prop.p_type = AMF_STRING
|
||||
}
|
||||
*/
|
||||
|
||||
case AMF_RECORDSET:
|
||||
// TODO use new logger here
|
||||
log.Println("AMFProp_Decode: AMF_RECORDSET reserved!")
|
||||
|
@ -643,15 +603,7 @@ func C_AMFProp_Decode(prop *C_AMFObjectProperty, pBuffer *byte, nSize, bDecodeNa
|
|||
|
||||
case AMF_AVMPLUS:
|
||||
panic("AMF_AVMPLUS not supported")
|
||||
/*
|
||||
log.Println("18")
|
||||
nRes := int32(C.AMF3_Decode(&prop.p_vu.p_object, (*byte)(unsafe.Pointer(pBuffer)), int32(nSize), 1))
|
||||
if nRes == -1 {
|
||||
return -1
|
||||
}
|
||||
nSize -= nRes
|
||||
prop.p_type = AMF_OBJECT
|
||||
*/
|
||||
|
||||
default:
|
||||
// TODO use new logger here
|
||||
//RTMP_Log(RTMP_LOGDEBUG, "%s - unknown datatype 0x%02x, @%p", __FUNCTION__,
|
||||
|
|
Loading…
Reference in New Issue