mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-06 08:06:58 +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:
@@ -23,10 +23,9 @@ import (
|
||||
|
||||
// Source is a RTMP static source.
|
||||
type Source struct {
|
||||
ResolvedSource string
|
||||
ReadTimeout conf.StringDuration
|
||||
WriteTimeout conf.StringDuration
|
||||
Parent defs.StaticSourceParent
|
||||
ReadTimeout conf.StringDuration
|
||||
WriteTimeout conf.StringDuration
|
||||
Parent defs.StaticSourceParent
|
||||
}
|
||||
|
||||
// Log implements logger.Writer.
|
||||
@@ -38,7 +37,7 @@ func (s *Source) Log(level logger.Level, format string, args ...interface{}) {
|
||||
func (s *Source) Run(params defs.StaticSourceRunParams) error {
|
||||
s.Log(logger.Debug, "connecting")
|
||||
|
||||
u, err := url.Parse(s.ResolvedSource)
|
||||
u, err := url.Parse(params.ResolvedSource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user