Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
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.
 
 
 
 
 
 

24 lines
384 B

package fmp4
import (
"time"
)
const (
videoTimescale = 90000
)
// VideoSample is a video sample.
type VideoSample struct {
NALUs [][]byte
PTS time.Duration
DTS time.Duration
AVCC []byte
IDRPresent bool
Next *VideoSample
}
// Duration returns the sample duration.
func (s VideoSample) Duration() time.Duration {
return s.Next.DTS - s.DTS
}