mirror of
https://github.com/aler9/gortsplib
synced 2025-10-19 21:44:51 +08:00
rewrite unmarshaling interface and tests of formats (#238)
This commit is contained in:
@@ -21,22 +21,3 @@ func TestMPEG4AudioLATMAttributes(t *testing.T) {
|
||||
require.Equal(t, uint8(96), format.PayloadType())
|
||||
require.Equal(t, true, format.PTSEqualsDTS(&rtp.Packet{}))
|
||||
}
|
||||
|
||||
func TestMPEG4AudioLATMMediaDescription(t *testing.T) {
|
||||
format := &MPEG4AudioLATM{
|
||||
PayloadTyp: 96,
|
||||
SampleRate: 48000,
|
||||
Channels: 2,
|
||||
Object: 2,
|
||||
ProfileLevelID: 1,
|
||||
Config: []byte{0x01, 0x02, 0x03},
|
||||
}
|
||||
|
||||
rtpmap, fmtp := format.Marshal()
|
||||
require.Equal(t, "MP4A-LATM/48000/2", rtpmap)
|
||||
require.Equal(t, map[string]string{
|
||||
"profile-level-id": "1",
|
||||
"object": "2",
|
||||
"config": "010203",
|
||||
}, fmtp)
|
||||
}
|
||||
|
Reference in New Issue
Block a user