mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
client: add Start2; deprecate Start (#801)
This commit is contained in:
@@ -13,14 +13,17 @@ import (
|
||||
// 2. get and print informations about medias published on a path.
|
||||
|
||||
func main() {
|
||||
c := gortsplib.Client{}
|
||||
|
||||
u, err := base.ParseURL("rtsp://myuser:mypass@localhost:8554/mypath")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = c.Start(u.Scheme, u.Host)
|
||||
c := gortsplib.Client{
|
||||
Scheme: u.Scheme,
|
||||
Host: u.Host,
|
||||
}
|
||||
|
||||
err = c.Start2()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user