Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / voice_engine / test / cmd_test / voe_cmd_test.cc
index 400f73b..4f6f132 100644 (file)
 
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/common.h"
-#include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
@@ -42,8 +39,6 @@
 #include "webrtc/voice_engine/include/voe_video_sync.h"
 #include "webrtc/voice_engine/include/voe_volume_control.h"
 
-DEFINE_bool(use_acm_version_2, false,
-            "If true, we'll run the tests with Audio Coding Module version 2.");
 DEFINE_bool(use_log_file, false,
     "Output logs to a file; by default they will be printed to stderr.");
 
@@ -129,13 +124,7 @@ int main(int argc, char** argv) {
 
   printf("Test started \n");
 
-  // TODO(minyue): Remove when the old ACM is removed (latest 2014-04-01).
-  Config config;
-  config.Set<AudioCodingModuleFactory>(FLAGS_use_acm_version_2 ?
-      new NewAudioCodingModuleFactory() :
-      new AudioCodingModuleFactory());
-  m_voe = VoiceEngine::Create(config);
-
+  m_voe = VoiceEngine::Create();
   base1 = VoEBase::GetInterface(m_voe);
   codec = VoECodec::GetInterface(m_voe);
   apm = VoEAudioProcessing::GetInterface(m_voe);
@@ -242,7 +231,6 @@ void RunTest(std::string out_path) {
   bool enable_rx_ns = false;
   bool typing_detection = false;
   bool muted = false;
-  bool on_hold = false;
   bool opus_stereo = false;
   bool experimental_ns_enabled = false;
 
@@ -341,8 +329,6 @@ void RunTest(std::string out_path) {
   // Call loop
   bool newcall = true;
   while (newcall) {
-
-#ifndef WEBRTC_ANDROID
     int rd(-1), pd(-1);
     res = hardware->GetNumOfRecordingDevices(rd);
     VALIDATE;
@@ -374,7 +360,6 @@ void RunTest(std::string out_path) {
     printf("Setting sound devices \n");
     res = hardware->SetRecordingDevice(rd);
     VALIDATE;
-#endif  // WEBRTC_ANDROID
 
     res = codec->SetVADStatus(0, enable_cng);
     VALIDATE;
@@ -415,7 +400,6 @@ void RunTest(std::string out_path) {
       VALIDATE;
     }
 
-#ifndef WEBRTC_ANDROID
     printf("Getting mic volume \n");
     unsigned int vol = 999;
     res = volume->GetMicVolume(vol);
@@ -423,7 +407,6 @@ void RunTest(std::string out_path) {
     if ((vol > 255) || (vol < 1)) {
       printf("\n****ERROR in GetMicVolume");
     }
-#endif
 
     int forever = 1;
     while (forever) {
@@ -638,19 +621,6 @@ void RunTest(std::string out_path) {
         else
           printf("\n Microphone is no longer on mute! \n");
       } else if (option_selection == option_index++) {
-        // Toggle the call on hold
-        OnHoldModes mode;
-        res = base1->GetOnHoldStatus(chan, on_hold, mode);
-        VALIDATE;
-        on_hold = !on_hold;
-        mode = kHoldSendAndPlay;
-        res = base1->SetOnHoldStatus(chan, on_hold, mode);
-        VALIDATE;
-        if (on_hold)
-          printf("\n Call now on hold! \n");
-        else
-          printf("\n Call now not on hold! \n");
-      } else if (option_selection == option_index++) {
         // Get the last error code and print to screen
         int err_code = 0;
         err_code = base1->LastError();