mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
use named constant for MPEG4-audio object type
This commit is contained in:
@@ -59,7 +59,7 @@ func TestClientReadTracks(t *testing.T) {
|
|||||||
track2 := &TrackMPEG4Audio{
|
track2 := &TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 44100,
|
SampleRate: 44100,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
@@ -71,7 +71,7 @@ func TestClientReadTracks(t *testing.T) {
|
|||||||
track3 := &TrackMPEG4Audio{
|
track3 := &TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 96000,
|
SampleRate: 96000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
|
@@ -38,7 +38,7 @@ func main() {
|
|||||||
track := &gortsplib.TrackMPEG4Audio{
|
track := &gortsplib.TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
|
@@ -16,7 +16,7 @@ var casesADTS = []struct {
|
|||||||
[]byte{0xff, 0xf1, 0x4c, 0x80, 0x1, 0x3f, 0xfc, 0xaa, 0xbb},
|
[]byte{0xff, 0xf1, 0x4c, 0x80, 0x1, 0x3f, 0xfc, 0xaa, 0xbb},
|
||||||
ADTSPackets{
|
ADTSPackets{
|
||||||
{
|
{
|
||||||
Type: 2,
|
Type: ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
AU: []byte{0xaa, 0xbb},
|
AU: []byte{0xaa, 0xbb},
|
||||||
@@ -32,13 +32,13 @@ var casesADTS = []struct {
|
|||||||
},
|
},
|
||||||
ADTSPackets{
|
ADTSPackets{
|
||||||
{
|
{
|
||||||
Type: 2,
|
Type: ObjectTypeAACLC,
|
||||||
SampleRate: 44100,
|
SampleRate: 44100,
|
||||||
ChannelCount: 1,
|
ChannelCount: 1,
|
||||||
AU: []byte{0xaa, 0xbb},
|
AU: []byte{0xaa, 0xbb},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: 2,
|
Type: ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
AU: []byte{0xcc, 0xdd},
|
AU: []byte{0xcc, 0xdd},
|
||||||
|
@@ -109,7 +109,7 @@ func TestConfigMarshalErrors(t *testing.T) {
|
|||||||
{
|
{
|
||||||
"invalid channel config",
|
"invalid channel config",
|
||||||
Config{
|
Config{
|
||||||
Type: 2,
|
Type: ObjectTypeAACLC,
|
||||||
SampleRate: 44100,
|
SampleRate: 44100,
|
||||||
ChannelCount: 0,
|
ChannelCount: 0,
|
||||||
},
|
},
|
||||||
|
@@ -13,7 +13,7 @@ func TestTrackMPEG4AudioAttributes(t *testing.T) {
|
|||||||
track := &TrackMPEG4Audio{
|
track := &TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
@@ -29,7 +29,7 @@ func TestTrackMPEG4AudioClone(t *testing.T) {
|
|||||||
track := &TrackMPEG4Audio{
|
track := &TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
@@ -47,7 +47,7 @@ func TestTrackMPEG4AudioMediaDescription(t *testing.T) {
|
|||||||
track := &TrackMPEG4Audio{
|
track := &TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
|
@@ -75,7 +75,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
|
|||||||
&TrackMPEG4Audio{
|
&TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
@@ -106,7 +106,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
|
|||||||
&TrackMPEG4Audio{
|
&TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
@@ -137,7 +137,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
|
|||||||
&TrackMPEG4Audio{
|
&TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
@@ -172,7 +172,7 @@ func TestTrackNewFromMediaDescription(t *testing.T) {
|
|||||||
&TrackMPEG4Audio{
|
&TrackMPEG4Audio{
|
||||||
PayloadType: 96,
|
PayloadType: 96,
|
||||||
Config: &mpeg4audio.Config{
|
Config: &mpeg4audio.Config{
|
||||||
Type: 2,
|
Type: mpeg4audio.ObjectTypeAACLC,
|
||||||
SampleRate: 48000,
|
SampleRate: 48000,
|
||||||
ChannelCount: 2,
|
ChannelCount: 2,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user