From af6640fce73fe0945b749ae8db3ddf6fc3d599a5 Mon Sep 17 00:00:00 2001 From: "buildbot@webrtc.org" Date: Mon, 28 Apr 2014 21:31:51 +0000 Subject: [PATCH] (Auto)update libjingle 65729829-> 65752960 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6004 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/base/mediachannel.h | 4 --- talk/media/webrtc/fakewebrtcvoiceengine.h | 25 ++++--------- talk/media/webrtc/webrtcvoiceengine.cc | 29 --------------- talk/media/webrtc/webrtcvoiceengine.h | 5 --- .../webrtc/webrtcvoiceengine_unittest.cc | 36 ------------------- talk/session/media/channelmanager.cc | 8 ----- talk/session/media/channelmanager.h | 4 --- 7 files changed, 7 insertions(+), 104 deletions(-) diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h index 9bdf4d9f46..fd20619630 100644 --- a/talk/media/base/mediachannel.h +++ b/talk/media/base/mediachannel.h @@ -171,7 +171,6 @@ struct AudioOptions { experimental_aec.SetFrom(change.experimental_aec); experimental_ns.SetFrom(change.experimental_ns); aec_dump.SetFrom(change.aec_dump); - experimental_acm.SetFrom(change.experimental_acm); tx_agc_target_dbov.SetFrom(change.tx_agc_target_dbov); tx_agc_digital_compression_gain.SetFrom( change.tx_agc_digital_compression_gain); @@ -200,7 +199,6 @@ struct AudioOptions { experimental_ns == o.experimental_ns && adjust_agc_delta == o.adjust_agc_delta && aec_dump == o.aec_dump && - experimental_acm == o.experimental_acm && tx_agc_target_dbov == o.tx_agc_target_dbov && tx_agc_digital_compression_gain == o.tx_agc_digital_compression_gain && tx_agc_limiter == o.tx_agc_limiter && @@ -229,7 +227,6 @@ struct AudioOptions { ost << ToStringIfSet("experimental_aec", experimental_aec); ost << ToStringIfSet("experimental_ns", experimental_ns); ost << ToStringIfSet("aec_dump", aec_dump); - ost << ToStringIfSet("experimental_acm", experimental_acm); ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); ost << ToStringIfSet("tx_agc_digital_compression_gain", tx_agc_digital_compression_gain); @@ -267,7 +264,6 @@ struct AudioOptions { Settable experimental_aec; Settable experimental_ns; Settable aec_dump; - Settable experimental_acm; // Note that tx_agc_* only applies to non-experimental AGC. Settable tx_agc_target_dbov; Settable tx_agc_digital_compression_gain; diff --git a/talk/media/webrtc/fakewebrtcvoiceengine.h b/talk/media/webrtc/fakewebrtcvoiceengine.h index bbb03917d8..7ec9d7366c 100644 --- a/talk/media/webrtc/fakewebrtcvoiceengine.h +++ b/talk/media/webrtc/fakewebrtcvoiceengine.h @@ -40,8 +40,6 @@ #include "talk/media/base/voiceprocessor.h" #include "talk/media/webrtc/fakewebrtccommon.h" #include "talk/media/webrtc/webrtcvoe.h" -#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" -#include "webrtc/common.h" namespace webrtc { class ViENetwork; @@ -91,7 +89,7 @@ class FakeWebRtcVoiceEngine int dtmf_length_ms; }; struct Channel { - explicit Channel(bool use_experimental_acm) + explicit Channel() : external_transport(false), send(false), playout(false), @@ -115,8 +113,7 @@ class FakeWebRtcVoiceEngine send_ssrc(0), send_audio_level_ext_(-1), send_absolute_sender_time_ext_(-1), - receive_absolute_sender_time_ext_(-1), - using_experimental_acm(use_experimental_acm) { + receive_absolute_sender_time_ext_(-1) { memset(&send_codec, 0, sizeof(send_codec)); memset(&rx_agc_config, 0, sizeof(rx_agc_config)); } @@ -150,7 +147,6 @@ class FakeWebRtcVoiceEngine webrtc::CodecInst send_codec; webrtc::PacketTime last_rtp_packet_time; std::list packets; - bool using_experimental_acm; }; FakeWebRtcVoiceEngine(const cricket::AudioCodec* const* codecs, @@ -239,10 +235,6 @@ class FakeWebRtcVoiceEngine WEBRTC_ASSERT_CHANNEL(channel); return channels_[channel]->last_rtp_packet_time; } - bool IsUsingExperimentalAcm(int channel) { - WEBRTC_ASSERT_CHANNEL(channel); - return channels_[channel]->using_experimental_acm; - } int GetSendCNPayloadType(int channel, bool wideband) { return (wideband) ? channels_[channel]->cn16_type : @@ -296,11 +288,11 @@ class FakeWebRtcVoiceEngine true); } } - int AddChannel(bool use_experimental_acm) { + int AddChannel() { if (fail_create_channel_) { return -1; } - Channel* ch = new Channel(use_experimental_acm); + Channel* ch = new Channel(); for (int i = 0; i < NumOfCodecs(); ++i) { webrtc::CodecInst codec; GetCodec(i, codec); @@ -343,13 +335,10 @@ class FakeWebRtcVoiceEngine return NULL; } WEBRTC_FUNC(CreateChannel, ()) { - return AddChannel(false); + return AddChannel(); } - WEBRTC_FUNC(CreateChannel, (const webrtc::Config& config)) { - talk_base::scoped_ptr acm( - config.Get().Create(0)); - return AddChannel(strcmp(acm->Version(), webrtc::kExperimentalAcmVersion) - == 0); + WEBRTC_FUNC(CreateChannel, (const webrtc::Config& /*config*/)) { + return AddChannel(); } WEBRTC_FUNC(DeleteChannel, (int channel)) { WEBRTC_CHECK_CHANNEL(channel); diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc index 277a619c24..b53521350c 100644 --- a/talk/media/webrtc/webrtcvoiceengine.cc +++ b/talk/media/webrtc/webrtcvoiceengine.cc @@ -253,7 +253,6 @@ static AudioOptions GetDefaultEngineOptions() { options.experimental_aec.Set(false); options.experimental_ns.Set(false); options.aec_dump.Set(false); - options.experimental_acm.Set(false); return options; } @@ -357,7 +356,6 @@ WebRtcVoiceEngine::WebRtcVoiceEngine() log_filter_(SeverityToFilter(kDefaultLogSeverity)), is_dumping_aec_(false), desired_local_monitor_enable_(false), - use_experimental_acm_(false), tx_processor_ssrc_(0), rx_processor_ssrc_(0) { Construct(); @@ -375,7 +373,6 @@ WebRtcVoiceEngine::WebRtcVoiceEngine(VoEWrapper* voe_wrapper, log_filter_(SeverityToFilter(kDefaultLogSeverity)), is_dumping_aec_(false), desired_local_monitor_enable_(false), - use_experimental_acm_(false), tx_processor_ssrc_(0), rx_processor_ssrc_(0) { Construct(); @@ -408,10 +405,6 @@ void WebRtcVoiceEngine::Construct() { kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); #endif options_ = GetDefaultEngineOptions(); - - // Initialize the VoE Configuration to the new ACM. - voe_config_.Set( - new webrtc::NewAudioCodingModuleFactory); } static bool IsOpus(const AudioCodec& codec) { @@ -750,13 +743,6 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { LOG(LS_INFO) << "Applying audio options: " << options.ToString(); - // Configure whether ACM1 or ACM2 is used. - bool enable_acm2 = false; - if (options.experimental_acm.Get(&enable_acm2)) { - EnableExperimentalAcm(enable_acm2); - } - LOG(LS_INFO) << "ACM2 enabled? " << enable_acm2; - webrtc::VoEAudioProcessing* voep = voe_wrapper_->processing(); bool echo_cancellation; @@ -1318,21 +1304,6 @@ bool WebRtcVoiceEngine::ShouldIgnoreTrace(const std::string& trace) { return false; } -void WebRtcVoiceEngine::EnableExperimentalAcm(bool enable) { - if (enable == use_experimental_acm_) - return; - if (enable) { - LOG(LS_INFO) << "VoiceEngine is set to use new ACM (ACM2 + NetEq4)."; - voe_config_.Set( - new webrtc::NewAudioCodingModuleFactory()); - } else { - LOG(LS_INFO) << "VoiceEngine is set to use legacy ACM (ACM1 + Neteq3)."; - voe_config_.Set( - new webrtc::AudioCodingModuleFactory()); - } - use_experimental_acm_ = enable; -} - void WebRtcVoiceEngine::Print(webrtc::TraceLevel level, const char* trace, int length) { talk_base::LoggingSeverity sev = talk_base::LS_VERBOSE; diff --git a/talk/media/webrtc/webrtcvoiceengine.h b/talk/media/webrtc/webrtcvoiceengine.h index 1721000dba..527b77d385 100644 --- a/talk/media/webrtc/webrtcvoiceengine.h +++ b/talk/media/webrtc/webrtcvoiceengine.h @@ -44,7 +44,6 @@ #include "talk/media/webrtc/webrtcvoe.h" #include "talk/session/media/channel.h" #include "webrtc/common.h" -#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h" #if !defined(LIBPEERCONNECTION_LIB) && \ !defined(LIBPEERCONNECTION_IMPLEMENTATION) @@ -201,9 +200,6 @@ class WebRtcVoiceEngine // allows us to selectively turn on and off different options easily // at any time. bool ApplyOptions(const AudioOptions& options); - // Configure for using ACM2, if |enable| is true, otherwise configure for - // ACM1. - void EnableExperimentalAcm(bool enable); virtual void Print(webrtc::TraceLevel level, const char* trace, int length); virtual void CallbackOnError(int channel, int errCode); // Given the device type, name, and id, find device id. Return true and @@ -261,7 +257,6 @@ class WebRtcVoiceEngine webrtc::AgcConfig default_agc_config_; webrtc::Config voe_config_; - bool use_experimental_acm_; bool initialized_; // See SetOptions and SetOptionOverrides for a description of the diff --git a/talk/media/webrtc/webrtcvoiceengine_unittest.cc b/talk/media/webrtc/webrtcvoiceengine_unittest.cc index f29c200d19..6e6f1cfe6e 100644 --- a/talk/media/webrtc/webrtcvoiceengine_unittest.cc +++ b/talk/media/webrtc/webrtcvoiceengine_unittest.cc @@ -3085,39 +3085,3 @@ TEST(WebRtcVoiceEngineTest, CoInitialize) { } #endif - -TEST_F(WebRtcVoiceEngineTestFake, SetExperimentalAcm) { - EXPECT_TRUE(SetupEngine()); - - // By default the new ACM should be used. - int media_channel = engine_.CreateMediaVoiceChannel(); - ASSERT_GE(media_channel, 0); - EXPECT_TRUE(voe_.IsUsingExperimentalAcm(media_channel)); - - int soundclip_channel = engine_.CreateSoundclipVoiceChannel(); - ASSERT_GE(soundclip_channel, 0); - EXPECT_TRUE(voe_sc_.IsUsingExperimentalAcm(soundclip_channel)); - - // Set options to use experimental ACM. - cricket::AudioOptions options; - options.experimental_acm.Set(true); - ASSERT_TRUE(engine_.SetOptions(options)); - media_channel = engine_.CreateMediaVoiceChannel(); - ASSERT_GE(media_channel, 0); - EXPECT_TRUE(voe_.IsUsingExperimentalAcm(media_channel)); - - soundclip_channel = engine_.CreateSoundclipVoiceChannel(); - ASSERT_GE(soundclip_channel, 0); - EXPECT_TRUE(voe_sc_.IsUsingExperimentalAcm(soundclip_channel)); - - // Set option to use legacy ACM. - options.experimental_acm.Set(false); - ASSERT_TRUE(engine_.SetOptions(options)); - media_channel = engine_.CreateMediaVoiceChannel(); - ASSERT_GE(media_channel, 0); - EXPECT_FALSE(voe_.IsUsingExperimentalAcm(media_channel)); - - soundclip_channel = engine_.CreateSoundclipVoiceChannel(); - ASSERT_GE(soundclip_channel, 0); - EXPECT_FALSE(voe_sc_.IsUsingExperimentalAcm(soundclip_channel)); -} diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc index ccc3527707..757d804fe8 100644 --- a/talk/session/media/channelmanager.cc +++ b/talk/session/media/channelmanager.cc @@ -939,14 +939,6 @@ VideoFormat ChannelManager::GetStartCaptureFormat() { Bind(&MediaEngineInterface::GetStartCaptureFormat, media_engine_.get())); } -bool ChannelManager::SetAudioOptions(const AudioOptions& options) { - if (!media_engine_->SetAudioOptions(options)) { - return false; - } - audio_options_ = options; - return true; -} - bool ChannelManager::StartAecDump(talk_base::PlatformFile file) { return worker_thread_->Invoke( Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file)); diff --git a/talk/session/media/channelmanager.h b/talk/session/media/channelmanager.h index deb7b9ebda..e811bb7342 100644 --- a/talk/session/media/channelmanager.h +++ b/talk/session/media/channelmanager.h @@ -230,10 +230,6 @@ class ChannelManager : public talk_base::MessageHandler, // removed. VideoFormat GetStartCaptureFormat(); - // TODO(turajs): Remove this function when ACM2 is in use. Used mainly to - // choose between ACM1 and ACM2. - bool SetAudioOptions(const AudioOptions& options); - protected: // Adds non-transient parameters which can only be changed through the // options store.