mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
rtsp: support encrypting UDP and UDP-multicast streams (#4690)
This commit is contained in:
parent
81af4075f0
commit
c475f84e5d
11 changed files with 131 additions and 90 deletions
|
|
@ -110,7 +110,14 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
|
|||
decodeErrors.Start()
|
||||
defer decodeErrors.Stop()
|
||||
|
||||
u, err := base.ParseURL(params.ResolvedSource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c := &gortsplib.Client{
|
||||
Scheme: u.Scheme,
|
||||
Host: u.Host,
|
||||
Transport: params.Conf.RTSPTransport.Transport,
|
||||
TLSConfig: tls.ConfigForFingerprint(params.Conf.SourceFingerprint),
|
||||
ReadTimeout: time.Duration(s.ReadTimeout),
|
||||
|
|
@ -134,12 +141,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
|
|||
},
|
||||
}
|
||||
|
||||
u, err := base.ParseURL(params.ResolvedSource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = c.Start(u.Scheme, u.Host)
|
||||
err = c.Start2()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue