forked from External/mediamtx
allow using MTX_QUERY inside source (#3486)
this allows to pass query parameters to sources, for instance: source: rtsp://my_host/my_path?$MTX_QUERY sourceOnDemand: true
This commit is contained in:
parent
dfa2e81e61
commit
65d90f7cc6
18 changed files with 118 additions and 106 deletions
|
|
@ -64,24 +64,24 @@ func TestSource(t *testing.T) {
|
|||
te = test.NewSourceTester(
|
||||
func(p defs.StaticSourceParent) defs.StaticSource {
|
||||
return &Source{
|
||||
ResolvedSource: "rtmp://localhost/teststream",
|
||||
ReadTimeout: conf.StringDuration(10 * time.Second),
|
||||
WriteTimeout: conf.StringDuration(10 * time.Second),
|
||||
Parent: p,
|
||||
ReadTimeout: conf.StringDuration(10 * time.Second),
|
||||
WriteTimeout: conf.StringDuration(10 * time.Second),
|
||||
Parent: p,
|
||||
}
|
||||
},
|
||||
"rtmp://localhost/teststream",
|
||||
&conf.Path{},
|
||||
)
|
||||
} else {
|
||||
te = test.NewSourceTester(
|
||||
func(p defs.StaticSourceParent) defs.StaticSource {
|
||||
return &Source{
|
||||
ResolvedSource: "rtmps://localhost/teststream",
|
||||
ReadTimeout: conf.StringDuration(10 * time.Second),
|
||||
WriteTimeout: conf.StringDuration(10 * time.Second),
|
||||
Parent: p,
|
||||
ReadTimeout: conf.StringDuration(10 * time.Second),
|
||||
WriteTimeout: conf.StringDuration(10 * time.Second),
|
||||
Parent: p,
|
||||
}
|
||||
},
|
||||
"rtmps://localhost/teststream",
|
||||
&conf.Path{
|
||||
SourceFingerprint: "33949E05FFFB5FF3E8AA16F8213A6251B4D9363804BA53233C4DA9A46D6F2739",
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue