mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
Some checks are pending
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
Stream units now share the same struct, with a specialized payload.
32 lines
607 B
Go
32 lines
607 B
Go
package codecprocessor
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/bluenviron/gortsplib/v5/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.Unit{
|
|
PTS: 30000,
|
|
Payload: unit.PayloadAV1{
|
|
{byte(mcav1.OBUTypeTemporalDelimiter) << 3},
|
|
{5},
|
|
},
|
|
}
|
|
|
|
err = p.ProcessUnit(u)
|
|
require.NoError(t, err)
|
|
|
|
require.Equal(t, unit.PayloadAV1{
|
|
{5},
|
|
}, u.Payload)
|
|
}
|