Bug 1274340 - Call SetReceiveCodec for RED and ULPFEC when FEC is enabled; r=jesup

We need to call SetReceiveCodec for RED and ULPFEC so we know how to handle
those packets when received.

MozReview-Commit-ID: A9EluM7p2NH

--HG--
extra : rebase_source : 14033558254e7b8c7bc8dc38c1b77ad371b4e6a5
This commit is contained in:
Dan Minor 2016-06-30 12:20:19 -04:00
Родитель 05fc0cdaee
Коммит cd36d5b8e3
1 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -983,6 +983,24 @@ WebrtcVideoConduit::ConfigureRecvMediaCodecs(
return kMediaConduitFECStatusError;
}
// We also need to call SetReceiveCodec for RED and ULPFEC codecs
for(int idx=0; idx < mPtrViECodec->NumberOfCodecs(); idx++) {
webrtc::VideoCodec video_codec;
if(mPtrViECodec->GetCodec(idx, video_codec) == 0) {
payloadName = video_codec.plName;
if(video_codec.codecType == webrtc::VideoCodecType::kVideoCodecRED ||
video_codec.codecType == webrtc::VideoCodecType::kVideoCodecULPFEC) {
if(mPtrViECodec->SetReceiveCodec(mChannel,video_codec) == -1) {
CSFLogError(logTag, "%s Invalid Receive Codec %d ", __FUNCTION__,
mPtrViEBase->LastError());
} else {
CSFLogDebug(logTag, "%s Successfully Set the codec %s", __FUNCTION__,
video_codec.plName);
}
}
}
}
if (use_nack_basic) {
CSFLogDebug(logTag, "Enabling NACK/FEC (recv) for video stream\n");
if (mPtrRTP->SetHybridNACKFECStatus(mChannel, true,