mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
add client-read-h264 example
This commit is contained in:
@@ -9,8 +9,7 @@ import (
|
||||
|
||||
// This example shows how to
|
||||
// 1. set additional client options
|
||||
// 2. connect to a RTSP server
|
||||
// 3. read all tracks on a path
|
||||
// 2. connect to a RTSP server and read all tracks on a path
|
||||
|
||||
func main() {
|
||||
// ClientConf allows to set additional client options
|
||||
@@ -32,7 +31,7 @@ func main() {
|
||||
|
||||
// read track frames
|
||||
err = <-conn.ReadFrames(func(trackID int, typ gortsplib.StreamType, buf []byte) {
|
||||
fmt.Printf("frame from track %d, type %v: %v\n", trackID, typ, buf)
|
||||
fmt.Printf("frame from track %d, type %v, size %d\n", trackID, typ, len(buf))
|
||||
})
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user