mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
use log.Print instead of fmt.Print in examples
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/aler9/gortsplib"
|
||||
)
|
||||
@@ -13,11 +13,11 @@ func main() {
|
||||
c := gortsplib.Client{
|
||||
// called when a RTP packet arrives
|
||||
OnPacketRTP: func(trackID int, payload []byte) {
|
||||
fmt.Printf("RTP packet from track %d, size %d\n", trackID, len(payload))
|
||||
log.Printf("RTP packet from track %d, size %d\n", trackID, len(payload))
|
||||
},
|
||||
// called when a RTCP packet arrives
|
||||
OnPacketRTCP: func(trackID int, payload []byte) {
|
||||
fmt.Printf("RTCP packet from track %d, size %d\n", trackID, len(payload))
|
||||
log.Printf("RTCP packet from track %d, size %d\n", trackID, len(payload))
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user