update examples

This commit is contained in:
aler9
2020-12-10 10:57:11 +01:00
parent 2e9f086984
commit c085fc0eb3
4 changed files with 8 additions and 8 deletions

View File

@@ -33,8 +33,8 @@ func main() {
defer conn.Close()
// read track frames
err = <-conn.ReadFrames(func(id int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf)
err = <-conn.ReadFrames(func(trackID int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", trackID, typ, buf)
})
panic(err)
}

View File

@@ -53,8 +53,8 @@ func main() {
}
// read track frames
err = <-conn.ReadFrames(func(id int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf)
err = <-conn.ReadFrames(func(trackID int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", trackID, typ, buf)
})
panic(err)
}

View File

@@ -25,8 +25,8 @@ func main() {
for {
// read track frames
done := conn.ReadFrames(func(id int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf)
done := conn.ReadFrames(func(trackID int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", trackID, typ, buf)
})
// wait

View File

@@ -21,8 +21,8 @@ func main() {
defer conn.Close()
// read track frames
err = <-conn.ReadFrames(func(id int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf)
err = <-conn.ReadFrames(func(trackID int, typ gortsplib.StreamType, buf []byte) {
fmt.Printf("frame from track %d, type %v: %v\n", trackID, typ, buf)
})
panic(err)
}