mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 06:46:42 +08:00
update examples
This commit is contained in:
@@ -22,12 +22,12 @@ func main() {
|
||||
defer conn.Close()
|
||||
|
||||
for {
|
||||
// read RTP packets
|
||||
// read packets
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
defer close(done)
|
||||
conn.ReadFrames(func(trackID int, streamType gortsplib.StreamType, payload []byte) {
|
||||
fmt.Printf("frame from track %d, type %v, size %d\n", trackID, streamType, len(payload))
|
||||
fmt.Printf("packet from track %d, type %v, size %d\n", trackID, streamType, len(payload))
|
||||
})
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user