diff --git a/client_read_test.go b/client_read_test.go index 139575f3..53a5fd8c 100644 --- a/client_read_test.go +++ b/client_read_test.go @@ -59,7 +59,7 @@ func TestClientReadTracks(t *testing.T) { track2 := &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 44100, ChannelCount: 2, }, @@ -71,7 +71,7 @@ func TestClientReadTracks(t *testing.T) { track3 := &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 96000, ChannelCount: 2, }, diff --git a/examples/client-publish-codec-mpeg4audio/main.go b/examples/client-publish-codec-mpeg4audio/main.go index 3e95cf9a..c072386a 100644 --- a/examples/client-publish-codec-mpeg4audio/main.go +++ b/examples/client-publish-codec-mpeg4audio/main.go @@ -38,7 +38,7 @@ func main() { track := &gortsplib.TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, diff --git a/pkg/mpeg4audio/adts_test.go b/pkg/mpeg4audio/adts_test.go index 166c8997..c2212c1d 100644 --- a/pkg/mpeg4audio/adts_test.go +++ b/pkg/mpeg4audio/adts_test.go @@ -16,7 +16,7 @@ var casesADTS = []struct { []byte{0xff, 0xf1, 0x4c, 0x80, 0x1, 0x3f, 0xfc, 0xaa, 0xbb}, ADTSPackets{ { - Type: 2, + Type: ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, AU: []byte{0xaa, 0xbb}, @@ -32,13 +32,13 @@ var casesADTS = []struct { }, ADTSPackets{ { - Type: 2, + Type: ObjectTypeAACLC, SampleRate: 44100, ChannelCount: 1, AU: []byte{0xaa, 0xbb}, }, { - Type: 2, + Type: ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, AU: []byte{0xcc, 0xdd}, diff --git a/pkg/mpeg4audio/config_test.go b/pkg/mpeg4audio/config_test.go index 30e88ea2..ecc6c573 100644 --- a/pkg/mpeg4audio/config_test.go +++ b/pkg/mpeg4audio/config_test.go @@ -109,7 +109,7 @@ func TestConfigMarshalErrors(t *testing.T) { { "invalid channel config", Config{ - Type: 2, + Type: ObjectTypeAACLC, SampleRate: 44100, ChannelCount: 0, }, diff --git a/track_mpeg4audio_test.go b/track_mpeg4audio_test.go index 24461515..bc7bf754 100644 --- a/track_mpeg4audio_test.go +++ b/track_mpeg4audio_test.go @@ -13,7 +13,7 @@ func TestTrackMPEG4AudioAttributes(t *testing.T) { track := &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, @@ -29,7 +29,7 @@ func TestTrackMPEG4AudioClone(t *testing.T) { track := &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, @@ -47,7 +47,7 @@ func TestTrackMPEG4AudioMediaDescription(t *testing.T) { track := &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, diff --git a/track_test.go b/track_test.go index 5b79cd71..b5bea43a 100644 --- a/track_test.go +++ b/track_test.go @@ -75,7 +75,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) { &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, @@ -106,7 +106,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) { &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, @@ -137,7 +137,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) { &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, }, @@ -172,7 +172,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) { &TrackMPEG4Audio{ PayloadType: 96, Config: &mpeg4audio.Config{ - Type: 2, + Type: mpeg4audio.ObjectTypeAACLC, SampleRate: 48000, ChannelCount: 2, },