type Processor interface {
// process a Unit. ProcessUnit(unit.Unit) error// process a RTP packet and convert it into a unit. ProcessRTPPacket(
pkt *rtp.Packet,
ntp time.Time,
pts time.Duration,
hasNonRTSPReaders bool,
) (Unit, error)
}
type Unit interface {
// returns RTP packets contained into the unit. GetRTPPackets() []*rtp.Packet// returns the NTP timestamp of the unit. GetNTP() time.Time// returns the PTS of the unit. GetPTS() time.Duration
}
Unit is the elementary data unit routed across the server.