mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 23:56:54 +08:00
21 lines
384 B
Go
21 lines
384 B
Go
package webrtc
|
|
|
|
import (
|
|
"github.com/pion/rtp"
|
|
)
|
|
|
|
// TrackWrapper provides ClockRate() and PTSEqualsDTS() to WebRTC tracks.
|
|
type TrackWrapper struct {
|
|
ClockRat int
|
|
}
|
|
|
|
// ClockRate returns the clock rate.
|
|
func (w TrackWrapper) ClockRate() int {
|
|
return w.ClockRat
|
|
}
|
|
|
|
// PTSEqualsDTS returns whether PTS equals DTS.
|
|
func (TrackWrapper) PTSEqualsDTS(*rtp.Packet) bool {
|
|
return true
|
|
}
|