Handle multiple codecs in renegotiation (#191)

* Handle multiple codecs in renegotiation

update pion to v3.1.9 for answer same order of codec as publisher.
register enable codecs in subscriber peerconnectin created.

add codec parameter to buffer.bind
buffer should use the codec of TrackRemote as it's codec mime.

sent h264blankframe when DownTrack closing
This commit is contained in:
cnderrauber
2021-11-17 21:18:43 +08:00
committed by GitHub
parent c4c93eaad6
commit b7f32dfffd
13 changed files with 198 additions and 90 deletions
+1 -2
View File
@@ -123,11 +123,10 @@ func NewBuffer(ssrc uint32, vp, ap *sync.Pool, logger logr.Logger) *Buffer {
return b
}
func (b *Buffer) Bind(params webrtc.RTPParameters, o Options) {
func (b *Buffer) Bind(params webrtc.RTPParameters, codec webrtc.RTPCodecCapability, o Options) {
b.Lock()
defer b.Unlock()
codec := params.Codecs[0]
b.clockRate = codec.ClockRate
b.maxBitrate = o.MaxBitRate
b.mime = strings.ToLower(codec.MimeType)