mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-11-03 09:51:26 +08:00
* support reading AV1, VP9, H265, Opus, AC-3, G711, LPCM * support reading multiple video or audio tracks at once
This commit is contained in:
34
internal/formatprocessor/av1_test.go
Normal file
34
internal/formatprocessor/av1_test.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package formatprocessor
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v4/pkg/format"
|
||||
mcav1 "github.com/bluenviron/mediacommon/v2/pkg/codecs/av1"
|
||||
"github.com/bluenviron/mediamtx/internal/unit"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAV1RemoveTUD(t *testing.T) {
|
||||
forma := &format.AV1{}
|
||||
|
||||
p, err := New(1450, forma, true, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
u := &unit.AV1{
|
||||
Base: unit.Base{
|
||||
PTS: 30000,
|
||||
},
|
||||
TU: [][]byte{
|
||||
{byte(mcav1.OBUTypeTemporalDelimiter) << 3},
|
||||
{5},
|
||||
},
|
||||
}
|
||||
|
||||
err = p.ProcessUnit(u)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, [][]byte{
|
||||
{5},
|
||||
}, u.TU)
|
||||
}
|
||||
Reference in New Issue
Block a user