rename ClientConn.OnFrame into ReadFrames

This commit is contained in:
aler9
2020-12-08 21:18:52 +01:00
parent c7f6d77392
commit 081e28ee38
7 changed files with 17 additions and 17 deletions

View File

@@ -21,11 +21,11 @@ func main() {
defer conn.Close()
// 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)
})
// catch any error
err = <-readerDone
err = <-done
panic(err)
}