rename runOnReady into runOnAvailable, runOnNotReady into runOnUnavailable (#5957)
This commit is contained in:
@@ -1124,6 +1124,10 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: uint64
|
||||||
|
runOnAvailable:
|
||||||
|
type: string
|
||||||
|
runOnAvailableRestart:
|
||||||
|
type: boolean
|
||||||
runOnDemand:
|
runOnDemand:
|
||||||
type: string
|
type: string
|
||||||
runOnDemandCloseAfter:
|
runOnDemandCloseAfter:
|
||||||
@@ -1139,6 +1143,8 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
runOnNotReady:
|
runOnNotReady:
|
||||||
type: string
|
type: string
|
||||||
|
nullable: true
|
||||||
|
deprecated: true
|
||||||
runOnOffline:
|
runOnOffline:
|
||||||
type: string
|
type: string
|
||||||
runOnOnline:
|
runOnOnline:
|
||||||
@@ -1151,14 +1157,20 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
runOnReady:
|
runOnReady:
|
||||||
type: string
|
type: string
|
||||||
|
nullable: true
|
||||||
|
deprecated: true
|
||||||
runOnReadyRestart:
|
runOnReadyRestart:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
nullable: true
|
||||||
|
deprecated: true
|
||||||
runOnRecordSegmentComplete:
|
runOnRecordSegmentComplete:
|
||||||
type: string
|
type: string
|
||||||
runOnRecordSegmentCreate:
|
runOnRecordSegmentCreate:
|
||||||
type: string
|
type: string
|
||||||
runOnUnDemand:
|
runOnUnDemand:
|
||||||
type: string
|
type: string
|
||||||
|
runOnUnavailable:
|
||||||
|
type: string
|
||||||
runOnUnread:
|
runOnUnread:
|
||||||
type: string
|
type: string
|
||||||
source:
|
source:
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ To change the format, codec or compression of a stream, use _FFmpeg_ or _GStream
|
|||||||
paths:
|
paths:
|
||||||
compressed:
|
compressed:
|
||||||
original:
|
original:
|
||||||
runOnReady: >
|
runOnAvailable: >
|
||||||
ffmpeg -i rtsp://localhost:$RTSP_PORT/$MTX_PATH
|
ffmpeg -i rtsp://localhost:$RTSP_PORT/$MTX_PATH
|
||||||
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -b:v 600k
|
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -b:v 600k
|
||||||
-max_muxing_queue_size 1024 -f rtsp rtsp://localhost:$RTSP_PORT/compressed
|
-max_muxing_queue_size 1024 -f rtsp rtsp://localhost:$RTSP_PORT/compressed
|
||||||
runOnReadyRestart: yes
|
runOnAvailableRestart: yes
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# Forward
|
# Forward
|
||||||
|
|
||||||
To forward incoming streams to another server, use _FFmpeg_ inside the `runOnReady` parameter:
|
To forward incoming streams to another server, use _FFmpeg_ inside the `runOnAvailable` parameter:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
pathDefaults:
|
pathDefaults:
|
||||||
runOnReady: >
|
runOnAvailable: >
|
||||||
ffmpeg -i rtsp://localhost:$RTSP_PORT/$MTX_PATH
|
ffmpeg -i rtsp://localhost:$RTSP_PORT/$MTX_PATH
|
||||||
-c copy
|
-c copy
|
||||||
-f rtsp rtsp://other-server:8554/another-path
|
-f rtsp rtsp://other-server:8554/another-path
|
||||||
runOnReadyRestart: yes
|
runOnAvailableRestart: yes
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Extract snapshots
|
# Extract snapshots
|
||||||
|
|
||||||
You can periodically extract snapshots from available streams by using FFmpeg inside the `runOnReady` hook:
|
You can periodically extract snapshots from available streams by using FFmpeg inside the `runOnAvailable` hook:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
pathDefaults:
|
pathDefaults:
|
||||||
runOnReady: |
|
runOnAvailable: |
|
||||||
bash -c "
|
bash -c "
|
||||||
while true; do
|
while true; do
|
||||||
mkdir -p $(dirname snapshots/$MTX_PATH)
|
mkdir -p $(dirname snapshots/$MTX_PATH)
|
||||||
|
|||||||
@@ -80,14 +80,14 @@ pathDefaults:
|
|||||||
runOnUnDemand:
|
runOnUnDemand:
|
||||||
```
|
```
|
||||||
|
|
||||||
## runOnReady
|
## runOnAvailable
|
||||||
|
|
||||||
`runOnReady` allows to run a command when a stream is available to be read:
|
`runOnAvailable` allows to run a command when a stream is available to be read:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
pathDefaults:
|
pathDefaults:
|
||||||
# Command to run when the stream is available to be read.
|
# Command to run when the stream is available to be read.
|
||||||
# This is terminated with SIGINT when the stream is not ready anymore.
|
# This is terminated with SIGINT when the stream is not available anymore.
|
||||||
# The following environment variables are available:
|
# The following environment variables are available:
|
||||||
# * MTX_PATH: path name
|
# * MTX_PATH: path name
|
||||||
# * MTX_QUERY: query parameters (passed by publisher) (url-encoded)
|
# * MTX_QUERY: query parameters (passed by publisher) (url-encoded)
|
||||||
@@ -96,20 +96,20 @@ pathDefaults:
|
|||||||
# * RTSP_PORT: RTSP server port
|
# * RTSP_PORT: RTSP server port
|
||||||
# * G1, G2, ...: regular expression groups, if path name is
|
# * G1, G2, ...: regular expression groups, if path name is
|
||||||
# a regular expression.
|
# a regular expression.
|
||||||
runOnReady: curl http://my-custom-server/webhook?path=$MTX_PATH&source_type=$MTX_SOURCE_TYPE&source_id=$MTX_SOURCE_ID
|
runOnAvailable: curl http://my-custom-server/webhook?path=$MTX_PATH&source_type=$MTX_SOURCE_TYPE&source_id=$MTX_SOURCE_ID
|
||||||
# Restart the command if it exits.
|
# Restart the command if it exits.
|
||||||
runOnReadyRestart: no
|
runOnAvailableRestart: no
|
||||||
```
|
```
|
||||||
|
|
||||||
## runOnNotReady
|
## runOnUnavailable
|
||||||
|
|
||||||
`runOnNotReady` allows to run a command when a stream is not available anymore:
|
`runOnUnavailable` allows to run a command when a stream is not available anymore:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
pathDefaults:
|
pathDefaults:
|
||||||
# Command to run when the stream is not available anymore.
|
# Command to run when the stream is not available anymore.
|
||||||
# Environment variables are the same as runOnReady.
|
# Environment variables are the same as runOnAvailable.
|
||||||
runOnNotReady: curl http://my-custom-server/webhook?path=$MTX_PATH&source_type=$MTX_SOURCE_TYPE&source_id=$MTX_SOURCE_ID
|
runOnUnavailable: curl http://my-custom-server/webhook?path=$MTX_PATH&source_type=$MTX_SOURCE_TYPE&source_id=$MTX_SOURCE_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
## runOnOnline
|
## runOnOnline
|
||||||
|
|||||||
@@ -853,6 +853,25 @@ func TestConfErrors(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDeprecatedAvailabilityHooks(t *testing.T) {
|
||||||
|
tmpf := createTempFile(t, []byte("paths:\n"+
|
||||||
|
" mypath:\n"+
|
||||||
|
" runOnReady: command1\n"+
|
||||||
|
" runOnReadyRestart: yes\n"+
|
||||||
|
" runOnNotReady: command2\n"))
|
||||||
|
|
||||||
|
conf, _, err := Load(tmpf, nil, nil)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
pa := conf.Paths["mypath"]
|
||||||
|
require.Equal(t, "command1", pa.RunOnAvailable)
|
||||||
|
require.Equal(t, true, pa.RunOnAvailableRestart)
|
||||||
|
require.Equal(t, "command2", pa.RunOnUnavailable)
|
||||||
|
require.Equal(t, "command1", *pa.RunOnReady)
|
||||||
|
require.Equal(t, true, *pa.RunOnReadyRestart)
|
||||||
|
require.Equal(t, "command2", *pa.RunOnNotReady)
|
||||||
|
}
|
||||||
|
|
||||||
func TestAlwaysAvailableFileErrorMagicBytes(t *testing.T) {
|
func TestAlwaysAvailableFileErrorMagicBytes(t *testing.T) {
|
||||||
tmpf := createTempFile(t, []byte("ABCDEFGHI"))
|
tmpf := createTempFile(t, []byte("ABCDEFGHI"))
|
||||||
|
|
||||||
|
|||||||
+21
-3
@@ -341,9 +341,12 @@ type Path struct {
|
|||||||
RunOnDemandStartTimeout Duration `json:"runOnDemandStartTimeout"`
|
RunOnDemandStartTimeout Duration `json:"runOnDemandStartTimeout"`
|
||||||
RunOnDemandCloseAfter Duration `json:"runOnDemandCloseAfter"`
|
RunOnDemandCloseAfter Duration `json:"runOnDemandCloseAfter"`
|
||||||
RunOnUnDemand string `json:"runOnUnDemand"`
|
RunOnUnDemand string `json:"runOnUnDemand"`
|
||||||
RunOnReady string `json:"runOnReady"`
|
RunOnAvailable string `json:"runOnAvailable"`
|
||||||
RunOnReadyRestart bool `json:"runOnReadyRestart"`
|
RunOnAvailableRestart bool `json:"runOnAvailableRestart"`
|
||||||
RunOnNotReady string `json:"runOnNotReady"`
|
RunOnUnavailable string `json:"runOnUnavailable"`
|
||||||
|
RunOnReady *string `json:"runOnReady,omitempty" deprecated:"true"`
|
||||||
|
RunOnReadyRestart *bool `json:"runOnReadyRestart,omitempty" deprecated:"true"`
|
||||||
|
RunOnNotReady *string `json:"runOnNotReady,omitempty" deprecated:"true"`
|
||||||
RunOnOnline string `json:"runOnOnline"`
|
RunOnOnline string `json:"runOnOnline"`
|
||||||
RunOnOnlineRestart bool `json:"runOnOnlineRestart"`
|
RunOnOnlineRestart bool `json:"runOnOnlineRestart"`
|
||||||
RunOnOffline string `json:"runOnOffline"`
|
RunOnOffline string `json:"runOnOffline"`
|
||||||
@@ -930,6 +933,21 @@ func (pconf *Path) validate(
|
|||||||
" does not support option 'runOnInit'; use another path")
|
" does not support option 'runOnInit'; use another path")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pconf.RunOnReady != nil {
|
||||||
|
l.Log(logger.Warn, "parameter 'runOnReady' is deprecated and has been replaced with 'runOnAvailable'")
|
||||||
|
pconf.RunOnAvailable = *pconf.RunOnReady
|
||||||
|
}
|
||||||
|
|
||||||
|
if pconf.RunOnReadyRestart != nil {
|
||||||
|
l.Log(logger.Warn, "parameter 'runOnReadyRestart' is deprecated and has been replaced with 'runOnAvailableRestart'")
|
||||||
|
pconf.RunOnAvailableRestart = *pconf.RunOnReadyRestart
|
||||||
|
}
|
||||||
|
|
||||||
|
if pconf.RunOnNotReady != nil {
|
||||||
|
l.Log(logger.Warn, "parameter 'runOnNotReady' is deprecated and has been replaced with 'runOnUnavailable'")
|
||||||
|
pconf.RunOnUnavailable = *pconf.RunOnNotReady
|
||||||
|
}
|
||||||
|
|
||||||
if (pconf.RunOnDemand != "" || pconf.RunOnUnDemand != "") && pconf.Source != "publisher" {
|
if (pconf.RunOnDemand != "" || pconf.RunOnUnDemand != "") && pconf.Source != "publisher" {
|
||||||
return fmt.Errorf("'runOnDemand' and 'runOnUnDemand' can be used only when source is 'publisher'")
|
return fmt.Errorf("'runOnDemand' and 'runOnUnDemand' can be used only when source is 'publisher'")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ type path struct {
|
|||||||
availableTime time.Time
|
availableTime time.Time
|
||||||
onlineTime time.Time
|
onlineTime time.Time
|
||||||
onUnDemandHook func(string)
|
onUnDemandHook func(string)
|
||||||
onNotReadyHook func()
|
onUnavailableHook func()
|
||||||
onOfflineHook func()
|
onOfflineHook func()
|
||||||
readers map[defs.Reader]struct{}
|
readers map[defs.Reader]struct{}
|
||||||
describeRequestsOnHold []defs.PathDescribeReq
|
describeRequestsOnHold []defs.PathDescribeReq
|
||||||
@@ -881,7 +881,7 @@ func (pa *path) setAvailable(
|
|||||||
sourceDesc = source.APISourceDescribe()
|
sourceDesc = source.APISourceDescribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
pa.onNotReadyHook = hooks.OnReady(hooks.OnReadyParams{
|
pa.onUnavailableHook = hooks.OnAvailable(hooks.OnAvailableParams{
|
||||||
Logger: pa,
|
Logger: pa,
|
||||||
ExternalCmdPool: pa.externalCmdPool,
|
ExternalCmdPool: pa.externalCmdPool,
|
||||||
Conf: pa.conf,
|
Conf: pa.conf,
|
||||||
@@ -928,7 +928,7 @@ func (pa *path) setNotAvailable() {
|
|||||||
r.Close()
|
r.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
pa.onNotReadyHook()
|
pa.onUnavailableHook()
|
||||||
|
|
||||||
if pa.recorder != nil {
|
if pa.recorder != nil {
|
||||||
pa.recorder.Close()
|
pa.recorder.Close()
|
||||||
|
|||||||
+10
-10
@@ -267,9 +267,9 @@ func TestPathRunOnConnect(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPathRunOnReady(t *testing.T) {
|
func TestPathRunOnAvailable(t *testing.T) {
|
||||||
onReady := filepath.Join(t.TempDir(), "on_ready")
|
onAvailable := filepath.Join(t.TempDir(), "on_available")
|
||||||
onNotReady := filepath.Join(t.TempDir(), "on_unready")
|
onUnavailable := filepath.Join(t.TempDir(), "on_unavailable")
|
||||||
|
|
||||||
func() {
|
func() {
|
||||||
p, ok := newInstance(t, fmt.Sprintf("rtmp: no\n"+
|
p, ok := newInstance(t, fmt.Sprintf("rtmp: no\n"+
|
||||||
@@ -277,9 +277,9 @@ func TestPathRunOnReady(t *testing.T) {
|
|||||||
"webrtc: no\n"+
|
"webrtc: no\n"+
|
||||||
"paths:\n"+
|
"paths:\n"+
|
||||||
" ~te(st):\n"+
|
" ~te(st):\n"+
|
||||||
" runOnReady: sh -c 'echo \"$MTX_PATH $MTX_QUERY $MTX_SOURCE_TYPE $MTX_SOURCE_ID $RTSP_PORT $G1\" > %s'\n"+
|
" runOnAvailable: sh -c 'echo \"$MTX_PATH $MTX_QUERY $MTX_SOURCE_TYPE $MTX_SOURCE_ID $RTSP_PORT $G1\" > %s'\n"+
|
||||||
" runOnNotReady: sh -c 'echo \"$MTX_PATH $MTX_QUERY $MTX_SOURCE_TYPE $MTX_SOURCE_ID $RTSP_PORT $G1\" > %s'\n",
|
" runOnUnavailable: sh -c 'echo \"$MTX_PATH $MTX_QUERY $MTX_SOURCE_TYPE $MTX_SOURCE_ID $RTSP_PORT $G1\" > %s'\n",
|
||||||
onReady, onNotReady))
|
onAvailable, onUnavailable))
|
||||||
require.Equal(t, true, ok)
|
require.Equal(t, true, ok)
|
||||||
defer p.Close()
|
defer p.Close()
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ func TestPathRunOnReady(t *testing.T) {
|
|||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
byts, err := os.ReadFile(onReady)
|
byts, err := os.ReadFile(onAvailable)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
fields := strings.Split(string(byts[:len(byts)-1]), " ")
|
fields := strings.Split(string(byts[:len(byts)-1]), " ")
|
||||||
require.Equal(t, "test", fields[0])
|
require.Equal(t, "test", fields[0])
|
||||||
@@ -304,7 +304,7 @@ func TestPathRunOnReady(t *testing.T) {
|
|||||||
require.Equal(t, "8554", fields[4])
|
require.Equal(t, "8554", fields[4])
|
||||||
require.Equal(t, "st", fields[5])
|
require.Equal(t, "st", fields[5])
|
||||||
|
|
||||||
byts, err = os.ReadFile(onNotReady)
|
byts, err = os.ReadFile(onUnavailable)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
fields = strings.Split(string(byts[:len(byts)-1]), " ")
|
fields = strings.Split(string(byts[:len(byts)-1]), " ")
|
||||||
require.Equal(t, "test", fields[0])
|
require.Equal(t, "test", fields[0])
|
||||||
@@ -315,7 +315,7 @@ func TestPathRunOnReady(t *testing.T) {
|
|||||||
require.Equal(t, "st", fields[5])
|
require.Equal(t, "st", fields[5])
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPathRunOnReadyQueryInjection(t *testing.T) {
|
func TestPathRunOnAvailableQueryInjection(t *testing.T) {
|
||||||
sentinel := filepath.Join(t.TempDir(), "mediamtx_test_query_injection_sentinel")
|
sentinel := filepath.Join(t.TempDir(), "mediamtx_test_query_injection_sentinel")
|
||||||
|
|
||||||
for _, ca := range []struct {
|
for _, ca := range []struct {
|
||||||
@@ -346,7 +346,7 @@ func TestPathRunOnReadyQueryInjection(t *testing.T) {
|
|||||||
} {
|
} {
|
||||||
t.Run(ca.name, func(t *testing.T) {
|
t.Run(ca.name, func(t *testing.T) {
|
||||||
p, ok := newInstance(t, fmt.Sprintf(
|
p, ok := newInstance(t, fmt.Sprintf(
|
||||||
"rtmp: no\nhls: no\nwebrtc: no\npaths:\n test:\n runOnReady: %s\n",
|
"rtmp: no\nhls: no\nwebrtc: no\npaths:\n test:\n runOnAvailable: %s\n",
|
||||||
ca.cmdstr))
|
ca.cmdstr))
|
||||||
require.Equal(t, true, ok)
|
require.Equal(t, true, ok)
|
||||||
defer p.Close()
|
defer p.Close()
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/bluenviron/mediamtx/internal/logger"
|
"github.com/bluenviron/mediamtx/internal/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OnReadyParams are the parameters of OnReady.
|
// OnAvailableParams are the parameters of OnAvailable.
|
||||||
type OnReadyParams struct {
|
type OnAvailableParams struct {
|
||||||
Logger logger.Writer
|
Logger logger.Writer
|
||||||
ExternalCmdPool *externalcmd.Pool
|
ExternalCmdPool *externalcmd.Pool
|
||||||
Conf *conf.Path
|
Conf *conf.Path
|
||||||
@@ -19,12 +19,12 @@ type OnReadyParams struct {
|
|||||||
Query string
|
Query string
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnReady is the OnReady hook.
|
// OnAvailable is the OnAvailable hook.
|
||||||
func OnReady(params OnReadyParams) func() {
|
func OnAvailable(params OnAvailableParams) func() {
|
||||||
var env externalcmd.Environment
|
var env externalcmd.Environment
|
||||||
var onReadyCmd *externalcmd.Cmd
|
var onAvailableCmd *externalcmd.Cmd
|
||||||
|
|
||||||
if params.Conf.RunOnReady != "" || params.Conf.RunOnNotReady != "" {
|
if params.Conf.RunOnAvailable != "" || params.Conf.RunOnUnavailable != "" {
|
||||||
env = params.ExternalCmdEnv
|
env = params.ExternalCmdEnv
|
||||||
env["MTX_QUERY"] = url.QueryEscape(params.Query)
|
env["MTX_QUERY"] = url.QueryEscape(params.Query)
|
||||||
if params.Desc != nil {
|
if params.Desc != nil {
|
||||||
@@ -33,31 +33,31 @@ func OnReady(params OnReadyParams) func() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if params.Conf.RunOnReady != "" {
|
if params.Conf.RunOnAvailable != "" {
|
||||||
params.Logger.Log(logger.Info, "runOnReady command started")
|
params.Logger.Log(logger.Info, "runOnAvailable command started")
|
||||||
onReadyCmd = &externalcmd.Cmd{
|
onAvailableCmd = &externalcmd.Cmd{
|
||||||
Pool: params.ExternalCmdPool,
|
Pool: params.ExternalCmdPool,
|
||||||
Cmdstr: params.Conf.RunOnReady,
|
Cmdstr: params.Conf.RunOnAvailable,
|
||||||
Restart: params.Conf.RunOnReadyRestart,
|
Restart: params.Conf.RunOnAvailableRestart,
|
||||||
Env: env,
|
Env: env,
|
||||||
OnExit: func(err error) {
|
OnExit: func(err error) {
|
||||||
params.Logger.Log(logger.Info, "runOnReady command exited: %v", err)
|
params.Logger.Log(logger.Info, "runOnAvailable command exited: %v", err)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
onReadyCmd.Start()
|
onAvailableCmd.Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
return func() {
|
return func() {
|
||||||
if onReadyCmd != nil {
|
if onAvailableCmd != nil {
|
||||||
onReadyCmd.Close()
|
onAvailableCmd.Close()
|
||||||
params.Logger.Log(logger.Info, "runOnReady command stopped")
|
params.Logger.Log(logger.Info, "runOnAvailable command stopped")
|
||||||
}
|
}
|
||||||
|
|
||||||
if params.Conf.RunOnNotReady != "" {
|
if params.Conf.RunOnUnavailable != "" {
|
||||||
params.Logger.Log(logger.Info, "runOnNotReady command launched")
|
params.Logger.Log(logger.Info, "runOnUnavailable command launched")
|
||||||
cmd := &externalcmd.Cmd{
|
cmd := &externalcmd.Cmd{
|
||||||
Pool: params.ExternalCmdPool,
|
Pool: params.ExternalCmdPool,
|
||||||
Cmdstr: params.Conf.RunOnNotReady,
|
Cmdstr: params.Conf.RunOnUnavailable,
|
||||||
Restart: false,
|
Restart: false,
|
||||||
Env: env,
|
Env: env,
|
||||||
}
|
}
|
||||||
+5
-5
@@ -759,7 +759,7 @@ pathDefaults:
|
|||||||
runOnUnDemand:
|
runOnUnDemand:
|
||||||
|
|
||||||
# Command to run when the stream is available to be read.
|
# Command to run when the stream is available to be read.
|
||||||
# This is terminated with SIGINT when the stream is not ready anymore.
|
# This is terminated with SIGINT when the stream is not available anymore.
|
||||||
# The following environment variables are available:
|
# The following environment variables are available:
|
||||||
# * MTX_PATH: path name
|
# * MTX_PATH: path name
|
||||||
# * MTX_QUERY: query parameters (passed by publisher) (url-encoded)
|
# * MTX_QUERY: query parameters (passed by publisher) (url-encoded)
|
||||||
@@ -768,12 +768,12 @@ pathDefaults:
|
|||||||
# * RTSP_PORT: RTSP server port
|
# * RTSP_PORT: RTSP server port
|
||||||
# * G1, G2, ...: regular expression groups, if path name is
|
# * G1, G2, ...: regular expression groups, if path name is
|
||||||
# a regular expression.
|
# a regular expression.
|
||||||
runOnReady:
|
runOnAvailable:
|
||||||
# Restart the command if it exits.
|
# Restart the command if it exits.
|
||||||
runOnReadyRestart: false
|
runOnAvailableRestart: false
|
||||||
# Command to run when the stream is not available anymore.
|
# Command to run when the stream is not available anymore.
|
||||||
# Environment variables are the same as runOnReady.
|
# Environment variables are the same as runOnAvailable.
|
||||||
runOnNotReady:
|
runOnUnavailable:
|
||||||
|
|
||||||
# Command to run when the stream is online, which means
|
# Command to run when the stream is online, which means
|
||||||
# that the stream is available and provided by a online source (not an offline segment).
|
# that the stream is available and provided by a online source (not an offline segment).
|
||||||
|
|||||||
Reference in New Issue
Block a user