mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-29 06:22:00 -08:00
rewrite Unit definition (#5079)
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
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.
This commit is contained in:
parent
e2294836f5
commit
f5f03562d3
86 changed files with 1100 additions and 1602 deletions
|
|
@ -3,10 +3,8 @@ package codecprocessor
|
|||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"time"
|
||||
|
||||
"github.com/bluenviron/gortsplib/v5/pkg/format"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
"github.com/bluenviron/mediamtx/internal/logger"
|
||||
"github.com/bluenviron/mediamtx/internal/unit"
|
||||
|
|
@ -24,15 +22,13 @@ func randUint32() (uint32, error) {
|
|||
// Processor is the codec-specific part of the processing that happens inside stream.Stream.
|
||||
type Processor interface {
|
||||
// process a Unit.
|
||||
ProcessUnit(unit.Unit) error
|
||||
ProcessUnit(*unit.Unit) error
|
||||
|
||||
// process a RTP packet and convert it into a unit.
|
||||
// process a RTP packet.
|
||||
ProcessRTPPacket(
|
||||
pkt *rtp.Packet,
|
||||
ntp time.Time,
|
||||
pts int64,
|
||||
u *unit.Unit,
|
||||
hasNonRTSPReaders bool,
|
||||
) (unit.Unit, error)
|
||||
) error
|
||||
|
||||
initialize() error
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue