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
|
|
@ -24,7 +24,11 @@ type SourceTester struct {
|
|||
}
|
||||
|
||||
// NewSourceTester allocates a SourceTester.
|
||||
func NewSourceTester(createFunc func(defs.StaticSourceParent) defs.StaticSource, conf *conf.Path) *SourceTester {
|
||||
func NewSourceTester(
|
||||
createFunc func(defs.StaticSourceParent) defs.StaticSource,
|
||||
resolvedSource string,
|
||||
conf *conf.Path,
|
||||
) *SourceTester {
|
||||
ctx, ctxCancel := context.WithCancel(context.Background())
|
||||
|
||||
t := &SourceTester{
|
||||
|
|
@ -38,8 +42,9 @@ func NewSourceTester(createFunc func(defs.StaticSourceParent) defs.StaticSource,
|
|||
|
||||
go func() {
|
||||
s.Run(defs.StaticSourceRunParams{ //nolint:errcheck
|
||||
Context: ctx,
|
||||
Conf: conf,
|
||||
Context: ctx,
|
||||
ResolvedSource: resolvedSource,
|
||||
Conf: conf,
|
||||
})
|
||||
close(t.done)
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue