mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
rename ClientConn.OnFrame into ReadFrames
This commit is contained in:
@@ -25,7 +25,7 @@ func main() {
|
||||
|
||||
for {
|
||||
// read track frames
|
||||
readerDone := conn.OnFrame(func(id int, typ gortsplib.StreamType, buf []byte) {
|
||||
done := conn.ReadFrames(func(id int, typ gortsplib.StreamType, buf []byte) {
|
||||
fmt.Printf("frame from track %d, type %v: %v\n", id, typ, buf)
|
||||
})
|
||||
|
||||
@@ -39,7 +39,7 @@ func main() {
|
||||
}
|
||||
|
||||
// join reader
|
||||
<-readerDone
|
||||
<-done
|
||||
|
||||
// wait
|
||||
time.Sleep(5 * time.Second)
|
||||
|
Reference in New Issue
Block a user