hls: move constants into right file

This commit is contained in:
aler9 2021-09-23 11:14:57 +02:00
parent e2f33a7495
commit 06cffc44df
2 changed files with 7 additions and 7 deletions

View file

@ -7,13 +7,6 @@ import (
"github.com/aler9/gortsplib"
)
const (
// an offset between PCR and PTS/DTS is needed to avoid PCR > PTS
pcrOffset = 500 * time.Millisecond
segmentMinAUCount = 100
)
// Muxer is a HLS muxer.
type Muxer struct {
primaryPlaylist *muxerPrimaryPlaylist

View file

@ -11,6 +11,13 @@ import (
"github.com/aler9/rtsp-simple-server/internal/h264"
)
const (
// an offset between PCR and PTS/DTS is needed to avoid PCR > PTS
pcrOffset = 500 * time.Millisecond
segmentMinAUCount = 100
)
type muxerTSGenerator struct {
hlsSegmentCount int
hlsSegmentDuration time.Duration