support publishing, reading and proxying MPEG-2 audio (MP3) tracks with RTMP (#1102) (#1736)

This commit is contained in:
Alessandro Ros
2023-04-25 18:13:51 +02:00
committed by GitHub
parent c314d77596
commit 2d17dff3b5
27 changed files with 727 additions and 487 deletions

View File

@@ -27,11 +27,29 @@ var readWriterCases = []struct {
},
},
{
"audio",
"audio mpeg2",
&MsgAudio{
ChunkStreamID: 7,
DTS: 6013806 * time.Millisecond,
MessageStreamID: 4534543,
Codec: CodecMPEG2Audio,
Rate: flvio.SOUND_44Khz,
Depth: flvio.SOUND_16BIT,
Channels: flvio.SOUND_STEREO,
Payload: []byte{0x01, 0x02, 0x03, 0x04},
},
[]byte{
0x7, 0x5b, 0xc3, 0x6e, 0x0, 0x0, 0x5, 0x8, 0x0, 0x45, 0x31, 0xf, 0x2f,
0x01, 0x02, 0x03, 0x04,
},
},
{
"audio mpeg4",
&MsgAudio{
ChunkStreamID: 7,
DTS: 6013806 * time.Millisecond,
MessageStreamID: 4534543,
Codec: CodecMPEG4Audio,
Rate: flvio.SOUND_44Khz,
Depth: flvio.SOUND_16BIT,
Channels: flvio.SOUND_STEREO,