mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-23 23:22:26 +00:00
rename "record" source value into "publisher"
This commit is contained in:
parent
0535ab8e9c
commit
fdd487f3c5
@ -126,11 +126,11 @@ func (pconf *PathConf) checkAndFillMissing(name string) error {
|
||||
}
|
||||
|
||||
if pconf.Source == "" {
|
||||
pconf.Source = "record"
|
||||
pconf.Source = "publisher"
|
||||
}
|
||||
|
||||
switch {
|
||||
case pconf.Source == "record":
|
||||
case pconf.Source == "publisher":
|
||||
|
||||
case strings.HasPrefix(pconf.Source, "rtsp://") ||
|
||||
strings.HasPrefix(pconf.Source, "rtsps://"):
|
||||
@ -207,8 +207,8 @@ func (pconf *PathConf) checkAndFillMissing(name string) error {
|
||||
}
|
||||
|
||||
if pconf.SourceOnDemand {
|
||||
if pconf.Source == "record" {
|
||||
return fmt.Errorf("'sourceOnDemand' is useless when source is 'record'")
|
||||
if pconf.Source == "publisher" {
|
||||
return fmt.Errorf("'sourceOnDemand' is useless when source is 'publisher'")
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,8 +239,8 @@ func (pconf *PathConf) checkAndFillMissing(name string) error {
|
||||
return fmt.Errorf("read username and password must be both filled")
|
||||
}
|
||||
if pconf.PublishUser != "" {
|
||||
if pconf.Source != "record" {
|
||||
return fmt.Errorf("'publishUser' is useless when source is not 'record'")
|
||||
if pconf.Source != "publisher" {
|
||||
return fmt.Errorf("'publishUser' is useless when source is not 'publisher'")
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(pconf.PublishUser, "sha256:") && !reUserPass.MatchString(pconf.PublishUser) {
|
||||
@ -248,8 +248,8 @@ func (pconf *PathConf) checkAndFillMissing(name string) error {
|
||||
}
|
||||
}
|
||||
if pconf.PublishPass != "" {
|
||||
if pconf.Source != "record" {
|
||||
return fmt.Errorf("'publishPass' is useless when source is not 'record', since the stream is not provided by a publisher, but by a fixed source")
|
||||
if pconf.Source != "publisher" {
|
||||
return fmt.Errorf("'publishPass' is useless when source is not 'publisher', since the stream is not provided by a publisher, but by a fixed source")
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(pconf.PublishPass, "sha256:") && !reUserPass.MatchString(pconf.PublishPass) {
|
||||
@ -265,8 +265,8 @@ func (pconf *PathConf) checkAndFillMissing(name string) error {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if pconf.Source != "record" {
|
||||
return nil, fmt.Errorf("'publishIPs' is useless when source is not 'record', since the stream is not provided by a publisher, but by a fixed source")
|
||||
if pconf.Source != "publisher" {
|
||||
return nil, fmt.Errorf("'publishIPs' is useless when source is not 'publisher', since the stream is not provided by a publisher, but by a fixed source")
|
||||
}
|
||||
|
||||
return parseIPCidrList(pconf.PublishIPs)
|
||||
@ -302,12 +302,12 @@ func (pconf *PathConf) checkAndFillMissing(name string) error {
|
||||
return fmt.Errorf("a path with a regular expression does not support option 'runOnInit'; use another path")
|
||||
}
|
||||
|
||||
if pconf.RunOnPublish != "" && pconf.Source != "record" {
|
||||
return fmt.Errorf("'runOnPublish' is useless when source is not 'record', since the stream is not provided by a publisher, but by a fixed source")
|
||||
if pconf.RunOnPublish != "" && pconf.Source != "publisher" {
|
||||
return fmt.Errorf("'runOnPublish' is useless when source is not 'publisher', since the stream is not provided by a publisher, but by a fixed source")
|
||||
}
|
||||
|
||||
if pconf.RunOnDemand != "" && pconf.Source != "record" {
|
||||
return fmt.Errorf("'runOnDemand' can be used only when source is 'record'")
|
||||
if pconf.RunOnDemand != "" && pconf.Source != "publisher" {
|
||||
return fmt.Errorf("'runOnDemand' can be used only when source is 'publisher'")
|
||||
}
|
||||
|
||||
if pconf.RunOnDemandStartTimeout == 0 {
|
||||
|
@ -125,12 +125,12 @@ hlsAllowOrigin: '*'
|
||||
paths:
|
||||
all:
|
||||
# source of the stream - this can be:
|
||||
# * record -> the stream is published by a RTSP or RTMP client
|
||||
# * publisher -> the stream is published by a RTSP or RTMP client
|
||||
# * rtsp://existing-url -> the stream is pulled from another RTSP server
|
||||
# * rtsps://existing-url -> the stream is pulled from another RTSP server, with RTSPS
|
||||
# * rtmp://existing-url -> the stream is pulled from a RTMP server
|
||||
# * redirect -> the stream is provided by another path or server
|
||||
source: record
|
||||
source: publisher
|
||||
|
||||
# if the source is an RTSP or RTSPS URL, this is the protocol that will be used to
|
||||
# pull the stream. available values are "automatic", "udp", "multicast", "tcp".
|
||||
@ -163,11 +163,11 @@ paths:
|
||||
# redirected to.
|
||||
sourceRedirect:
|
||||
|
||||
# if the source is "record" and a client is publishing, do not allow another
|
||||
# if the source is "publisher" and a client is publishing, do not allow another
|
||||
# client to disconnect the former and publish in its place.
|
||||
disablePublisherOverride: no
|
||||
|
||||
# if the source is "record" and no one is publishing, redirect readers to this
|
||||
# if the source is "publisher" and no one is publishing, redirect readers to this
|
||||
# path. It can be can be a relative path (i.e. /otherstream) or an absolute RTSP URL.
|
||||
fallback:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user