mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 03:25:52 +08:00
client: add Start2; deprecate Start (#801)
This commit is contained in:
@@ -17,16 +17,19 @@ import (
|
||||
// 3. save the content of the format in a file in MPEG-TS format.
|
||||
|
||||
func main() {
|
||||
c := gortsplib.Client{}
|
||||
|
||||
// parse URL
|
||||
u, err := base.ParseURL("rtsp://myuser:mypass@localhost:8554/mystream")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
c := gortsplib.Client{
|
||||
Scheme: u.Scheme,
|
||||
Host: u.Host,
|
||||
}
|
||||
|
||||
// connect to the server
|
||||
err = c.Start(u.Scheme, u.Host)
|
||||
err = c.Start2()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user