Revert "Process RTCP Packets in OnTrack examples"

This is not needed. We don't perform any operations on inbound RTCP
packets. Receiver Reports and TWCC are generated by Reading RTP packets.

This reverts commit 080d7b8427.
This commit is contained in:
Sean DuBois
2021-12-29 23:39:32 -05:00
parent 425f5c6cef
commit fe447d6e56
6 changed files with 2 additions and 75 deletions

View File

@@ -110,18 +110,6 @@ func main() {
}
}()
// Read incoming RTCP packets
// Before these packets are returned they are processed by interceptors. For things
// like TWCC and RTCP Reports this needs to be called.
go func() {
rtcpBuf := make([]byte, 1500)
for {
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
return
}
}
}()
fmt.Printf("Track has started, of type %d: %s \n", track.PayloadType(), track.Codec().MimeType)
for {
// Read RTP packets being sent to Pion