Skip to content

Commit

Permalink
Merge branch 'setmid' of github.com:pion/webrtc into setmid
Browse files Browse the repository at this point in the history
  • Loading branch information
cnderrauber committed Jan 6, 2022
2 parents b4f359e + bb219c8 commit 4909a74
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 78 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Chris Hiszpanski <[email protected]>
Christopher Fry <[email protected]>
Clayton McCray <[email protected]>
cnderrauber <[email protected]>
cnderrauber <[email protected]>
cyannuk <[email protected]>
David Hamilton <[email protected]>
David Zhao <[email protected]>
Expand Down Expand Up @@ -86,6 +87,7 @@ Konstantin Itskov <[email protected]>
krishna chiatanya <[email protected]>
Kuzmin Vladimir <[email protected]>
lawl <[email protected]>
Len <[email protected]>
Lukas Herman <[email protected]>
Luke <[email protected]>
Luke Curley <[email protected]>
Expand Down
12 changes: 0 additions & 12 deletions examples/broadcast/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ func main() { // nolint:gocognit
}
}()

// 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
}
}
}()

// Create a local track, all our SFU clients will be fed via this track
localTrack, newTrackErr := webrtc.NewTrackLocalStaticRTP(remoteTrack.Codec().RTPCodecCapability, "video", "pion")
if newTrackErr != nil {
Expand Down
12 changes: 0 additions & 12 deletions examples/reflect/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions examples/rtp-forwarder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,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
}
}
}()

b := make([]byte, 1500)
rtpPacket := &rtp.Packet{}
for {
Expand Down
12 changes: 0 additions & 12 deletions examples/save-to-disk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,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
}
}
}()

codec := track.Codec()
if strings.EqualFold(codec.MimeType, webrtc.MimeTypeOpus) {
fmt.Println("Got Opus track, saving to disk as output.opus (48 kHz, 2 channels)")
Expand Down
17 changes: 2 additions & 15 deletions examples/simulcast/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ func main() {
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
fmt.Println("Track has started")

// Start reading from all the streams and sending them to the related output track
rid := track.RID()
go func() {
ticker := time.NewTicker(3 * time.Second)
for range ticker.C {
Expand All @@ -132,21 +134,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
}
}
}()

// Start reading from all the streams and sending them to the related output track
rid := track.RID()
for {
// Read RTP packets being sent to Pion
packet, _, readErr := track.ReadRTP()
Expand Down
12 changes: 0 additions & 12 deletions examples/swap-tracks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,6 @@ func main() { // nolint:gocognit

// Set a handler for when a new remote track starts
peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) {
// 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)
trackNum := trackCount
trackCount++
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ require (
github.com/pion/transport v0.13.0
github.com/sclevine/agouti v3.0.0+incompatible
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 h1:kmreh1vGI63l2FxOAYS3Yv6ATsi7lSTuwNSVbGfJV9I=
golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down

0 comments on commit 4909a74

Please sign in to comment.