(Auto)update libjingle 69049090-> 69054765

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6412 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-06-12 09:19:08 +00:00
parent c01cc3d3a8
commit b90619c07f
5 changed files with 186 additions and 45 deletions

View File

@ -96,7 +96,8 @@ class FakeWebRtcVoiceEngine
volume_pan_right(1.0),
file(false),
vad(false),
fec(false),
codec_fec(false),
red(false),
nack(false),
media_processor_registered(false),
rx_agc_enabled(false),
@ -104,7 +105,7 @@ class FakeWebRtcVoiceEngine
cn8_type(13),
cn16_type(105),
dtmf_type(106),
fec_type(117),
red_type(117),
nack_max_packets(0),
vie_network(NULL),
video_channel(-1),
@ -124,7 +125,8 @@ class FakeWebRtcVoiceEngine
float volume_pan_right;
bool file;
bool vad;
bool fec;
bool codec_fec;
bool red;
bool nack;
bool media_processor_registered;
bool rx_agc_enabled;
@ -133,7 +135,7 @@ class FakeWebRtcVoiceEngine
int cn8_type;
int cn16_type;
int dtmf_type;
int fec_type;
int red_type;
int nack_max_packets;
webrtc::ViENetwork* vie_network;
int video_channel;
@ -214,8 +216,11 @@ class FakeWebRtcVoiceEngine
bool GetVAD(int channel) {
return channels_[channel]->vad;
}
bool GetFEC(int channel) {
return channels_[channel]->fec;
bool GetRED(int channel) {
return channels_[channel]->red;
}
bool GetCodecFEC(int channel) {
return channels_[channel]->codec_fec;
}
bool GetNACK(int channel) {
return channels_[channel]->nack;
@ -243,8 +248,8 @@ class FakeWebRtcVoiceEngine
int GetSendTelephoneEventPayloadType(int channel) {
return channels_[channel]->dtmf_type;
}
int GetSendFECPayloadType(int channel) {
return channels_[channel]->fec_type;
int GetSendREDPayloadType(int channel) {
return channels_[channel]->red_type;
}
bool CheckPacket(int channel, const void* data, size_t len) {
bool result = !CheckNoPacket(channel);
@ -511,6 +516,16 @@ class FakeWebRtcVoiceEngine
}
WEBRTC_STUB(GetVADStatus, (int channel, bool& enabled,
webrtc::VadModes& mode, bool& disabledDTX));
WEBRTC_FUNC(SetFECStatus, (int channel, bool enable)) {
WEBRTC_CHECK_CHANNEL(channel);
channels_[channel]->codec_fec = enable;
return 0;
}
WEBRTC_FUNC(GetFECStatus, (int channel, bool& enable)) {
WEBRTC_CHECK_CHANNEL(channel);
enable = channels_[channel]->codec_fec;
return 0;
}
// webrtc::VoEDtmf
WEBRTC_FUNC(SendTelephoneEvent, (int channel, int event_code,
@ -823,16 +838,24 @@ class FakeWebRtcVoiceEngine
stats.packetsReceived = kIntStatValue;
return 0;
}
#ifdef USE_WEBRTC_DEV_BRANCH
WEBRTC_FUNC(SetREDStatus, (int channel, bool enable, int redPayloadtype)) {
#else
WEBRTC_FUNC(SetFECStatus, (int channel, bool enable, int redPayloadtype)) {
#endif // USE_WEBRTC_DEV_BRANCH
WEBRTC_CHECK_CHANNEL(channel);
channels_[channel]->fec = enable;
channels_[channel]->fec_type = redPayloadtype;
channels_[channel]->red = enable;
channels_[channel]->red_type = redPayloadtype;
return 0;
}
#ifdef USE_WEBRTC_DEV_BRANCH
WEBRTC_FUNC(GetREDStatus, (int channel, bool& enable, int& redPayloadtype)) {
#else
WEBRTC_FUNC(GetFECStatus, (int channel, bool& enable, int& redPayloadtype)) {
#endif // USE_WEBRTC_DEV_BRANCH
WEBRTC_CHECK_CHANNEL(channel);
enable = channels_[channel]->fec;
redPayloadtype = channels_[channel]->fec_type;
enable = channels_[channel]->red;
redPayloadtype = channels_[channel]->red_type;
return 0;
}
WEBRTC_FUNC(SetNACKStatus, (int channel, bool enable, int maxNoPackets)) {

View File

@ -3027,10 +3027,13 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) {
if (leaky_bucket_changed) {
bool enable_leaky_bucket =
options_.video_leaky_bucket.GetWithDefaultIfUnset(false);
options_.video_leaky_bucket.GetWithDefaultIfUnset(true);
LOG(LS_INFO) << "Leaky bucket is enabled? " << enable_leaky_bucket;
for (SendChannelMap::iterator it = send_channels_.begin();
it != send_channels_.end(); ++it) {
// TODO(holmer): This API will be removed as we move to the new
// webrtc::Call API. We should clean up this experiment when that is
// happening.
if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus(
it->second->channel_id(), enable_leaky_bucket) != 0) {
LOG_RTCERR2(SetTransmissionSmoothingStatus, it->second->channel_id(),
@ -3573,7 +3576,7 @@ bool WebRtcVideoMediaChannel::ConfigureSending(int channel_id,
return false;
}
if (options_.video_leaky_bucket.GetWithDefaultIfUnset(false)) {
if (options_.video_leaky_bucket.GetWithDefaultIfUnset(true)) {
if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id,
true) != 0) {
LOG_RTCERR2(SetTransmissionSmoothingStatus, channel_id, true);
@ -3965,7 +3968,7 @@ bool WebRtcVideoMediaChannel::MaybeResetVieSendCodec(
options_.video_noise_reduction.GetWithDefaultIfUnset(false);
int screencast_min_bitrate =
options_.screencast_min_bitrate.GetWithDefaultIfUnset(0);
bool leaky_bucket = options_.video_leaky_bucket.GetWithDefaultIfUnset(false);
bool leaky_bucket = options_.video_leaky_bucket.GetWithDefaultIfUnset(true);
bool denoising = !is_screencast && enable_denoising;
bool reset_send_codec =
target_width != cur_width || target_height != cur_height ||

View File

@ -959,17 +959,17 @@ TEST_F(WebRtcVideoEngineTestFake, RecvAbsoluteSendTimeHeaderExtensions) {
TEST_F(WebRtcVideoEngineTestFake, LeakyBucketTest) {
EXPECT_TRUE(SetupEngine());
// Verify this is off by default.
// Verify this is on by default.
EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(1)));
int first_send_channel = vie_.GetLastChannel();
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
// Enable the experiment and verify.
// Disable the experiment and verify.
cricket::VideoOptions options;
options.conference_mode.Set(true);
options.video_leaky_bucket.Set(true);
options.video_leaky_bucket.Set(false);
EXPECT_TRUE(channel_->SetOptions(options));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
// Add a receive channel and verify leaky bucket isn't enabled.
EXPECT_TRUE(channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(2)));
@ -977,10 +977,16 @@ TEST_F(WebRtcVideoEngineTestFake, LeakyBucketTest) {
EXPECT_NE(first_send_channel, recv_channel_num);
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(recv_channel_num));
// Add a new send stream and verify leaky bucket is enabled from start.
// Add a new send stream and verify leaky bucket is disabled from start.
EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(3)));
int second_send_channel = vie_.GetLastChannel();
EXPECT_NE(first_send_channel, second_send_channel);
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(second_send_channel));
// Reenable leaky bucket.
options.video_leaky_bucket.Set(true);
EXPECT_TRUE(channel_->SetOptions(options));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(second_send_channel));
}
@ -1062,12 +1068,12 @@ TEST_F(WebRtcVideoEngineTestFake, AdditiveVideoOptions) {
EXPECT_TRUE(channel_->SetOptions(options1));
EXPECT_EQ(100, vie_.GetSenderTargetDelay(first_send_channel));
EXPECT_EQ(100, vie_.GetReceiverTargetDelay(first_send_channel));
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
cricket::VideoOptions options2;
options2.video_leaky_bucket.Set(true);
options2.video_leaky_bucket.Set(false);
EXPECT_TRUE(channel_->SetOptions(options2));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
// The buffered_mode_latency still takes effect.
EXPECT_EQ(100, vie_.GetSenderTargetDelay(first_send_channel));
EXPECT_EQ(100, vie_.GetReceiverTargetDelay(first_send_channel));
@ -1077,7 +1083,7 @@ TEST_F(WebRtcVideoEngineTestFake, AdditiveVideoOptions) {
EXPECT_EQ(50, vie_.GetSenderTargetDelay(first_send_channel));
EXPECT_EQ(50, vie_.GetReceiverTargetDelay(first_send_channel));
// The video_leaky_bucket still takes effect.
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
}
TEST_F(WebRtcVideoEngineTestFake, SetCpuOveruseOptionsWithCaptureJitterMethod) {

View File

@ -426,6 +426,16 @@ static int GetOpusBitrateFromParams(const AudioCodec& codec) {
return bitrate;
}
// True if params["useinbandfec"] == "1"
static bool IsOpusFecEnabled(const AudioCodec& codec) {
CodecParameterMap::const_iterator param =
codec.params.find(kCodecParamUseInbandFec);
if (param == codec.params.end())
return false;
return param->second == kParamValueTrue;
}
void WebRtcVoiceEngine::ConstructCodecs() {
LOG(LS_INFO) << "WebRtc VoiceEngine codecs:";
int ncodecs = voe_wrapper_->codec()->NumOfCodecs();
@ -1943,10 +1953,16 @@ bool WebRtcVoiceMediaChannel::SetRecvCodecs(
bool WebRtcVoiceMediaChannel::SetSendCodecs(
int channel, const std::vector<AudioCodec>& codecs) {
// Disable VAD, and FEC unless we know the other side wants them.
// Disable VAD, FEC, and RED unless we know the other side wants them.
engine()->voe()->codec()->SetVADStatus(channel, false);
engine()->voe()->rtp()->SetNACKStatus(channel, false, 0);
#ifdef USE_WEBRTC_DEV_BRANCH
engine()->voe()->rtp()->SetREDStatus(channel, false);
engine()->voe()->codec()->SetFECStatus(channel, false);
#else
// TODO(minyue): Remove code under #else case after new WebRTC roll.
engine()->voe()->rtp()->SetFECStatus(channel, false);
#endif // USE_WEBRTC_DEV_BRANCH
// Scan through the list to figure out the codec to use for sending, along
// with the proper configuration for VAD and DTMF.
@ -2005,11 +2021,24 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
if (bitrate_from_params != 0) {
voe_codec.rate = bitrate_from_params;
}
// If FEC is enabled.
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.
// Be sure to use the payload type requested by the remote side.
// "red", for FEC audio, is a special case where the actual codec to be
// "red", for RED audio, is a special case where the actual codec to be
// used is specified in params.
if (IsRedCodec(it->name)) {
// Parse out the RED parameters. If we fail, just ignore RED;
@ -2020,9 +2049,16 @@ bool WebRtcVoiceMediaChannel::SetSendCodecs(
// Enable redundant encoding of the specified codec. Treat any
// failure as a fatal internal error.
#ifdef USE_WEBRTC_DEV_BRANCH
LOG(LS_INFO) << "Enabling RED on channel " << channel;
if (engine()->voe()->rtp()->SetREDStatus(channel, true, it->id) == -1) {
LOG_RTCERR3(SetREDStatus, channel, true, it->id);
#else
// TODO(minyue): Remove code under #else case after new WebRTC roll.
LOG(LS_INFO) << "Enabling FEC";
if (engine()->voe()->rtp()->SetFECStatus(channel, true, it->id) == -1) {
LOG_RTCERR3(SetFECStatus, channel, true, it->id);
#endif // USE_WEBRTC_DEV_BRANCH
return false;
}
} else {

View File

@ -745,7 +745,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecs) {
EXPECT_EQ(48000, gcodec.rate);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_FALSE(voe_.GetVAD(channel_num));
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
EXPECT_EQ(13, voe_.GetSendCNPayloadType(channel_num, false));
EXPECT_EQ(105, voe_.GetSendCNPayloadType(channel_num, true));
EXPECT_EQ(106, voe_.GetSendTelephoneEventPayloadType(channel_num));
@ -1144,6 +1144,79 @@ TEST_F(WebRtcVoiceEngineTestFake, AddRecvStreamEnableNack) {
EXPECT_TRUE(voe_.GetNACK(channel_num));
}
// Test that without useinbandfec, Opus FEC is off.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecNoOpusFEC) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
std::vector<cricket::AudioCodec> codecs;
codecs.push_back(kOpusCodec);
codecs[0].bitrate = 0;
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
EXPECT_FALSE(voe_.GetCodecFEC(channel_num));
}
// Test that with useinbandfec=0, Opus FEC is off.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecOpusDisableFEC) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
std::vector<cricket::AudioCodec> codecs;
codecs.push_back(kOpusCodec);
codecs[0].bitrate = 0;
codecs[0].params["useinbandfec"] = "0";
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
EXPECT_FALSE(voe_.GetCodecFEC(channel_num));
webrtc::CodecInst gcodec;
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_STREQ("opus", gcodec.plname);
EXPECT_EQ(1, gcodec.channels);
EXPECT_EQ(32000, gcodec.rate);
}
// Test that with useinbandfec=1, Opus FEC is on.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecOpusEnableFEC) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
std::vector<cricket::AudioCodec> codecs;
codecs.push_back(kOpusCodec);
codecs[0].bitrate = 0;
codecs[0].params["useinbandfec"] = "1";
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
EXPECT_TRUE(voe_.GetCodecFEC(channel_num));
webrtc::CodecInst gcodec;
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_STREQ("opus", gcodec.plname);
EXPECT_EQ(1, gcodec.channels);
EXPECT_EQ(32000, gcodec.rate);
}
// Test that with useinbandfec=1, stereo=1, Opus FEC is on.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecOpusEnableFECStereo) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
std::vector<cricket::AudioCodec> codecs;
codecs.push_back(kOpusCodec);
codecs[0].bitrate = 0;
codecs[0].params["stereo"] = "1";
codecs[0].params["useinbandfec"] = "1";
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
EXPECT_TRUE(voe_.GetCodecFEC(channel_num));
webrtc::CodecInst gcodec;
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_STREQ("opus", gcodec.plname);
EXPECT_EQ(2, gcodec.channels);
EXPECT_EQ(64000, gcodec.rate);
}
// Test that with non-Opus, codec FEC is off.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecIsacNoFEC) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
std::vector<cricket::AudioCodec> codecs;
codecs.push_back(kIsacCodec);
EXPECT_TRUE(channel_->SetSendCodecs(codecs));
EXPECT_FALSE(voe_.GetCodecFEC(channel_num));
}
// Test that we can apply CELT with stereo mode but fail with mono mode.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsCelt) {
EXPECT_TRUE(SetupEngine());
@ -1315,7 +1388,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsCNandDTMFAsCaller) {
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_TRUE(voe_.GetVAD(channel_num));
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
EXPECT_EQ(13, voe_.GetSendCNPayloadType(channel_num, false));
EXPECT_EQ(97, voe_.GetSendCNPayloadType(channel_num, true));
EXPECT_EQ(98, voe_.GetSendTelephoneEventPayloadType(channel_num));
@ -1348,7 +1421,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsCNandDTMFAsCallee) {
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_TRUE(voe_.GetVAD(channel_num));
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
EXPECT_EQ(13, voe_.GetSendCNPayloadType(channel_num, false));
EXPECT_EQ(97, voe_.GetSendCNPayloadType(channel_num, true));
EXPECT_EQ(98, voe_.GetSendTelephoneEventPayloadType(channel_num));
@ -1412,13 +1485,13 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsCaseInsensitive) {
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_TRUE(voe_.GetVAD(channel_num));
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
EXPECT_EQ(13, voe_.GetSendCNPayloadType(channel_num, false));
EXPECT_EQ(97, voe_.GetSendCNPayloadType(channel_num, true));
EXPECT_EQ(98, voe_.GetSendTelephoneEventPayloadType(channel_num));
}
// Test that we set up FEC correctly as caller.
// Test that we set up RED correctly as caller.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsREDAsCaller) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
@ -1434,11 +1507,11 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsREDAsCaller) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_TRUE(voe_.GetFEC(channel_num));
EXPECT_EQ(127, voe_.GetSendFECPayloadType(channel_num));
EXPECT_TRUE(voe_.GetRED(channel_num));
EXPECT_EQ(127, voe_.GetSendREDPayloadType(channel_num));
}
// Test that we set up FEC correctly as callee.
// Test that we set up RED correctly as callee.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsREDAsCallee) {
EXPECT_TRUE(engine_.Init(talk_base::Thread::Current()));
channel_ = engine_.CreateChannel();
@ -1459,11 +1532,11 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsREDAsCallee) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_TRUE(voe_.GetFEC(channel_num));
EXPECT_EQ(127, voe_.GetSendFECPayloadType(channel_num));
EXPECT_TRUE(voe_.GetRED(channel_num));
EXPECT_EQ(127, voe_.GetSendREDPayloadType(channel_num));
}
// Test that we set up FEC correctly if params are omitted.
// Test that we set up RED correctly if params are omitted.
TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsREDNoParams) {
EXPECT_TRUE(SetupEngine());
int channel_num = voe_.GetLastChannel();
@ -1478,8 +1551,8 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsREDNoParams) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_TRUE(voe_.GetFEC(channel_num));
EXPECT_EQ(127, voe_.GetSendFECPayloadType(channel_num));
EXPECT_TRUE(voe_.GetRED(channel_num));
EXPECT_EQ(127, voe_.GetSendREDPayloadType(channel_num));
}
// Test that we ignore RED if the parameters aren't named the way we expect.
@ -1498,7 +1571,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsBadRED1) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
}
// Test that we ignore RED if it uses different primary/secondary encoding.
@ -1517,7 +1590,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsBadRED2) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
}
// Test that we ignore RED if it uses more than 2 encodings.
@ -1536,7 +1609,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsBadRED3) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
}
// Test that we ignore RED if it has bogus codec ids.
@ -1555,7 +1628,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsBadRED4) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
}
// Test that we ignore RED if it refers to a codec that is not present.
@ -1574,7 +1647,7 @@ TEST_F(WebRtcVoiceEngineTestFake, SetSendCodecsBadRED5) {
EXPECT_EQ(0, voe_.GetSendCodec(channel_num, gcodec));
EXPECT_EQ(96, gcodec.pltype);
EXPECT_STREQ("ISAC", gcodec.plname);
EXPECT_FALSE(voe_.GetFEC(channel_num));
EXPECT_FALSE(voe_.GetRED(channel_num));
}
// Test support for audio level header extension.