add MP4A-LATM decoder and encoder (#299)

This commit is contained in:
Alessandro Ros
2023-06-01 20:07:47 +02:00
committed by GitHub
parent 84048960b4
commit 80cf861ec7
87 changed files with 1795 additions and 699 deletions

View File

@@ -19,12 +19,16 @@ func TestAV1Attributes(t *testing.T) {
func TestAV1DecEncoder(t *testing.T) {
format := &AV1{}
enc := format.CreateEncoder()
enc, err := format.CreateEncoder2()
require.NoError(t, err)
pkts, err := enc.Encode([][]byte{{0x01, 0x02, 0x03, 0x04}}, 0)
require.NoError(t, err)
require.Equal(t, format.PayloadType(), pkts[0].PayloadType)
dec := format.CreateDecoder()
dec, err := format.CreateDecoder2()
require.NoError(t, err)
byts, _, err := dec.Decode(pkts[0])
require.NoError(t, err)
require.Equal(t, [][]byte{{0x01, 0x02, 0x03, 0x04}}, byts)