rewrite unmarshaling interface and tests of formats (#238)

This commit is contained in:
Alessandro Ros
2023-04-10 15:07:59 +02:00
committed by GitHub
parent c0c2dd68d3
commit 9ca5e130fe
53 changed files with 911 additions and 1383 deletions

View File

@@ -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)
}