1
0
Fork 0
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:
Alessandro Ros 2024-06-18 22:10:26 +02:00 committed by GitHub
parent dfa2e81e61
commit 65d90f7cc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 118 additions and 106 deletions

View file

@ -18,11 +18,11 @@ func TestSource(t *testing.T) {
te := test.NewSourceTester(
func(p defs.StaticSourceParent) defs.StaticSource {
return &Source{
ResolvedSource: "udp://127.0.0.1:9001",
ReadTimeout: conf.StringDuration(10 * time.Second),
Parent: p,
ReadTimeout: conf.StringDuration(10 * time.Second),
Parent: p,
}
},
"udp://127.0.0.1:9001",
&conf.Path{},
)
defer te.Close()