rtmp: moved amf structs from rtmp.go to amf.go

This commit is contained in:
saxon 2018-08-24 06:49:47 +09:30
parent 595fa5a469
commit 7a9fef826c
2 changed files with 29 additions and 26 deletions

View File

@ -21,3 +21,32 @@ const (
AMF_AVMPLUS /* switch to AMF3 */
AMF_INVALID = 0xff
)
var (
AMFObj_Invalid C_AMFObject
AMFProp_Invalid = C_AMFObjectProperty{p_type: AMF_INVALID}
)
// typedef struct AMF_Object
// amf.h +67
type C_AMFObject struct {
o_num int32
o_props *C_AMFObjectProperty
}
// typedef struct AMFObjectProperty
// amf.h +79
type C_AMFObjectProperty struct {
p_name C_AVal
p_type C_AMFDataType
p_vu P_vu
p_UTCoffset int16
}
// typedef struct P_vu
// amf.h +73
type P_vu struct {
p_number float64
p_aval C_AVal
p_object C_AMFObject
}

View File

@ -208,8 +208,6 @@ var (
)
var (
AMFObj_Invalid C_AMFObject
AMFProp_Invalid = C_AMFObjectProperty{p_type: AMF_INVALID}
packetSize = [...]int{12, 8, 4, 1}
RTMPProtocolStringsLower = [...]string{
"rtmp",
@ -374,30 +372,6 @@ type C_RTMP_LNK struct {
port uint16
}
// typedef struct AMF_Object
// amf.h +67
type C_AMFObject struct {
o_num int32
o_props *C_AMFObjectProperty
}
// typedef struct AMFObjectProperty
// amf.h +79
type C_AMFObjectProperty struct {
p_name C_AVal
p_type C_AMFDataType
p_vu P_vu
p_UTCoffset int16
}
// typedef struct P_vu
// amf.h +73
type P_vu struct {
p_number float64
p_aval C_AVal
p_object C_AMFObject
}
// NewSession returns a new session.
func NewSession(url string, connectTimeout uint) *Session {
return &Session{