rtsp: support encrypting UDP and UDP-multicast streams (#4690)

This commit is contained in:
Alessandro Ros 2025-07-05 13:46:59 +02:00 committed by GitHub
parent 81af4075f0
commit c475f84e5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 131 additions and 90 deletions

View file

@ -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
}