Documentation ¶
Overview ¶
Package formatprocessor contains code to cleanup and normalize streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor interface { // cleans and normalizes a data unit. Process(Unit, bool) error // wraps a RTP packet into a Unit. UnitForRTPPacket(pkt *rtp.Packet, ntp time.Time) Unit }
Processor cleans and normalizes streams.
type Unit ¶
type Unit interface { // returns RTP packets contained into the unit. GetRTPPackets() []*rtp.Packet // returns the NTP timestamp of the unit. GetNTP() time.Time }
Unit is the elementary data unit routed across the server.
type UnitAV1 ¶
UnitAV1 is an AV1 data unit.
func (*UnitAV1) GetRTPPackets ¶
GetRTPPackets implements Unit.
type UnitGeneric ¶
UnitGeneric is a generic data unit.
func (*UnitGeneric) GetRTPPackets ¶
func (d *UnitGeneric) GetRTPPackets() []*rtp.Packet
GetRTPPackets implements Unit.
type UnitH264 ¶
UnitH264 is a H264 data unit.
func (*UnitH264) GetRTPPackets ¶
GetRTPPackets implements Unit.
type UnitH265 ¶
UnitH265 is a H265 data unit.
func (*UnitH265) GetRTPPackets ¶
GetRTPPackets implements Unit.
type UnitMPEG2Audio ¶
type UnitMPEG2Audio struct { RTPPackets []*rtp.Packet NTP time.Time PTS time.Duration Frames [][]byte }
UnitMPEG2Audio is a MPEG-1/2 Audio data unit.
func (*UnitMPEG2Audio) GetRTPPackets ¶
func (d *UnitMPEG2Audio) GetRTPPackets() []*rtp.Packet
GetRTPPackets implements Unit.
type UnitMPEG4AudioGeneric ¶ added in v0.23.4
type UnitMPEG4AudioGeneric struct { RTPPackets []*rtp.Packet NTP time.Time PTS time.Duration AUs [][]byte }
UnitMPEG4AudioGeneric is a MPEG-4 Audio data unit.
func (*UnitMPEG4AudioGeneric) GetNTP ¶ added in v0.23.4
func (d *UnitMPEG4AudioGeneric) GetNTP() time.Time
GetNTP implements Unit.
func (*UnitMPEG4AudioGeneric) GetRTPPackets ¶ added in v0.23.4
func (d *UnitMPEG4AudioGeneric) GetRTPPackets() []*rtp.Packet
GetRTPPackets implements Unit.
type UnitMPEG4AudioLATM ¶ added in v0.23.4
type UnitMPEG4AudioLATM struct { RTPPackets []*rtp.Packet NTP time.Time PTS time.Duration AU []byte }
UnitMPEG4AudioLATM is a MPEG-4 Audio data unit.
func (*UnitMPEG4AudioLATM) GetNTP ¶ added in v0.23.4
func (d *UnitMPEG4AudioLATM) GetNTP() time.Time
GetNTP implements Unit.
func (*UnitMPEG4AudioLATM) GetRTPPackets ¶ added in v0.23.4
func (d *UnitMPEG4AudioLATM) GetRTPPackets() []*rtp.Packet
GetRTPPackets implements Unit.
type UnitOpus ¶
UnitOpus is a Opus data unit.
func (*UnitOpus) GetRTPPackets ¶
GetRTPPackets implements Unit.
type UnitVP8 ¶
UnitVP8 is a VP8 data unit.
func (*UnitVP8) GetRTPPackets ¶
GetRTPPackets implements Unit.
type UnitVP9 ¶
UnitVP9 is a VP9 data unit.
func (*UnitVP9) GetRTPPackets ¶
GetRTPPackets implements Unit.