From c085fc0eb3137affc20032093eb5a1e39b0cfaaf Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Thu, 10 Dec 2020 10:57:11 +0100 Subject: [PATCH] update examples --- examples/client-read-options.go | 4 ++-- examples/client-read-partial.go | 4 ++-- examples/client-read-pause.go | 4 ++-- examples/client-read.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/client-read-options.go b/examples/client-read-options.go index 516b536f..db7ae97a 100644 --- a/examples/client-read-options.go +++ b/examples/client-read-options.go @@ -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) } diff --git a/examples/client-read-partial.go b/examples/client-read-partial.go index 9a065f2f..612a5db7 100644 --- a/examples/client-read-partial.go +++ b/examples/client-read-partial.go @@ -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) } diff --git a/examples/client-read-pause.go b/examples/client-read-pause.go index 025827aa..448ecd06 100644 --- a/examples/client-read-pause.go +++ b/examples/client-read-pause.go @@ -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 diff --git a/examples/client-read.go b/examples/client-read.go index 39d537a6..4132fb25 100644 --- a/examples/client-read.go +++ b/examples/client-read.go @@ -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) }