client: simplify API, add StartReadingWait

This commit is contained in:
aler9
2021-11-12 15:48:50 +01:00
committed by Alessandro Ros
parent d04381d787
commit e13b4289ec
16 changed files with 82 additions and 199 deletions

View File

@@ -22,13 +22,5 @@ func main() {
}
// connect to the server and start reading all tracks
err := c.DialRead("rtsp://localhost:8554/mystream")
if err != nil {
panic(err)
}
defer c.Close()
// read packets
err = c.ReadFrames()
panic(err)
panic(c.StartReadingAndWait("rtsp://localhost:8554/mystream"))
}