move units into dedicated package (#2245)
Some checks reported warnings
lint / code (push) Has been cancelled
lint / mod-tidy (push) Has been cancelled
lint / apidocs (push) Has been cancelled
test / test64 (push) Has been cancelled
test / test32 (push) Has been cancelled
test / test_highlevel (push) Has been cancelled

needed by #2244
This commit is contained in:
Alessandro Ros
2023-08-25 18:11:02 +02:00
committed by GitHub
parent 23ddaac481
commit e0fb11040e
40 changed files with 390 additions and 318 deletions

View File

@@ -8,15 +8,16 @@ import (
"github.com/pion/rtp"
"github.com/bluenviron/mediamtx/internal/logger"
"github.com/bluenviron/mediamtx/internal/unit"
)
// Processor cleans and normalizes streams.
type Processor interface {
// cleans and normalizes a data unit.
Process(Unit, bool) error
Process(unit.Unit, bool) error
// wraps a RTP packet into a Unit.
UnitForRTPPacket(pkt *rtp.Packet, ntp time.Time) Unit
UnitForRTPPacket(pkt *rtp.Packet, ntp time.Time) unit.Unit
}
// New allocates a Processor.