forked from External/mediamtx
speed up hls remuxing by linking together pathManager and hlsServer
This commit is contained in:
parent
1146d5cf1b
commit
82e65230fd
9 changed files with 80 additions and 74 deletions
|
|
@ -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{}{}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue