move units into dedicated package (#2245)

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
+3 -2
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.