Skip to content

Commit bb219c8

Browse files
committed
Merge branch 'master' into setmid
2 parents 775fbfa + d2cc00d commit bb219c8

File tree

9 files changed

+6
-78
lines changed

9 files changed

+6
-78
lines changed

AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Chris Hiszpanski <chris@hiszpanski.name>
4242
Christopher Fry <chris.fry@getcruise.com>
4343
Clayton McCray <cpmdmccray@gmail.com>
4444
cnderrauber <zengjie9004@gmail.com>
45+
cnderrauber <zengjiestc@gmail.com>
4546
cyannuk <cyannuk@issart.com>
4647
David Hamilton <davidhamiltron@gmail.com>
4748
David Zhao <david@davidzhao.com>

examples/broadcast/main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ func main() { // nolint:gocognit
6464
}
6565
}()
6666

67-
// Read incoming RTCP packets
68-
// Before these packets are returned they are processed by interceptors. For things
69-
// like TWCC and RTCP Reports this needs to be called.
70-
go func() {
71-
rtcpBuf := make([]byte, 1500)
72-
for {
73-
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
74-
return
75-
}
76-
}
77-
}()
78-
7967
// Create a local track, all our SFU clients will be fed via this track
8068
localTrack, newTrackErr := webrtc.NewTrackLocalStaticRTP(remoteTrack.Codec().RTPCodecCapability, "video", "pion")
8169
if newTrackErr != nil {

examples/reflect/main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,6 @@ func main() {
110110
}
111111
}()
112112

113-
// Read incoming RTCP packets
114-
// Before these packets are returned they are processed by interceptors. For things
115-
// like TWCC and RTCP Reports this needs to be called.
116-
go func() {
117-
rtcpBuf := make([]byte, 1500)
118-
for {
119-
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
120-
return
121-
}
122-
}
123-
}()
124-
125113
fmt.Printf("Track has started, of type %d: %s \n", track.PayloadType(), track.Codec().MimeType)
126114
for {
127115
// Read RTP packets being sent to Pion

examples/rtp-forwarder/main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,6 @@ func main() {
132132
}
133133
}()
134134

135-
// Read incoming RTCP packets
136-
// Before these packets are returned they are processed by interceptors. For things
137-
// like TWCC and RTCP Reports this needs to be called.
138-
go func() {
139-
rtcpBuf := make([]byte, 1500)
140-
for {
141-
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
142-
return
143-
}
144-
}
145-
}()
146-
147135
b := make([]byte, 1500)
148136
rtpPacket := &rtp.Packet{}
149137
for {

examples/save-to-disk/main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,6 @@ func main() {
116116
}
117117
}()
118118

119-
// Read incoming RTCP packets
120-
// Before these packets are returned they are processed by interceptors. For things
121-
// like TWCC and RTCP Reports this needs to be called.
122-
go func() {
123-
rtcpBuf := make([]byte, 1500)
124-
for {
125-
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
126-
return
127-
}
128-
}
129-
}()
130-
131119
codec := track.Codec()
132120
if strings.EqualFold(codec.MimeType, webrtc.MimeTypeOpus) {
133121
fmt.Println("Got Opus track, saving to disk as output.opus (48 kHz, 2 channels)")

examples/simulcast/main.go

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ func main() {
123123
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
124124
fmt.Println("Track has started")
125125

126+
// Start reading from all the streams and sending them to the related output track
127+
rid := track.RID()
126128
go func() {
127129
ticker := time.NewTicker(3 * time.Second)
128130
for range ticker.C {
@@ -132,21 +134,6 @@ func main() {
132134
}
133135
}
134136
}()
135-
136-
// Read incoming RTCP packets
137-
// Before these packets are returned they are processed by interceptors. For things
138-
// like TWCC and RTCP Reports this needs to be called.
139-
go func() {
140-
rtcpBuf := make([]byte, 1500)
141-
for {
142-
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
143-
return
144-
}
145-
}
146-
}()
147-
148-
// Start reading from all the streams and sending them to the related output track
149-
rid := track.RID()
150137
for {
151138
// Read RTP packets being sent to Pion
152139
packet, _, readErr := track.ReadRTP()

examples/swap-tracks/main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,6 @@ func main() { // nolint:gocognit
8080

8181
// Set a handler for when a new remote track starts
8282
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
83-
// Read incoming RTCP packets
84-
// Before these packets are returned they are processed by interceptors. For things
85-
// like TWCC and RTCP Reports this needs to be called.
86-
go func() {
87-
rtcpBuf := make([]byte, 1500)
88-
for {
89-
if _, _, rtcpErr := receiver.Read(rtcpBuf); rtcpErr != nil {
90-
return
91-
}
92-
}
93-
}()
94-
9583
fmt.Printf("Track has started, of type %d: %s \n", track.PayloadType(), track.Codec().MimeType)
9684
trackNum := trackCount
9785
trackCount++

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ require (
1919
github.com/pion/transport v0.13.0
2020
github.com/sclevine/agouti v3.0.0+incompatible
2121
github.com/stretchr/testify v1.7.0
22-
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9
22+
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f
2323
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v
103103
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
104104
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
105105
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
106-
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 h1:kmreh1vGI63l2FxOAYS3Yv6ATsi7lSTuwNSVbGfJV9I=
107-
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
106+
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM=
107+
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
108108
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
109109
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
110110
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

0 commit comments

Comments
 (0)