mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 12:32:01 -08:00
temp
This commit is contained in:
parent
9735a8522e
commit
fd484c1901
1 changed files with 8 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package hls
|
||||
|
||||
import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/aler9/gortsplib"
|
||||
|
|
@ -30,6 +31,7 @@ type muxerTSGenerator struct {
|
|||
audioAUCount int
|
||||
startPCR time.Time
|
||||
startPTS time.Duration
|
||||
segmentCounter int
|
||||
}
|
||||
|
||||
func newMuxerTSGenerator(
|
||||
|
|
@ -89,6 +91,12 @@ func (m *muxerTSGenerator) writeH264(pts time.Duration, nalus [][]byte) error {
|
|||
m.currentSegment.endPTS = pts
|
||||
m.streamPlaylist.pushSegment(m.currentSegment)
|
||||
m.currentSegment = newMuxerTSSegment(m.videoTrack, m.writer)
|
||||
m.segmentCounter = 0
|
||||
} else {
|
||||
m.segmentCounter++
|
||||
if m.segmentCounter >= 500 {
|
||||
log.Println("SC", m.segmentCounter)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue