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.
24 lines
384 B
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 |
|
}
|
|
|