mirror of
https://github.com/aler9/gortsplib
synced 2025-10-17 20:51:09 +08:00
rename MPEGVideo and MPEGAudio into MPEG2Video and MPEG2Audio
This commit is contained in:
39
track_mpeg2audio_test.go
Normal file
39
track_mpeg2audio_test.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package gortsplib
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
psdp "github.com/pion/sdp/v3"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestTrackMPEG2AudioNew(t *testing.T) {
|
||||
track := &TrackMPEG2Audio{}
|
||||
require.Equal(t, "", track.GetControl())
|
||||
}
|
||||
|
||||
func TestTrackMPEG2AudioClone(t *testing.T) {
|
||||
track := &TrackMPEG2Audio{}
|
||||
|
||||
clone := track.clone()
|
||||
require.NotSame(t, track, clone)
|
||||
require.Equal(t, track, clone)
|
||||
}
|
||||
|
||||
func TestTrackMPEG2AudioMediaDescription(t *testing.T) {
|
||||
track := &TrackMPEG2Audio{}
|
||||
|
||||
require.Equal(t, &psdp.MediaDescription{
|
||||
MediaName: psdp.MediaName{
|
||||
Media: "audio",
|
||||
Protos: []string{"RTP", "AVP"},
|
||||
Formats: []string{"14"},
|
||||
},
|
||||
Attributes: []psdp.Attribute{
|
||||
{
|
||||
Key: "control",
|
||||
Value: "",
|
||||
},
|
||||
},
|
||||
}, track.MediaDescription())
|
||||
}
|
Reference in New Issue
Block a user