mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-29 06:22:00 -08:00
parent
23ddaac481
commit
e0fb11040e
40 changed files with 390 additions and 318 deletions
|
|
@ -1,32 +0,0 @@
|
|||
package formatprocessor
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
// BaseUnit contains fields shared across all units.
|
||||
type BaseUnit struct {
|
||||
RTPPackets []*rtp.Packet
|
||||
NTP time.Time
|
||||
}
|
||||
|
||||
// GetRTPPackets implements Unit.
|
||||
func (u *BaseUnit) GetRTPPackets() []*rtp.Packet {
|
||||
return u.RTPPackets
|
||||
}
|
||||
|
||||
// GetNTP implements Unit.
|
||||
func (u *BaseUnit) GetNTP() time.Time {
|
||||
return u.NTP
|
||||
}
|
||||
|
||||
// Unit is the elementary data unit routed across the server.
|
||||
type Unit interface {
|
||||
// returns RTP packets contained into the unit.
|
||||
GetRTPPackets() []*rtp.Packet
|
||||
|
||||
// returns the NTP timestamp of the unit.
|
||||
GetNTP() time.Time
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue