mirror of
https://github.com/pion/webrtc.git
synced 2025-09-26 19:21:12 +08:00
Bolting on send side simulcast
Introduces AddEncoding method in RTP sender to add simulcast encodings. Added UTs for AddEncoding. Also modified the Simulcast send test to use the new API.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package webrtc
|
||||
|
||||
import "github.com/pion/rtp"
|
||||
import (
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
// TrackLocalWriter is the Writer for outbound RTP Packets
|
||||
type TrackLocalWriter interface {
|
||||
@@ -14,10 +17,11 @@ type TrackLocalWriter interface {
|
||||
// TrackLocalContext is the Context passed when a TrackLocal has been Binded/Unbinded from a PeerConnection, and used
|
||||
// in Interceptors.
|
||||
type TrackLocalContext struct {
|
||||
id string
|
||||
params RTPParameters
|
||||
ssrc SSRC
|
||||
writeStream TrackLocalWriter
|
||||
id string
|
||||
params RTPParameters
|
||||
ssrc SSRC
|
||||
writeStream TrackLocalWriter
|
||||
rtcpInterceptor interceptor.RTCPReader
|
||||
}
|
||||
|
||||
// CodecParameters returns the negotiated RTPCodecParameters. These are the codecs supported by both
|
||||
@@ -49,6 +53,11 @@ func (t *TrackLocalContext) ID() string {
|
||||
return t.id
|
||||
}
|
||||
|
||||
// RTCPReader returns the RTCP interceptor for this TrackLocal. Used to read RTCP of this TrackLocal.
|
||||
func (t *TrackLocalContext) RTCPReader() interceptor.RTCPReader {
|
||||
return t.rtcpInterceptor
|
||||
}
|
||||
|
||||
// TrackLocal is an interface that controls how the user can send media
|
||||
// The user can provide their own TrackLocal implementations, or use
|
||||
// the implementations in pkg/media
|
||||
|
Reference in New Issue
Block a user