Browse Source

hls: move constants into right file

pull/591/head
aler9 4 years ago
parent
commit
06cffc44df
  1. 7
      internal/hls/muxer.go
  2. 7
      internal/hls/muxer_ts_generator.go

7
internal/hls/muxer.go

@ -7,13 +7,6 @@ import ( @@ -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

7
internal/hls/muxer_ts_generator.go

@ -11,6 +11,13 @@ import ( @@ -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

Loading…
Cancel
Save