(Auto)update libjingle 65729829-> 65752960
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6004 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -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<bool> experimental_aec;
|
||||
Settable<bool> experimental_ns;
|
||||
Settable<bool> aec_dump;
|
||||
Settable<bool> experimental_acm;
|
||||
// Note that tx_agc_* only applies to non-experimental AGC.
|
||||
Settable<uint16> tx_agc_target_dbov;
|
||||
Settable<uint16> tx_agc_digital_compression_gain;
|
||||
|
@ -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<std::string> 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<webrtc::AudioCodingModule> acm(
|
||||
config.Get<webrtc::AudioCodingModuleFactory>().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);
|
||||
|
@ -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<webrtc::AudioCodingModuleFactory>(
|
||||
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<webrtc::AudioCodingModuleFactory>(
|
||||
new webrtc::NewAudioCodingModuleFactory());
|
||||
} else {
|
||||
LOG(LS_INFO) << "VoiceEngine is set to use legacy ACM (ACM1 + Neteq3).";
|
||||
voe_config_.Set<webrtc::AudioCodingModuleFactory>(
|
||||
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;
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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<bool>(
|
||||
Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file));
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user