mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
use hierarchical contexts
This commit is contained in:
parent
e558b245e7
commit
f086b624c1
12 changed files with 41 additions and 23 deletions
5
main.go
5
main.go
|
|
@ -198,6 +198,7 @@ func (p *program) createResources(initial bool) error {
|
|||
|
||||
if p.pathMan == nil {
|
||||
p.pathMan = pathman.New(
|
||||
p.ctx,
|
||||
p.conf.RTSPAddress,
|
||||
p.conf.ReadTimeout,
|
||||
p.conf.WriteTimeout,
|
||||
|
|
@ -215,6 +216,7 @@ func (p *program) createResources(initial bool) error {
|
|||
if p.serverRTSPPlain == nil {
|
||||
_, useUDP := p.conf.ProtocolsParsed[gortsplib.StreamProtocolUDP]
|
||||
p.serverRTSPPlain, err = rtspserver.New(
|
||||
p.ctx,
|
||||
p.conf.RTSPAddress,
|
||||
p.conf.ReadTimeout,
|
||||
p.conf.WriteTimeout,
|
||||
|
|
@ -244,6 +246,7 @@ func (p *program) createResources(initial bool) error {
|
|||
p.conf.EncryptionParsed == conf.EncryptionOptional) {
|
||||
if p.serverRTSPTLS == nil {
|
||||
p.serverRTSPTLS, err = rtspserver.New(
|
||||
p.ctx,
|
||||
p.conf.RTSPSAddress,
|
||||
p.conf.ReadTimeout,
|
||||
p.conf.WriteTimeout,
|
||||
|
|
@ -271,6 +274,7 @@ func (p *program) createResources(initial bool) error {
|
|||
if !p.conf.RTMPDisable {
|
||||
if p.serverRTMP == nil {
|
||||
p.serverRTMP, err = rtmpserver.New(
|
||||
p.ctx,
|
||||
p.conf.RTMPAddress,
|
||||
p.conf.ReadTimeout,
|
||||
p.conf.WriteTimeout,
|
||||
|
|
@ -290,6 +294,7 @@ func (p *program) createResources(initial bool) error {
|
|||
if !p.conf.HLSDisable {
|
||||
if p.serverHLS == nil {
|
||||
p.serverHLS, err = hlsserver.New(
|
||||
p.ctx,
|
||||
p.conf.HLSAddress,
|
||||
p.conf.HLSSegmentCount,
|
||||
p.conf.HLSSegmentDuration,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue