From 06cffc44dfbc3bd7f621cc6d78435d3476fe3c26 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Thu, 23 Sep 2021 11:14:57 +0200 Subject: [PATCH] hls: move constants into right file --- internal/hls/muxer.go | 7 ------- internal/hls/muxer_ts_generator.go | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/hls/muxer.go b/internal/hls/muxer.go index 9455afe0..5ae7eb8b 100644 --- a/internal/hls/muxer.go +++ b/internal/hls/muxer.go @@ -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 diff --git a/internal/hls/muxer_ts_generator.go b/internal/hls/muxer_ts_generator.go index 7c0f7f72..61268f5a 100644 --- a/internal/hls/muxer_ts_generator.go +++ b/internal/hls/muxer_ts_generator.go @@ -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