client: add Start2; deprecate Start (#801)

This commit is contained in:
Alessandro Ros
2025-07-05 13:02:45 +02:00
committed by GitHub
parent 616fa7ea89
commit 9c1011567a
32 changed files with 278 additions and 144 deletions

View File

@@ -48,18 +48,20 @@ func (c *client) run() {
}
func (c *client) read() error {
rc := gortsplib.Client{
RequestBackChannels: true,
}
// parse URL
u, err := base.ParseURL(existingStream)
if err != nil {
return err
}
rc := gortsplib.Client{
Scheme: u.Scheme,
Host: u.Host,
RequestBackChannels: true,
}
// connect to the server
err = rc.Start(u.Scheme, u.Host)
err = rc.Start2()
if err != nil {
return err
}