mirror of
https://github.com/aler9/gortsplib
synced 2025-10-21 14:19:36 +08:00
rewrite unmarshaling interface and tests of formats (#238)
This commit is contained in:
@@ -26,27 +26,3 @@ func TestGenericAttributes(t *testing.T) {
|
||||
require.Equal(t, uint8(98), format.PayloadType())
|
||||
require.Equal(t, true, format.PTSEqualsDTS(&rtp.Packet{}))
|
||||
}
|
||||
|
||||
func TestGenericMediaDescription(t *testing.T) {
|
||||
format := &Generic{
|
||||
PayloadTyp: 98,
|
||||
RTPMap: "H265/90000",
|
||||
FMTP: map[string]string{
|
||||
"profile-id": "1",
|
||||
"sprop-vps": "QAEMAf//AWAAAAMAAAMAAAMAAAMAlqwJ",
|
||||
"sprop-sps": "QgEBAWAAAAMAAAMAAAMAAAMAlqADwIAQ5Za5JMmuWcBSSgAAB9AAAHUwgkA=",
|
||||
"sprop-pps": "RAHgdrAwxmQ=",
|
||||
},
|
||||
}
|
||||
err := format.Init()
|
||||
require.NoError(t, err)
|
||||
|
||||
rtpmap, fmtp := format.Marshal()
|
||||
require.Equal(t, "H265/90000", rtpmap)
|
||||
require.Equal(t, map[string]string{
|
||||
"profile-id": "1",
|
||||
"sprop-vps": "QAEMAf//AWAAAAMAAAMAAAMAAAMAlqwJ",
|
||||
"sprop-sps": "QgEBAWAAAAMAAAMAAAMAAAMAlqADwIAQ5Za5JMmuWcBSSgAAB9AAAHUwgkA=",
|
||||
"sprop-pps": "RAHgdrAwxmQ=",
|
||||
}, fmtp)
|
||||
}
|
||||
|
Reference in New Issue
Block a user