1
0
Fork 0
forked from External/mediamtx

speed up hls remuxing by linking together pathManager and hlsServer

This commit is contained in:
aler9 2021-07-30 14:49:09 +02:00
parent 1146d5cf1b
commit 82e65230fd
9 changed files with 80 additions and 74 deletions

View file

@ -21,7 +21,7 @@ type rtmpServer struct {
runOnConnect string
runOnConnectRestart bool
stats *stats
pathMan *pathManager
pathManager *pathManager
parent rtmpServerParent
ctx context.Context
@ -44,7 +44,7 @@ func newRTMPServer(
runOnConnect string,
runOnConnectRestart bool,
stats *stats,
pathMan *pathManager,
pathManager *pathManager,
parent rtmpServerParent) (*rtmpServer, error) {
l, err := net.Listen("tcp", address)
if err != nil {
@ -61,7 +61,7 @@ func newRTMPServer(
runOnConnect: runOnConnect,
runOnConnectRestart: runOnConnectRestart,
stats: stats,
pathMan: pathMan,
pathManager: pathManager,
parent: parent,
ctx: ctx,
ctxCancel: ctxCancel,
@ -135,7 +135,7 @@ outer:
&s.wg,
s.stats,
nconn,
s.pathMan,
s.pathManager,
s)
s.conns[c] = struct{}{}