mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
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
|
|
@ -20,9 +20,8 @@ import (
|
|||
|
||||
// Source is a HLS static source.
|
||||
type Source struct {
|
||||
ResolvedSource string
|
||||
ReadTimeout conf.StringDuration
|
||||
Parent defs.StaticSourceParent
|
||||
ReadTimeout conf.StringDuration
|
||||
Parent defs.StaticSourceParent
|
||||
}
|
||||
|
||||
// Log implements logger.Writer.
|
||||
|
|
@ -49,7 +48,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
|
|||
|
||||
var c *gohlslib.Client
|
||||
c = &gohlslib.Client{
|
||||
URI: s.ResolvedSource,
|
||||
URI: params.ResolvedSource,
|
||||
HTTPClient: &http.Client{
|
||||
Timeout: time.Duration(s.ReadTimeout),
|
||||
Transport: tr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue