mirror of
				https://github.com/aler9/gortsplib
				synced 2025-10-31 18:42:40 +08:00 
			
		
		
		
	client: add Start2; deprecate Start (#801)
This commit is contained in:
		| @@ -17,16 +17,19 @@ import ( | ||||
| // 3. decode the G711 stream into audio samples. | ||||
|  | ||||
| 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
	 Alessandro Ros
					Alessandro Ros