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
|
|
@ -62,7 +62,6 @@ func createRangeHeader(cnf *conf.Path) (*headers.Range, error) {
|
|||
|
||||
// Source is a RTSP static source.
|
||||
type Source struct {
|
||||
ResolvedSource string
|
||||
ReadTimeout conf.StringDuration
|
||||
WriteTimeout conf.StringDuration
|
||||
WriteQueueSize int
|
||||
|
|
@ -104,7 +103,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
|
|||
},
|
||||
}
|
||||
|
||||
u, err := base.ParseURL(s.ResolvedSource)
|
||||
u, err := base.ParseURL(params.ResolvedSource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue