Let A/V sync test use default AudioCoding module
This test used to run with both ACM1 and ACM2, to verify sync with both
versions of the module. ACM1 (and NetEq3) is now being deprecated,
wherefore this test should now use the default one (i.e., ACM2).
BUG=2996
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/12299004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5953 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/video/call_perf_tests.cc b/webrtc/video/call_perf_tests.cc
index 8ab07d1..f7768fb 100644
--- a/webrtc/video/call_perf_tests.cc
+++ b/webrtc/video/call_perf_tests.cc
@@ -16,7 +16,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/call.h"
-#include "webrtc/common.h"
#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
#include "webrtc/modules/remote_bitrate_estimator/include/rtp_to_ntp.h"
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
@@ -156,16 +155,14 @@
VideoRtcpAndSyncObserver(Clock* clock,
int voe_channel,
VoEVideoSync* voe_sync,
- SyncRtcpObserver* audio_observer,
- bool using_new_acm)
+ SyncRtcpObserver* audio_observer)
: SyncRtcpObserver(FakeNetworkPipe::Config()),
clock_(clock),
voe_channel_(voe_channel),
voe_sync_(voe_sync),
audio_observer_(audio_observer),
creation_time_ms_(clock_->TimeInMilliseconds()),
- first_time_in_sync_(-1),
- using_new_acm_(using_new_acm) {}
+ first_time_in_sync_(-1) {}
virtual void RenderFrame(const I420VideoFrame& video_frame,
int time_to_render_ms) OVERRIDE {
@@ -184,12 +181,8 @@
int64_t stream_offset = latest_audio_ntp - latest_video_ntp;
std::stringstream ss;
ss << stream_offset;
- std::stringstream acm_type;
- if (using_new_acm_) {
- acm_type << "_acm2";
- }
webrtc::test::PrintResult("stream_offset",
- acm_type.str(),
+ "",
"synchronization",
ss.str(),
"ms",
@@ -203,7 +196,7 @@
if (first_time_in_sync_ == -1) {
first_time_in_sync_ = now_ms;
webrtc::test::PrintResult("sync_convergence_time",
- acm_type.str(),
+ "",
"synchronization",
time_since_creation,
"ms",
@@ -221,19 +214,9 @@
SyncRtcpObserver* audio_observer_;
int64_t creation_time_ms_;
int64_t first_time_in_sync_;
- bool using_new_acm_;
};
-class ParamCallPerfTest : public CallPerfTest,
- public ::testing::WithParamInterface<bool> {
- public:
- ParamCallPerfTest() : CallPerfTest(), use_new_acm_(GetParam()) {}
-
- protected:
- bool use_new_acm_;
-};
-
-TEST_P(ParamCallPerfTest, PlaysOutAudioAndVideoInSync) {
+TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
VoiceEngine* voice_engine = VoiceEngine::Create();
VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
VoECodec* voe_codec = VoECodec::GetInterface(voice_engine);
@@ -245,15 +228,7 @@
test::FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(),
audio_filename);
EXPECT_EQ(0, voe_base->Init(&fake_audio_device, NULL));
- Config config;
- if (use_new_acm_) {
- config.Set<webrtc::AudioCodingModuleFactory>(
- new webrtc::NewAudioCodingModuleFactory());
- } else {
- config.Set<webrtc::AudioCodingModuleFactory>(
- new webrtc::AudioCodingModuleFactory());
- }
- int channel = voe_base->CreateChannel(config);
+ int channel = voe_base->CreateChannel();
FakeNetworkPipe::Config net_config;
net_config.queue_delay_ms = 500;
@@ -261,8 +236,7 @@
VideoRtcpAndSyncObserver observer(Clock::GetRealTimeClock(),
channel,
voe_sync,
- &audio_observer,
- use_new_acm_);
+ &audio_observer);
Call::Config receiver_config(observer.ReceiveTransport());
receiver_config.voice_engine = voice_engine;
@@ -369,9 +343,6 @@
VoiceEngine::Delete(voice_engine);
}
-// Test with both ACM1 and ACM2.
-INSTANTIATE_TEST_CASE_P(SwitchAcm, ParamCallPerfTest, ::testing::Bool());
-
TEST_F(CallPerfTest, RegisterCpuOveruseObserver) {
// Verifies that either a normal or overuse callback is triggered.
class OveruseCallbackObserver : public test::RtpRtcpObserver,