golanggohlsrtmpwebrtcmedia-serverobs-studiortcprtmp-proxyrtmp-serverrtprtsprtsp-proxyrtsp-relayrtsp-serversrtstreamingwebrtc-proxy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
471 B
29 lines
471 B
package unit |
|
|
|
import ( |
|
"time" |
|
|
|
"github.com/pion/rtp" |
|
) |
|
|
|
// Base contains fields shared across all units. |
|
type Base struct { |
|
RTPPackets []*rtp.Packet |
|
NTP time.Time |
|
PTS time.Duration |
|
} |
|
|
|
// GetRTPPackets implements Unit. |
|
func (u *Base) GetRTPPackets() []*rtp.Packet { |
|
return u.RTPPackets |
|
} |
|
|
|
// GetNTP implements Unit. |
|
func (u *Base) GetNTP() time.Time { |
|
return u.NTP |
|
} |
|
|
|
// GetPTS implements Unit. |
|
func (u *Base) GetPTS() time.Duration { |
|
return u.PTS |
|
}
|
|
|