client: remove Client from OnPacket* arguments

This commit is contained in:
aler9
2021-11-12 17:46:25 +01:00
committed by Alessandro Ros
parent f304ec52fb
commit 922d74b940
10 changed files with 48 additions and 47 deletions

View File

@@ -21,11 +21,11 @@ func main() {
// timeout of write operations
WriteTimeout: 10 * time.Second,
// called when a RTP packet arrives
OnPacketRTP: func(c *gortsplib.Client, trackID int, payload []byte) {
OnPacketRTP: func(trackID int, payload []byte) {
fmt.Printf("RTP packet from track %d, size %d\n", trackID, len(payload))
},
// called when a RTCP packet arrives
OnPacketRTCP: func(c *gortsplib.Client, trackID int, payload []byte) {
OnPacketRTCP: func(trackID int, payload []byte) {
fmt.Printf("RTCP packet from track %d, size %d\n", trackID, len(payload))
},
}