(Auto)update libjingle 70343444-> 70394475

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6581 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-07-02 11:54:09 +00:00
parent 895698067c
commit 0bb9fac98c
3 changed files with 13 additions and 21 deletions

View File

@ -539,10 +539,6 @@ class FakeWebRtcVoiceEngine
#ifdef USE_WEBRTC_DEV_BRANCH
WEBRTC_FUNC(SetFECStatus, (int channel, bool enable)) {
WEBRTC_CHECK_CHANNEL(channel);
if (strcmp(channels_[channel]->send_codec.plname, "opus")) {
// Return -1 if current send codec is not Opus.
return -1;
}
channels_[channel]->codec_fec = enable;
return 0;
}

View File

@ -1985,7 +1985,6 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
memset(&send_codec, 0, sizeof(send_codec));
bool nack_enabled = nack_enabled_;
bool enable_fec = false;
// Set send codec (the first non-telephone-event/CN codec)
for (std::vector<AudioCodec>::const_iterator it = codecs.begin();
@ -2036,6 +2035,19 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
if (bitrate_from_params != 0) {
voe_codec.rate = bitrate_from_params;
}
// For Opus, we also enable inband FEC if it is requested.
if (IsOpusFecEnabled(*it)) {
LOG(LS_INFO) << "Enabling Opus FEC on channel " << channel;
#ifdef USE_WEBRTC_DEV_BRANCH
if (engine()->voe()->codec()->SetFECStatus(channel, true) == -1) {
// Enable in-band FEC of the Opus codec. Treat any failure as a fatal
// internal error.
LOG_RTCERR2(SetFECStatus, channel, true);
return false;
}
#endif // USE_WEBRTC_DEV_BRANCH
}
}
// We'll use the first codec in the list to actually send audio data.
@ -2066,8 +2078,6 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
} else {
send_codec = voe_codec;
nack_enabled = IsNackEnabled(*it);
// For Opus as the send codec, we enable inband FEC if requested.
enable_fec = IsOpus(*it) && IsOpusFecEnabled(*it);
}
found_send_codec = true;
break;
@ -2088,19 +2098,6 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
if (!SetSendCodec(channel, send_codec))
return false;
// Opus FEC should be enabled after SetSendCodec.
if (enable_fec) {
LOG(LS_INFO) << "Enabling FEC on channel " << channel;
#ifdef USE_WEBRTC_DEV_BRANCH
if (engine()->voe()->codec()->SetFECStatus(channel, true) == -1) {
// Enable in-band FEC of the Opus codec. Treat any failure as a fatal
// internal error.
LOG_RTCERR2(SetFECStatus, channel, true);
return false;
}
#endif // USE_WEBRTC_DEV_BRANCH
}
// Always update the |send_codec_| to the currently set send codec.
send_codec_.reset(new webrtc::CodecInst(send_codec));

View File

@ -1214,7 +1214,6 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecIsacNoFec) {
int channel_num = voe_.GetLastChannel();
std::vector<cricket::AudioCodec> codecs;
codecs.push_back(kIsacCodec);
EXPECT_EQ(-1, voe_.SetFECStatus(channel_num, true));
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
EXPECT_FALSE(voe_.GetCodecFEC(channel_num));
}