mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
merge format and formatdecenc into formats (#222)
This commit is contained in:
24
pkg/formats/mpeg2_video_test.go
Normal file
24
pkg/formats/mpeg2_video_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package formats
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestMPEG2VideoAttributes(t *testing.T) {
|
||||
format := &MPEG2Video{}
|
||||
require.Equal(t, "MPEG2-video", format.String())
|
||||
require.Equal(t, 90000, format.ClockRate())
|
||||
require.Equal(t, uint8(32), format.PayloadType())
|
||||
require.Equal(t, true, format.PTSEqualsDTS(&rtp.Packet{}))
|
||||
}
|
||||
|
||||
func TestMPEG2VideoMediaDescription(t *testing.T) {
|
||||
format := &MPEG2Video{}
|
||||
|
||||
rtpmap, fmtp := format.Marshal()
|
||||
require.Equal(t, "", rtpmap)
|
||||
require.Equal(t, map[string]string(nil), fmtp)
|
||||
}
|
Reference in New Issue
Block a user