audio_coding: remove "main" directory

This is the last piece of the old directory layout of the modules.

Duplicated header files are left in audio_coding/main/include until
downstream code is updated to the new location. They have pragma
warnings added to them and identical header guards as the new headers to avoid breaking things.

BUG=webrtc:5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
NOTRY=True
NOPRESUBMIT=True

Review URL: https://codereview.webrtc.org/1481493004

Cr-Commit-Position: refs/heads/master@{#10803}
diff --git a/webrtc/call/call_perf_tests.cc b/webrtc/call/call_perf_tests.cc
index 69f090a..44ecae3 100644
--- a/webrtc/call/call_perf_tests.cc
+++ b/webrtc/call/call_perf_tests.cc
@@ -18,7 +18,7 @@
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
 #include "webrtc/call/transport_adapter.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 533e848..382ae51 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -11,10 +11,10 @@
 
 source_set("rent_a_codec") {
   sources = [
-    "main/acm2/acm_codec_database.cc",
-    "main/acm2/acm_codec_database.h",
-    "main/acm2/rent_a_codec.cc",
-    "main/acm2/rent_a_codec.h",
+    "acm2/acm_codec_database.cc",
+    "acm2/acm_codec_database.h",
+    "acm2/rent_a_codec.cc",
+    "acm2/rent_a_codec.h",
   ]
   configs += [ "../..:common_config" ]
   public_configs = [ "../..:common_inherited_config" ]
@@ -44,29 +44,29 @@
 
 config("audio_coding_config") {
   include_dirs = [
-    "main/include",
+    "include",
     "../include",
   ]
 }
 
 source_set("audio_coding") {
   sources = [
-    "main/acm2/acm_common_defs.h",
-    "main/acm2/acm_receiver.cc",
-    "main/acm2/acm_receiver.h",
-    "main/acm2/acm_resampler.cc",
-    "main/acm2/acm_resampler.h",
-    "main/acm2/audio_coding_module.cc",
-    "main/acm2/audio_coding_module_impl.cc",
-    "main/acm2/audio_coding_module_impl.h",
-    "main/acm2/call_statistics.cc",
-    "main/acm2/call_statistics.h",
-    "main/acm2/codec_manager.cc",
-    "main/acm2/codec_manager.h",
-    "main/acm2/initial_delay_manager.cc",
-    "main/acm2/initial_delay_manager.h",
-    "main/include/audio_coding_module.h",
-    "main/include/audio_coding_module_typedefs.h",
+    "acm2/acm_common_defs.h",
+    "acm2/acm_receiver.cc",
+    "acm2/acm_receiver.h",
+    "acm2/acm_resampler.cc",
+    "acm2/acm_resampler.h",
+    "acm2/audio_coding_module.cc",
+    "acm2/audio_coding_module_impl.cc",
+    "acm2/audio_coding_module_impl.h",
+    "acm2/call_statistics.cc",
+    "acm2/call_statistics.h",
+    "acm2/codec_manager.cc",
+    "acm2/codec_manager.h",
+    "acm2/initial_delay_manager.cc",
+    "acm2/initial_delay_manager.h",
+    "include/audio_coding_module.h",
+    "include/audio_coding_module_typedefs.h",
   ]
 
   defines = []
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc b/webrtc/modules/audio_coding/acm2/acm_codec_database.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc
rename to webrtc/modules/audio_coding/acm2/acm_codec_database.cc
index b54fc0b..8d4072f 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_codec_database.cc
@@ -15,12 +15,12 @@
 
 // TODO(tlegrand): Change constant input pointers in all functions to constant
 // references, where appropriate.
-#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
+#include "webrtc/modules/audio_coding/acm2/acm_codec_database.h"
 
 #include <assert.h>
 
 #include "webrtc/base/checks.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
 #include "webrtc/system_wrappers/include/trace.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h b/webrtc/modules/audio_coding/acm2/acm_codec_database.h
similarity index 91%
rename from webrtc/modules/audio_coding/main/acm2/acm_codec_database.h
rename to webrtc/modules/audio_coding/acm2/acm_codec_database.h
index f9adda0..9e87238 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h
+++ b/webrtc/modules/audio_coding/acm2/acm_codec_database.h
@@ -13,12 +13,12 @@
  * codecs.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CODEC_DATABASE_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CODEC_DATABASE_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_CODEC_DATABASE_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_CODEC_DATABASE_H_
 
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
 
 namespace webrtc {
@@ -80,4 +80,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CODEC_DATABASE_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_CODEC_DATABASE_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_common_defs.h b/webrtc/modules/audio_coding/acm2/acm_common_defs.h
similarity index 81%
rename from webrtc/modules/audio_coding/main/acm2/acm_common_defs.h
rename to webrtc/modules/audio_coding/acm2/acm_common_defs.h
index 23e3519..483bdd9 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_common_defs.h
+++ b/webrtc/modules/audio_coding/acm2/acm_common_defs.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_COMMON_DEFS_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_COMMON_DEFS_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_COMMON_DEFS_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_COMMON_DEFS_H_
 
 #include "webrtc/engine_configurations.h"
 
@@ -29,4 +29,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_COMMON_DEFS_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_COMMON_DEFS_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_neteq_unittest.cc b/webrtc/modules/audio_coding/acm2/acm_neteq_unittest.cc
similarity index 100%
rename from webrtc/modules/audio_coding/main/acm2/acm_neteq_unittest.cc
rename to webrtc/modules/audio_coding/acm2/acm_neteq_unittest.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc b/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
rename to webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
index fdcfdfc..bb83e77 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
@@ -8,13 +8,13 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h"
+#include "webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h"
 
 #include <assert.h>
 #include <stdio.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h b/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h
similarity index 92%
rename from webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
rename to webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h
index 0b5671f..091513d 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h
+++ b/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/scoped_ptr.h"
@@ -91,4 +91,4 @@
 
 }  // namespace test
 }  // namespace webrtc
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVE_TEST_OLDAPI_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc b/webrtc/modules/audio_coding/acm2/acm_receiver.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
rename to webrtc/modules/audio_coding/acm2/acm_receiver.cc
index 6c28933..036877c 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
+#include "webrtc/modules/audio_coding/acm2/acm_receiver.h"
 
 #include <stdlib.h>  // malloc
 
@@ -21,8 +21,8 @@
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
-#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
+#include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
+#include "webrtc/modules/audio_coding/acm2/call_statistics.h"
 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
 #include "webrtc/system_wrappers/include/clock.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h b/webrtc/modules/audio_coding/acm2/acm_receiver.h
similarity index 95%
rename from webrtc/modules/audio_coding/main/acm2/acm_receiver.h
rename to webrtc/modules/audio_coding/acm2/acm_receiver.h
index bcedacd..d5a644d 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_
 
 #include <map>
 #include <vector>
@@ -20,10 +20,10 @@
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_audio/vad/include/webrtc_vad.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
-#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
-#include "webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
+#include "webrtc/modules/audio_coding/acm2/call_statistics.h"
+#include "webrtc/modules/audio_coding/acm2/initial_delay_manager.h"
 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
 #include "webrtc/modules/include/module_common_types.h"
 #include "webrtc/typedefs.h"
@@ -302,4 +302,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RECEIVER_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
rename to webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc
index 8f43ac4..8076687 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver_unittest_oldapi.cc
@@ -8,14 +8,14 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
+#include "webrtc/modules/audio_coding/acm2/acm_receiver.h"
 
 #include <algorithm>  // std::min
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
 #include "webrtc/system_wrappers/include/clock.h"
 #include "webrtc/test/test_suite.h"
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc b/webrtc/modules/audio_coding/acm2/acm_resampler.cc
similarity index 96%
rename from webrtc/modules/audio_coding/main/acm2/acm_resampler.cc
rename to webrtc/modules/audio_coding/acm2/acm_resampler.cc
index cbcad85..e38cd94 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_resampler.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
+#include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
 
 #include <assert.h>
 #include <string.h>
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_resampler.h b/webrtc/modules/audio_coding/acm2/acm_resampler.h
similarity index 83%
rename from webrtc/modules/audio_coding/main/acm2/acm_resampler.h
rename to webrtc/modules/audio_coding/acm2/acm_resampler.h
index a19b0c4..700fefa 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_resampler.h
+++ b/webrtc/modules/audio_coding/acm2/acm_resampler.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RESAMPLER_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RESAMPLER_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RESAMPLER_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RESAMPLER_H_
 
 #include "webrtc/common_audio/resampler/include/push_resampler.h"
 #include "webrtc/typedefs.h"
@@ -36,4 +36,4 @@
 }  // namespace acm2
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RESAMPLER_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_RESAMPLER_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc b/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc
rename to webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.cc
index ac38dc0..3a89a77 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h"
+#include "webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h"
 
 #include <assert.h>
 #include <stdio.h>
@@ -17,7 +17,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
 
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h b/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h
similarity index 91%
rename from webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
rename to webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h
index 3e65ec6..ce68196 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h
+++ b/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h
@@ -8,14 +8,14 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_
 
 #include <vector>
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet_source.h"
 #include "webrtc/system_wrappers/include/clock.h"
 
@@ -88,4 +88,4 @@
 
 }  // namespace test
 }  // namespace webrtc
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SEND_TEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_ACM_SEND_TEST_OLDAPI_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
similarity index 92%
rename from webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc
rename to webrtc/modules/audio_coding/acm2/audio_coding_module.cc
index 889d620..034de32 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
@@ -8,12 +8,12 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 
 #include "webrtc/base/checks.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
 #include "webrtc/system_wrappers/include/clock.h"
 #include "webrtc/system_wrappers/include/trace.h"
 
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
rename to webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc
index 5d18bda..5f61ef6 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h"
+#include "webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h"
 
 #include <assert.h>
 #include <stdlib.h>
@@ -17,10 +17,10 @@
 #include "webrtc/base/checks.h"
 #include "webrtc/base/safe_conversions.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
-#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
+#include "webrtc/modules/audio_coding/acm2/call_statistics.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/include/logging.h"
 #include "webrtc/system_wrappers/include/metrics.h"
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
similarity index 95%
rename from webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h
rename to webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
index c04ccf9..6006c68 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_AUDIO_CODING_MODULE_IMPL_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_AUDIO_CODING_MODULE_IMPL_H_
 
 #include <vector>
 
@@ -18,9 +18,9 @@
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_receiver.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
-#include "webrtc/modules/audio_coding/main/acm2/codec_manager.h"
+#include "webrtc/modules/audio_coding/acm2/acm_receiver.h"
+#include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
+#include "webrtc/modules/audio_coding/acm2/codec_manager.h"
 
 namespace webrtc {
 
@@ -277,4 +277,4 @@
 }  // namespace acm2
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_AUDIO_CODING_MODULE_IMPL_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
similarity index 99%
rename from webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
rename to webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
index f14dcf3..39c14a8 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
@@ -21,10 +21,10 @@
 #include "webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h"
 #include "webrtc/modules/audio_coding/codecs/isac/main/include/audio_encoder_isac.h"
 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_send_test_oldapi.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.h"
+#include "webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h"
 #include "webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h"
 #include "webrtc/modules/audio_coding/neteq/tools/audio_checksum.h"
diff --git a/webrtc/modules/audio_coding/main/acm2/call_statistics.cc b/webrtc/modules/audio_coding/acm2/call_statistics.cc
similarity index 95%
rename from webrtc/modules/audio_coding/main/acm2/call_statistics.cc
rename to webrtc/modules/audio_coding/acm2/call_statistics.cc
index 4c3e9fc..4441932 100644
--- a/webrtc/modules/audio_coding/main/acm2/call_statistics.cc
+++ b/webrtc/modules/audio_coding/acm2/call_statistics.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
+#include "webrtc/modules/audio_coding/acm2/call_statistics.h"
 
 #include <assert.h>
 
diff --git a/webrtc/modules/audio_coding/main/acm2/call_statistics.h b/webrtc/modules/audio_coding/acm2/call_statistics.h
similarity index 90%
rename from webrtc/modules/audio_coding/main/acm2/call_statistics.h
rename to webrtc/modules/audio_coding/acm2/call_statistics.h
index e2df921..888afea 100644
--- a/webrtc/modules/audio_coding/main/acm2/call_statistics.h
+++ b/webrtc/modules/audio_coding/acm2/call_statistics.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CALL_STATISTICS_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CALL_STATISTICS_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_CALL_STATISTICS_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_CALL_STATISTICS_H_
 
 #include "webrtc/common_types.h"
 #include "webrtc/modules/include/module_common_types.h"
@@ -60,4 +60,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CALL_STATISTICS_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_CALL_STATISTICS_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/call_statistics_unittest.cc b/webrtc/modules/audio_coding/acm2/call_statistics_unittest.cc
similarity index 95%
rename from webrtc/modules/audio_coding/main/acm2/call_statistics_unittest.cc
rename to webrtc/modules/audio_coding/acm2/call_statistics_unittest.cc
index 2bee964..9ba0774 100644
--- a/webrtc/modules/audio_coding/main/acm2/call_statistics_unittest.cc
+++ b/webrtc/modules/audio_coding/acm2/call_statistics_unittest.cc
@@ -9,7 +9,7 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/audio_coding/main/acm2/call_statistics.h"
+#include "webrtc/modules/audio_coding/acm2/call_statistics.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_manager.cc b/webrtc/modules/audio_coding/acm2/codec_manager.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/codec_manager.cc
rename to webrtc/modules/audio_coding/acm2/codec_manager.cc
index 7796786..a5a9e09 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
+++ b/webrtc/modules/audio_coding/acm2/codec_manager.cc
@@ -8,11 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/codec_manager.h"
+#include "webrtc/modules/audio_coding/acm2/codec_manager.h"
 
 #include "webrtc/base/checks.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
 #include "webrtc/system_wrappers/include/trace.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_manager.h b/webrtc/modules/audio_coding/acm2/codec_manager.h
similarity index 86%
rename from webrtc/modules/audio_coding/main/acm2/codec_manager.h
rename to webrtc/modules/audio_coding/acm2/codec_manager.h
index 7670bbd..61832e4 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_manager.h
+++ b/webrtc/modules/audio_coding/acm2/codec_manager.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_CODEC_MANAGER_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_CODEC_MANAGER_H_
 
 #include <map>
 
@@ -17,8 +17,8 @@
 #include "webrtc/base/optional.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_checker.h"
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
 #include "webrtc/common_types.h"
 
 namespace webrtc {
@@ -78,4 +78,4 @@
 
 }  // namespace acm2
 }  // namespace webrtc
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_CODEC_MANAGER_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_CODEC_MANAGER_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_manager_unittest.cc b/webrtc/modules/audio_coding/acm2/codec_manager_unittest.cc
similarity index 96%
rename from webrtc/modules/audio_coding/main/acm2/codec_manager_unittest.cc
rename to webrtc/modules/audio_coding/acm2/codec_manager_unittest.cc
index e930ca1..c09f256 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_manager_unittest.cc
+++ b/webrtc/modules/audio_coding/acm2/codec_manager_unittest.cc
@@ -10,7 +10,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
-#include "webrtc/modules/audio_coding/main/acm2/codec_manager.h"
+#include "webrtc/modules/audio_coding/acm2/codec_manager.h"
 
 namespace webrtc {
 namespace acm2 {
diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc b/webrtc/modules/audio_coding/acm2/initial_delay_manager.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc
rename to webrtc/modules/audio_coding/acm2/initial_delay_manager.cc
index 786fb2e..0c31b83 100644
--- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc
+++ b/webrtc/modules/audio_coding/acm2/initial_delay_manager.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h"
+#include "webrtc/modules/audio_coding/acm2/initial_delay_manager.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h b/webrtc/modules/audio_coding/acm2/initial_delay_manager.h
similarity index 94%
rename from webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h
rename to webrtc/modules/audio_coding/acm2/initial_delay_manager.h
index 6b50dd0..32dd126 100644
--- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h
+++ b/webrtc/modules/audio_coding/acm2/initial_delay_manager.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_INITIAL_DELAY_MANAGER_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_INITIAL_DELAY_MANAGER_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_INITIAL_DELAY_MANAGER_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_INITIAL_DELAY_MANAGER_H_
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/include/module_common_types.h"
@@ -117,4 +117,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_INITIAL_DELAY_MANAGER_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_INITIAL_DELAY_MANAGER_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc b/webrtc/modules/audio_coding/acm2/initial_delay_manager_unittest.cc
similarity index 99%
rename from webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
rename to webrtc/modules/audio_coding/acm2/initial_delay_manager_unittest.cc
index e973593..d86d221 100644
--- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc
+++ b/webrtc/modules/audio_coding/acm2/initial_delay_manager_unittest.cc
@@ -11,7 +11,7 @@
 #include <string.h>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h"
+#include "webrtc/modules/audio_coding/acm2/initial_delay_manager.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc b/webrtc/modules/audio_coding/acm2/rent_a_codec.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc
rename to webrtc/modules/audio_coding/acm2/rent_a_codec.cc
index 229d367..4800249 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc
+++ b/webrtc/modules/audio_coding/acm2/rent_a_codec.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
 
 #include "webrtc/base/logging.h"
 #include "webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h"
@@ -34,8 +34,8 @@
 #ifdef WEBRTC_CODEC_RED
 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h"
 #endif
-#include "webrtc/modules/audio_coding/main/acm2/acm_codec_database.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/acm2/acm_codec_database.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
 
 namespace webrtc {
 namespace acm2 {
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h b/webrtc/modules/audio_coding/acm2/rent_a_codec.h
similarity index 96%
rename from webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
rename to webrtc/modules/audio_coding/acm2/rent_a_codec.h
index 45d46bb..7035104 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
+++ b/webrtc/modules/audio_coding/acm2/rent_a_codec.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_RENT_A_CODEC_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_RENT_A_CODEC_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_
+#define WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_
 
 #include <stddef.h>
 #include <map>
@@ -20,7 +20,7 @@
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
 #include "webrtc/typedefs.h"
 
 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
@@ -246,4 +246,4 @@
 }  // namespace acm2
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_RENT_A_CODEC_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_ACM2_RENT_A_CODEC_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc b/webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc
rename to webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc
index ae6c98b..11c4bcb 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec_unittest.cc
+++ b/webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc
@@ -11,7 +11,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/arraysize.h"
 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h"
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
 
 namespace webrtc {
 namespace acm2 {
diff --git a/webrtc/modules/audio_coding/audio_coding.gypi b/webrtc/modules/audio_coding/audio_coding.gypi
index bc3c48d..abdb1915 100644
--- a/webrtc/modules/audio_coding/audio_coding.gypi
+++ b/webrtc/modules/audio_coding/audio_coding.gypi
@@ -19,12 +19,195 @@
     'codecs/isac/isacfix.gypi',
     'codecs/pcm16b/pcm16b.gypi',
     'codecs/red/red.gypi',
-    'main/audio_coding_module.gypi',
     'neteq/neteq.gypi',
   ],
+  'variables': {
+    'audio_coding_dependencies': [
+      'cng',
+      'g711',
+      'pcm16b',
+      '<(webrtc_root)/common.gyp:webrtc_common',
+      '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
+      '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
+    ],
+    'audio_coding_defines': [],
+    'conditions': [
+      ['include_opus==1', {
+        'audio_coding_dependencies': ['webrtc_opus',],
+        'audio_coding_defines': ['WEBRTC_CODEC_OPUS',],
+      }],
+      ['build_with_mozilla==0', {
+        'conditions': [
+          ['target_arch=="arm"', {
+            'audio_coding_dependencies': ['isac_fix',],
+            'audio_coding_defines': ['WEBRTC_CODEC_ISACFX',],
+          }, {
+            'audio_coding_dependencies': ['isac',],
+            'audio_coding_defines': ['WEBRTC_CODEC_ISAC',],
+          }],
+        ],
+        'audio_coding_dependencies': ['g722',],
+        'audio_coding_defines': ['WEBRTC_CODEC_G722',],
+      }],
+      ['build_with_mozilla==0 and build_with_chromium==0', {
+        'audio_coding_dependencies': ['ilbc', 'red',],
+        'audio_coding_defines': ['WEBRTC_CODEC_ILBC', 'WEBRTC_CODEC_RED',],
+      }],
+    ],
+  },
+  'targets': [
+    {
+      'target_name': 'rent_a_codec',
+      'type': 'static_library',
+      'defines': [
+        '<@(audio_coding_defines)',
+      ],
+      'dependencies': [
+        '<(webrtc_root)/common.gyp:webrtc_common',
+      ],
+      'include_dirs': [
+        '<(webrtc_root)',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '<(webrtc_root)',
+        ],
+      },
+      'sources': [
+        'acm2/acm_codec_database.cc',
+        'acm2/acm_codec_database.h',
+        'acm2/rent_a_codec.cc',
+        'acm2/rent_a_codec.h',
+      ],
+    },
+    {
+      'target_name': 'audio_coding_module',
+      'type': 'static_library',
+      'defines': [
+        '<@(audio_coding_defines)',
+      ],
+      'dependencies': [
+        '<@(audio_coding_dependencies)',
+        '<(webrtc_root)/common.gyp:webrtc_common',
+        '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+        'neteq',
+        'rent_a_codec',
+      ],
+      'include_dirs': [
+        'include',
+        '../include',
+        '<(webrtc_root)',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          'include',
+          '../include',
+          '<(webrtc_root)',
+        ],
+      },
+      'conditions': [
+        ['include_opus==1', {
+          'export_dependent_settings': ['webrtc_opus'],
+        }],
+      ],
+      'sources': [
+        'acm2/acm_common_defs.h',
+        'acm2/acm_receiver.cc',
+        'acm2/acm_receiver.h',
+        'acm2/acm_resampler.cc',
+        'acm2/acm_resampler.h',
+        'acm2/audio_coding_module.cc',
+        'acm2/audio_coding_module_impl.cc',
+        'acm2/audio_coding_module_impl.h',
+        'acm2/call_statistics.cc',
+        'acm2/call_statistics.h',
+        'acm2/codec_manager.cc',
+        'acm2/codec_manager.h',
+        'acm2/initial_delay_manager.cc',
+        'acm2/initial_delay_manager.h',
+        'include/audio_coding_module.h',
+        'include/audio_coding_module_typedefs.h',
+      ],
+    },
+  ],
   'conditions': [
     ['include_opus==1', {
       'includes': ['codecs/opus/opus.gypi',],
     }],
+    ['include_tests==1', {
+      'targets': [
+        {
+          'target_name': 'acm_receive_test',
+          'type': 'static_library',
+          'defines': [
+            '<@(audio_coding_defines)',
+          ],
+          'dependencies': [
+            '<@(audio_coding_dependencies)',
+            'audio_coding_module',
+            'neteq_unittest_tools',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+          ],
+          'sources': [
+            'acm2/acm_receive_test_oldapi.cc',
+            'acm2/acm_receive_test_oldapi.h',
+          ],
+        }, # acm_receive_test
+        {
+          'target_name': 'acm_send_test',
+          'type': 'static_library',
+          'defines': [
+            '<@(audio_coding_defines)',
+          ],
+          'dependencies': [
+            '<@(audio_coding_dependencies)',
+            'audio_coding_module',
+            'neteq_unittest_tools',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+          ],
+          'sources': [
+            'acm2/acm_send_test_oldapi.cc',
+            'acm2/acm_send_test_oldapi.h',
+          ],
+        }, # acm_send_test
+        {
+          'target_name': 'delay_test',
+          'type': 'executable',
+          'dependencies': [
+            'audio_coding_module',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/common.gyp:webrtc_common',
+            '<(webrtc_root)/test/test.gyp:test_support',
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
+            '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
+          ],
+          'sources': [
+             'test/delay_test.cc',
+             'test/Channel.cc',
+             'test/PCMFile.cc',
+             'test/utility.cc',
+           ],
+        }, # delay_test
+        {
+          'target_name': 'insert_packet_with_timing',
+          'type': 'executable',
+          'dependencies': [
+            'audio_coding_module',
+            '<(DEPTH)/testing/gtest.gyp:gtest',
+            '<(webrtc_root)/common.gyp:webrtc_common',
+            '<(webrtc_root)/test/test.gyp:test_support',
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
+            '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
+          ],
+          'sources': [
+             'test/insert_packet_with_timing.cc',
+             'test/Channel.cc',
+             'test/PCMFile.cc',
+           ],
+        }, # delay_test
+      ],
+    }],
   ],
 }
diff --git a/webrtc/modules/audio_coding/include/audio_coding_module.h b/webrtc/modules/audio_coding/include/audio_coding_module.h
new file mode 100644
index 0000000..844bd57
--- /dev/null
+++ b/webrtc/modules/audio_coding/include/audio_coding_module.h
@@ -0,0 +1,741 @@
+/*
+ *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
+#define WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
+
+#include <vector>
+
+#include "webrtc/base/optional.h"
+#include "webrtc/common_types.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/neteq/include/neteq.h"
+#include "webrtc/modules/include/module.h"
+#include "webrtc/system_wrappers/include/clock.h"
+#include "webrtc/typedefs.h"
+
+namespace webrtc {
+
+// forward declarations
+struct CodecInst;
+struct WebRtcRTPHeader;
+class AudioDecoder;
+class AudioEncoder;
+class AudioFrame;
+class RTPFragmentationHeader;
+
+#define WEBRTC_10MS_PCM_AUDIO 960  // 16 bits super wideband 48 kHz
+
+// Callback class used for sending data ready to be packetized
+class AudioPacketizationCallback {
+ public:
+  virtual ~AudioPacketizationCallback() {}
+
+  virtual int32_t SendData(FrameType frame_type,
+                           uint8_t payload_type,
+                           uint32_t timestamp,
+                           const uint8_t* payload_data,
+                           size_t payload_len_bytes,
+                           const RTPFragmentationHeader* fragmentation) = 0;
+};
+
+// Callback class used for reporting VAD decision
+class ACMVADCallback {
+ public:
+  virtual ~ACMVADCallback() {}
+
+  virtual int32_t InFrameType(FrameType frame_type) = 0;
+};
+
+class AudioCodingModule {
+ protected:
+  AudioCodingModule() {}
+
+ public:
+  struct Config {
+    Config() : id(0), neteq_config(), clock(Clock::GetRealTimeClock()) {
+      // Post-decode VAD is disabled by default in NetEq, however, Audio
+      // Conference Mixer relies on VAD decisions and fails without them.
+      neteq_config.enable_post_decode_vad = true;
+    }
+
+    int id;
+    NetEq::Config neteq_config;
+    Clock* clock;
+  };
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Creation and destruction of a ACM.
+  //
+  // The second method is used for testing where a simulated clock can be
+  // injected into ACM. ACM will take the ownership of the object clock and
+  // delete it when destroyed.
+  //
+  static AudioCodingModule* Create(int id);
+  static AudioCodingModule* Create(int id, Clock* clock);
+  static AudioCodingModule* Create(const Config& config);
+  virtual ~AudioCodingModule() = default;
+
+  ///////////////////////////////////////////////////////////////////////////
+  //   Utility functions
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // uint8_t NumberOfCodecs()
+  // Returns number of supported codecs.
+  //
+  // Return value:
+  //   number of supported codecs.
+  ///
+  static int NumberOfCodecs();
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t Codec()
+  // Get supported codec with list number.
+  //
+  // Input:
+  //   -list_id             : list number.
+  //
+  // Output:
+  //   -codec              : a structure where the parameters of the codec,
+  //                         given by list number is written to.
+  //
+  // Return value:
+  //   -1 if the list number (list_id) is invalid.
+  //    0 if succeeded.
+  //
+  static int Codec(int list_id, CodecInst* codec);
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t Codec()
+  // Get supported codec with the given codec name, sampling frequency, and
+  // a given number of channels.
+  //
+  // Input:
+  //   -payload_name       : name of the codec.
+  //   -sampling_freq_hz   : sampling frequency of the codec. Note! for RED
+  //                         a sampling frequency of -1 is a valid input.
+  //   -channels           : number of channels ( 1 - mono, 2 - stereo).
+  //
+  // Output:
+  //   -codec              : a structure where the function returns the
+  //                         default parameters of the codec.
+  //
+  // Return value:
+  //   -1 if no codec matches the given parameters.
+  //    0 if succeeded.
+  //
+  static int Codec(const char* payload_name, CodecInst* codec,
+                       int sampling_freq_hz, int channels);
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t Codec()
+  //
+  // Returns the list number of the given codec name, sampling frequency, and
+  // a given number of channels.
+  //
+  // Input:
+  //   -payload_name        : name of the codec.
+  //   -sampling_freq_hz    : sampling frequency of the codec. Note! for RED
+  //                          a sampling frequency of -1 is a valid input.
+  //   -channels            : number of channels ( 1 - mono, 2 - stereo).
+  //
+  // Return value:
+  //   if the codec is found, the index of the codec in the list,
+  //   -1 if the codec is not found.
+  //
+  static int Codec(const char* payload_name, int sampling_freq_hz,
+                             int channels);
+
+  ///////////////////////////////////////////////////////////////////////////
+  // bool IsCodecValid()
+  // Checks the validity of the parameters of the given codec.
+  //
+  // Input:
+  //   -codec              : the structure which keeps the parameters of the
+  //                         codec.
+  //
+  // Return value:
+  //   true if the parameters are valid,
+  //   false if any parameter is not valid.
+  //
+  static bool IsCodecValid(const CodecInst& codec);
+
+  ///////////////////////////////////////////////////////////////////////////
+  //   Sender
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t RegisterSendCodec()
+  // Registers a codec, specified by |send_codec|, as sending codec.
+  // This API can be called multiple of times to register Codec. The last codec
+  // registered overwrites the previous ones.
+  // The API can also be used to change payload type for CNG and RED, which are
+  // registered by default to default payload types.
+  // Note that registering CNG and RED won't overwrite speech codecs.
+  // This API can be called to set/change the send payload-type, frame-size
+  // or encoding rate (if applicable for the codec).
+  //
+  // Note: If a stereo codec is registered as send codec, VAD/DTX will
+  // automatically be turned off, since it is not supported for stereo sending.
+  //
+  // Note: If a secondary encoder is already registered, and the new send-codec
+  // has a sampling rate that does not match the secondary encoder, the
+  // secondary encoder will be unregistered.
+  //
+  // Input:
+  //   -send_codec         : Parameters of the codec to be registered, c.f.
+  //                         common_types.h for the definition of
+  //                         CodecInst.
+  //
+  // Return value:
+  //   -1 if failed to initialize,
+  //    0 if succeeded.
+  //
+  virtual int32_t RegisterSendCodec(const CodecInst& send_codec) = 0;
+
+  // Registers |external_speech_encoder| as encoder. The new encoder will
+  // replace any previously registered speech encoder (internal or external).
+  virtual void RegisterExternalSendCodec(
+      AudioEncoder* external_speech_encoder) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t SendCodec()
+  // Get parameters for the codec currently registered as send codec.
+  //
+  // Return value:
+  //   The send codec, or nothing if we don't have one
+  //
+  virtual rtc::Optional<CodecInst> SendCodec() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t SendFrequency()
+  // Get the sampling frequency of the current encoder in Hertz.
+  //
+  // Return value:
+  //   positive; sampling frequency [Hz] of the current encoder.
+  //   -1 if an error has happened.
+  //
+  virtual int32_t SendFrequency() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // Sets the bitrate to the specified value in bits/sec. If the value is not
+  // supported by the codec, it will choose another appropriate value.
+  virtual void SetBitRate(int bitrate_bps) = 0;
+
+  // int32_t RegisterTransportCallback()
+  // Register a transport callback which will be called to deliver
+  // the encoded buffers whenever Process() is called and a
+  // bit-stream is ready.
+  //
+  // Input:
+  //   -transport          : pointer to the callback class
+  //                         transport->SendData() is called whenever
+  //                         Process() is called and bit-stream is ready
+  //                         to deliver.
+  //
+  // Return value:
+  //   -1 if the transport callback could not be registered
+  //    0 if registration is successful.
+  //
+  virtual int32_t RegisterTransportCallback(
+      AudioPacketizationCallback* transport) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t Add10MsData()
+  // Add 10MS of raw (PCM) audio data and encode it. If the sampling
+  // frequency of the audio does not match the sampling frequency of the
+  // current encoder ACM will resample the audio. If an encoded packet was
+  // produced, it will be delivered via the callback object registered using
+  // RegisterTransportCallback, and the return value from this function will
+  // be the number of bytes encoded.
+  //
+  // Input:
+  //   -audio_frame        : the input audio frame, containing raw audio
+  //                         sampling frequency etc.,
+  //                         c.f. module_common_types.h for definition of
+  //                         AudioFrame.
+  //
+  // Return value:
+  //   >= 0   number of bytes encoded.
+  //     -1   some error occurred.
+  //
+  virtual int32_t Add10MsData(const AudioFrame& audio_frame) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // (RED) Redundant Coding
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t SetREDStatus()
+  // configure RED status i.e. on/off.
+  //
+  // RFC 2198 describes a solution which has a single payload type which
+  // signifies a packet with redundancy. That packet then becomes a container,
+  // encapsulating multiple payloads into a single RTP packet.
+  // Such a scheme is flexible, since any amount of redundancy may be
+  // encapsulated within a single packet.  There is, however, a small overhead
+  // since each encapsulated payload must be preceded by a header indicating
+  // the type of data enclosed.
+  //
+  // Input:
+  //   -enable_red         : if true RED is enabled, otherwise RED is
+  //                         disabled.
+  //
+  // Return value:
+  //   -1 if failed to set RED status,
+  //    0 if succeeded.
+  //
+  virtual int32_t SetREDStatus(bool enable_red) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // bool REDStatus()
+  // Get RED status
+  //
+  // Return value:
+  //   true if RED is enabled,
+  //   false if RED is disabled.
+  //
+  virtual bool REDStatus() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // (FEC) Forward Error Correction (codec internal)
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t SetCodecFEC()
+  // Configures codec internal FEC status i.e. on/off. No effects on codecs that
+  // do not provide internal FEC.
+  //
+  // Input:
+  //   -enable_fec         : if true FEC will be enabled otherwise the FEC is
+  //                         disabled.
+  //
+  // Return value:
+  //   -1 if failed, or the codec does not support FEC
+  //    0 if succeeded.
+  //
+  virtual int SetCodecFEC(bool enable_codec_fec) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // bool CodecFEC()
+  // Gets status of codec internal FEC.
+  //
+  // Return value:
+  //   true if FEC is enabled,
+  //   false if FEC is disabled.
+  //
+  virtual bool CodecFEC() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int SetPacketLossRate()
+  // Sets expected packet loss rate for encoding. Some encoders provide packet
+  // loss gnostic encoding to make stream less sensitive to packet losses,
+  // through e.g., FEC. No effects on codecs that do not provide such encoding.
+  //
+  // Input:
+  //   -packet_loss_rate   : expected packet loss rate (0 -- 100 inclusive).
+  //
+  // Return value
+  //   -1 if failed to set packet loss rate,
+  //   0 if succeeded.
+  //
+  virtual int SetPacketLossRate(int packet_loss_rate) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  //   (VAD) Voice Activity Detection
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t SetVAD()
+  // If DTX is enabled & the codec does not have internal DTX/VAD
+  // WebRtc VAD will be automatically enabled and |enable_vad| is ignored.
+  //
+  // If DTX is disabled but VAD is enabled no DTX packets are send,
+  // regardless of whether the codec has internal DTX/VAD or not. In this
+  // case, WebRtc VAD is running to label frames as active/in-active.
+  //
+  // NOTE! VAD/DTX is not supported when sending stereo.
+  //
+  // Inputs:
+  //   -enable_dtx         : if true DTX is enabled,
+  //                         otherwise DTX is disabled.
+  //   -enable_vad         : if true VAD is enabled,
+  //                         otherwise VAD is disabled.
+  //   -vad_mode           : determines the aggressiveness of VAD. A more
+  //                         aggressive mode results in more frames labeled
+  //                         as in-active, c.f. definition of
+  //                         ACMVADMode in audio_coding_module_typedefs.h
+  //                         for valid values.
+  //
+  // Return value:
+  //   -1 if failed to set up VAD/DTX,
+  //    0 if succeeded.
+  //
+  virtual int32_t SetVAD(const bool enable_dtx = true,
+                               const bool enable_vad = false,
+                               const ACMVADMode vad_mode = VADNormal) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t VAD()
+  // Get VAD status.
+  //
+  // Outputs:
+  //   -dtx_enabled        : is set to true if DTX is enabled, otherwise
+  //                         is set to false.
+  //   -vad_enabled        : is set to true if VAD is enabled, otherwise
+  //                         is set to false.
+  //   -vad_mode            : is set to the current aggressiveness of VAD.
+  //
+  // Return value:
+  //   -1 if fails to retrieve the setting of DTX/VAD,
+  //    0 if succeeded.
+  //
+  virtual int32_t VAD(bool* dtx_enabled, bool* vad_enabled,
+                            ACMVADMode* vad_mode) const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t RegisterVADCallback()
+  // Call this method to register a callback function which is called
+  // any time that ACM encounters an empty frame. That is a frame which is
+  // recognized inactive. Depending on the codec WebRtc VAD or internal codec
+  // VAD is employed to identify a frame as active/inactive.
+  //
+  // Input:
+  //   -vad_callback        : pointer to a callback function.
+  //
+  // Return value:
+  //   -1 if failed to register the callback function.
+  //    0 if the callback function is registered successfully.
+  //
+  virtual int32_t RegisterVADCallback(ACMVADCallback* vad_callback) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  //   Receiver
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t InitializeReceiver()
+  // Any decoder-related state of ACM will be initialized to the
+  // same state when ACM is created. This will not interrupt or
+  // effect encoding functionality of ACM. ACM would lose all the
+  // decoding-related settings by calling this function.
+  // For instance, all registered codecs are deleted and have to be
+  // registered again.
+  //
+  // Return value:
+  //   -1 if failed to initialize,
+  //    0 if succeeded.
+  //
+  virtual int32_t InitializeReceiver() = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t ReceiveFrequency()
+  // Get sampling frequency of the last received payload.
+  //
+  // Return value:
+  //   non-negative the sampling frequency in Hertz.
+  //   -1 if an error has occurred.
+  //
+  virtual int32_t ReceiveFrequency() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t PlayoutFrequency()
+  // Get sampling frequency of audio played out.
+  //
+  // Return value:
+  //   the sampling frequency in Hertz.
+  //
+  virtual int32_t PlayoutFrequency() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t RegisterReceiveCodec()
+  // Register possible decoders, can be called multiple times for
+  // codecs, CNG-NB, CNG-WB, CNG-SWB, AVT and RED.
+  //
+  // Input:
+  //   -receive_codec      : parameters of the codec to be registered, c.f.
+  //                         common_types.h for the definition of
+  //                         CodecInst.
+  //
+  // Return value:
+  //   -1 if failed to register the codec
+  //    0 if the codec registered successfully.
+  //
+  virtual int RegisterReceiveCodec(const CodecInst& receive_codec) = 0;
+
+  virtual int RegisterExternalReceiveCodec(int rtp_payload_type,
+                                           AudioDecoder* external_decoder,
+                                           int sample_rate_hz,
+                                           int num_channels) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t UnregisterReceiveCodec()
+  // Unregister the codec currently registered with a specific payload type
+  // from the list of possible receive codecs.
+  //
+  // Input:
+  //   -payload_type        : The number representing the payload type to
+  //                         unregister.
+  //
+  // Output:
+  //   -1 if fails to unregister.
+  //    0 if the given codec is successfully unregistered.
+  //
+  virtual int UnregisterReceiveCodec(
+      uint8_t payload_type) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t ReceiveCodec()
+  // Get the codec associated with last received payload.
+  //
+  // Output:
+  //   -curr_receive_codec : parameters of the codec associated with the last
+  //                         received payload, c.f. common_types.h for
+  //                         the definition of CodecInst.
+  //
+  // Return value:
+  //   -1 if failed to retrieve the codec,
+  //    0 if the codec is successfully retrieved.
+  //
+  virtual int32_t ReceiveCodec(CodecInst* curr_receive_codec) const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t IncomingPacket()
+  // Call this function to insert a parsed RTP packet into ACM.
+  //
+  // Inputs:
+  //   -incoming_payload   : received payload.
+  //   -payload_len_bytes  : the length of payload in bytes.
+  //   -rtp_info           : the relevant information retrieved from RTP
+  //                         header.
+  //
+  // Return value:
+  //   -1 if failed to push in the payload
+  //    0 if payload is successfully pushed in.
+  //
+  virtual int32_t IncomingPacket(const uint8_t* incoming_payload,
+                                 const size_t payload_len_bytes,
+                                 const WebRtcRTPHeader& rtp_info) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t IncomingPayload()
+  // Call this API to push incoming payloads when there is no rtp-info.
+  // The rtp-info will be created in ACM. One usage for this API is when
+  // pre-encoded files are pushed in ACM
+  //
+  // Inputs:
+  //   -incoming_payload   : received payload.
+  //   -payload_len_byte   : the length, in bytes, of the received payload.
+  //   -payload_type       : the payload-type. This specifies which codec has
+  //                         to be used to decode the payload.
+  //   -timestamp          : send timestamp of the payload. ACM starts with
+  //                         a random value and increment it by the
+  //                         packet-size, which is given when the codec in
+  //                         question is registered by RegisterReceiveCodec().
+  //                         Therefore, it is essential to have the timestamp
+  //                         if the frame-size differ from the registered
+  //                         value or if the incoming payload contains DTX
+  //                         packets.
+  //
+  // Return value:
+  //   -1 if failed to push in the payload
+  //    0 if payload is successfully pushed in.
+  //
+  virtual int32_t IncomingPayload(const uint8_t* incoming_payload,
+                                  const size_t payload_len_byte,
+                                  const uint8_t payload_type,
+                                  const uint32_t timestamp = 0) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int SetMinimumPlayoutDelay()
+  // Set a minimum for the playout delay, used for lip-sync. NetEq maintains
+  // such a delay unless channel condition yields to a higher delay.
+  //
+  // Input:
+  //   -time_ms            : minimum delay in milliseconds.
+  //
+  // Return value:
+  //   -1 if failed to set the delay,
+  //    0 if the minimum delay is set.
+  //
+  virtual int SetMinimumPlayoutDelay(int time_ms) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int SetMaximumPlayoutDelay()
+  // Set a maximum for the playout delay
+  //
+  // Input:
+  //   -time_ms            : maximum delay in milliseconds.
+  //
+  // Return value:
+  //   -1 if failed to set the delay,
+  //    0 if the maximum delay is set.
+  //
+  virtual int SetMaximumPlayoutDelay(int time_ms) = 0;
+
+  //
+  // The shortest latency, in milliseconds, required by jitter buffer. This
+  // is computed based on inter-arrival times and playout mode of NetEq. The
+  // actual delay is the maximum of least-required-delay and the minimum-delay
+  // specified by SetMinumumPlayoutDelay() API.
+  //
+  virtual int LeastRequiredDelayMs() const = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t PlayoutTimestamp()
+  // The send timestamp of an RTP packet is associated with the decoded
+  // audio of the packet in question. This function returns the timestamp of
+  // the latest audio obtained by calling PlayoutData10ms().
+  //
+  // Input:
+  //   -timestamp          : a reference to a uint32_t to receive the
+  //                         timestamp.
+  // Return value:
+  //    0 if the output is a correct timestamp.
+  //   -1 if failed to output the correct timestamp.
+  //
+  // TODO(tlegrand): Change function to return the timestamp.
+  virtual int32_t PlayoutTimestamp(uint32_t* timestamp) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t PlayoutData10Ms(
+  // Get 10 milliseconds of raw audio data for playout, at the given sampling
+  // frequency. ACM will perform a resampling if required.
+  //
+  // Input:
+  //   -desired_freq_hz    : the desired sampling frequency, in Hertz, of the
+  //                         output audio. If set to -1, the function returns
+  //                         the audio at the current sampling frequency.
+  //
+  // Output:
+  //   -audio_frame        : output audio frame which contains raw audio data
+  //                         and other relevant parameters, c.f.
+  //                         module_common_types.h for the definition of
+  //                         AudioFrame.
+  //
+  // Return value:
+  //   -1 if the function fails,
+  //    0 if the function succeeds.
+  //
+  virtual int32_t PlayoutData10Ms(int32_t desired_freq_hz,
+                                        AudioFrame* audio_frame) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  //   Codec specific
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int SetOpusApplication()
+  // Sets the intended application if current send codec is Opus. Opus uses this
+  // to optimize the encoding for applications like VOIP and music. Currently,
+  // two modes are supported: kVoip and kAudio.
+  //
+  // Input:
+  //   - application            : intended application.
+  //
+  // Return value:
+  //   -1 if current send codec is not Opus or error occurred in setting the
+  //      Opus application mode.
+  //    0 if the Opus application mode is successfully set.
+  //
+  virtual int SetOpusApplication(OpusApplicationMode application) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int SetOpusMaxPlaybackRate()
+  // If current send codec is Opus, informs it about maximum playback rate the
+  // receiver will render. Opus can use this information to optimize the bit
+  // rate and increase the computation efficiency.
+  //
+  // Input:
+  //   -frequency_hz            : maximum playback rate in Hz.
+  //
+  // Return value:
+  //   -1 if current send codec is not Opus or
+  //      error occurred in setting the maximum playback rate,
+  //    0 if maximum bandwidth is set successfully.
+  //
+  virtual int SetOpusMaxPlaybackRate(int frequency_hz) = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // EnableOpusDtx()
+  // Enable the DTX, if current send codec is Opus.
+  //
+  // Return value:
+  //   -1 if current send codec is not Opus or error occurred in enabling the
+  //      Opus DTX.
+  //    0 if Opus DTX is enabled successfully.
+  //
+  virtual int EnableOpusDtx() = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int DisableOpusDtx()
+  // If current send codec is Opus, disables its internal DTX.
+  //
+  // Return value:
+  //   -1 if current send codec is not Opus or error occurred in disabling DTX.
+  //    0 if Opus DTX is disabled successfully.
+  //
+  virtual int DisableOpusDtx() = 0;
+
+  ///////////////////////////////////////////////////////////////////////////
+  //   statistics
+  //
+
+  ///////////////////////////////////////////////////////////////////////////
+  // int32_t  GetNetworkStatistics()
+  // Get network statistics. Note that the internal statistics of NetEq are
+  // reset by this call.
+  //
+  // Input:
+  //   -network_statistics : a structure that contains network statistics.
+  //
+  // Return value:
+  //   -1 if failed to set the network statistics,
+  //    0 if statistics are set successfully.
+  //
+  virtual int32_t GetNetworkStatistics(
+      NetworkStatistics* network_statistics) = 0;
+
+  //
+  // Enable NACK and set the maximum size of the NACK list. If NACK is already
+  // enable then the maximum NACK list size is modified accordingly.
+  //
+  // If the sequence number of last received packet is N, the sequence numbers
+  // of NACK list are in the range of [N - |max_nack_list_size|, N).
+  //
+  // |max_nack_list_size| should be positive (none zero) and less than or
+  // equal to |Nack::kNackListSizeLimit|. Otherwise, No change is applied and -1
+  // is returned. 0 is returned at success.
+  //
+  virtual int EnableNack(size_t max_nack_list_size) = 0;
+
+  // Disable NACK.
+  virtual void DisableNack() = 0;
+
+  //
+  // Get a list of packets to be retransmitted. |round_trip_time_ms| is an
+  // estimate of the round-trip-time (in milliseconds). Missing packets which
+  // will be playout in a shorter time than the round-trip-time (with respect
+  // to the time this API is called) will not be included in the list.
+  //
+  // Negative |round_trip_time_ms| results is an error message and empty list
+  // is returned.
+  //
+  virtual std::vector<uint16_t> GetNackList(
+      int64_t round_trip_time_ms) const = 0;
+
+  virtual void GetDecodingCallStatistics(
+      AudioDecodingCallStats* call_stats) const = 0;
+};
+
+}  // namespace webrtc
+
+#endif  // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
diff --git a/webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h b/webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h
new file mode 100644
index 0000000..280d6bf
--- /dev/null
+++ b/webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h
@@ -0,0 +1,51 @@
+/*
+ *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
+#define WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
+
+#include <map>
+
+#include "webrtc/modules/include/module_common_types.h"
+#include "webrtc/typedefs.h"
+
+namespace webrtc {
+
+///////////////////////////////////////////////////////////////////////////
+// enum ACMVADMode
+// An enumerator for aggressiveness of VAD
+// -VADNormal                : least aggressive mode.
+// -VADLowBitrate            : more aggressive than "VADNormal" to save on
+//                             bit-rate.
+// -VADAggr                  : an aggressive mode.
+// -VADVeryAggr              : the most agressive mode.
+//
+enum ACMVADMode {
+  VADNormal = 0,
+  VADLowBitrate = 1,
+  VADAggr = 2,
+  VADVeryAggr = 3
+};
+
+///////////////////////////////////////////////////////////////////////////
+//
+// Enumeration of Opus mode for intended application.
+//
+// kVoip              : optimized for voice signals.
+// kAudio             : optimized for non-voice signals like music.
+//
+enum OpusApplicationMode {
+ kVoip = 0,
+ kAudio = 1,
+};
+
+}  // namespace webrtc
+
+#endif  // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
diff --git a/webrtc/modules/audio_coding/main/acm2/OWNERS b/webrtc/modules/audio_coding/main/acm2/OWNERS
deleted file mode 100644
index 3ee6b4b..0000000
--- a/webrtc/modules/audio_coding/main/acm2/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-
-# These are for the common case of adding or renaming files. If you're doing
-# structural changes, please get a review from a reviewer in this file.
-per-file *.gyp=*
-per-file *.gypi=*
diff --git a/webrtc/modules/audio_coding/main/audio_coding_module.gypi b/webrtc/modules/audio_coding/main/audio_coding_module.gypi
deleted file mode 100644
index 061ffaa..0000000
--- a/webrtc/modules/audio_coding/main/audio_coding_module.gypi
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS.  All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-{
-  'variables': {
-    'audio_coding_dependencies': [
-      'cng',
-      'g711',
-      'pcm16b',
-      '<(webrtc_root)/common.gyp:webrtc_common',
-      '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
-      '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
-    ],
-    'audio_coding_defines': [],
-    'conditions': [
-      ['include_opus==1', {
-        'audio_coding_dependencies': ['webrtc_opus',],
-        'audio_coding_defines': ['WEBRTC_CODEC_OPUS',],
-      }],
-      ['build_with_mozilla==0', {
-        'conditions': [
-          ['target_arch=="arm"', {
-            'audio_coding_dependencies': ['isac_fix',],
-            'audio_coding_defines': ['WEBRTC_CODEC_ISACFX',],
-          }, {
-            'audio_coding_dependencies': ['isac',],
-            'audio_coding_defines': ['WEBRTC_CODEC_ISAC',],
-          }],
-        ],
-        'audio_coding_dependencies': ['g722',],
-        'audio_coding_defines': ['WEBRTC_CODEC_G722',],
-      }],
-      ['build_with_mozilla==0 and build_with_chromium==0', {
-        'audio_coding_dependencies': ['ilbc', 'red',],
-        'audio_coding_defines': ['WEBRTC_CODEC_ILBC', 'WEBRTC_CODEC_RED',],
-      }],
-    ],
-  },
-  'targets': [
-    {
-      'target_name': 'rent_a_codec',
-      'type': 'static_library',
-      'defines': [
-        '<@(audio_coding_defines)',
-      ],
-      'dependencies': [
-        '<(webrtc_root)/common.gyp:webrtc_common',
-      ],
-      'include_dirs': [
-        '<(webrtc_root)',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(webrtc_root)',
-        ],
-      },
-      'sources': [
-        'acm2/acm_codec_database.cc',
-        'acm2/acm_codec_database.h',
-        'acm2/rent_a_codec.cc',
-        'acm2/rent_a_codec.h',
-      ],
-    },
-    {
-      'target_name': 'audio_coding_module',
-      'type': 'static_library',
-      'defines': [
-        '<@(audio_coding_defines)',
-      ],
-      'dependencies': [
-        '<@(audio_coding_dependencies)',
-        '<(webrtc_root)/common.gyp:webrtc_common',
-        '<(webrtc_root)/webrtc.gyp:rtc_event_log',
-        'neteq',
-        'rent_a_codec',
-      ],
-      'include_dirs': [
-        'include',
-        '../../include',
-        '<(webrtc_root)',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          'include',
-          '../../include',
-          '<(webrtc_root)',
-        ],
-      },
-      'conditions': [
-        ['include_opus==1', {
-          'export_dependent_settings': ['webrtc_opus'],
-        }],
-      ],
-      'sources': [
-        'acm2/acm_common_defs.h',
-        'acm2/acm_receiver.cc',
-        'acm2/acm_receiver.h',
-        'acm2/acm_resampler.cc',
-        'acm2/acm_resampler.h',
-        'acm2/audio_coding_module.cc',
-        'acm2/audio_coding_module_impl.cc',
-        'acm2/audio_coding_module_impl.h',
-        'acm2/call_statistics.cc',
-        'acm2/call_statistics.h',
-        'acm2/codec_manager.cc',
-        'acm2/codec_manager.h',
-        'acm2/initial_delay_manager.cc',
-        'acm2/initial_delay_manager.h',
-        'include/audio_coding_module.h',
-        'include/audio_coding_module_typedefs.h',
-      ],
-    },
-  ],
-  'conditions': [
-    ['include_tests==1', {
-      'targets': [
-        {
-          'target_name': 'acm_receive_test',
-          'type': 'static_library',
-          'defines': [
-            '<@(audio_coding_defines)',
-          ],
-          'dependencies': [
-            '<@(audio_coding_dependencies)',
-            'audio_coding_module',
-            'neteq_unittest_tools',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-          ],
-          'sources': [
-            'acm2/acm_receive_test_oldapi.cc',
-            'acm2/acm_receive_test_oldapi.h',
-          ],
-        }, # acm_receive_test
-        {
-          'target_name': 'acm_send_test',
-          'type': 'static_library',
-          'defines': [
-            '<@(audio_coding_defines)',
-          ],
-          'dependencies': [
-            '<@(audio_coding_dependencies)',
-            'audio_coding_module',
-            'neteq_unittest_tools',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-          ],
-          'sources': [
-            'acm2/acm_send_test_oldapi.cc',
-            'acm2/acm_send_test_oldapi.h',
-          ],
-        }, # acm_send_test
-        {
-          'target_name': 'delay_test',
-          'type': 'executable',
-          'dependencies': [
-            'audio_coding_module',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-            '<(webrtc_root)/common.gyp:webrtc_common',
-            '<(webrtc_root)/test/test.gyp:test_support',
-            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
-            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
-            '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
-          ],
-          'sources': [
-             'test/delay_test.cc',
-             'test/Channel.cc',
-             'test/PCMFile.cc',
-             'test/utility.cc',
-           ],
-        }, # delay_test
-        {
-          'target_name': 'insert_packet_with_timing',
-          'type': 'executable',
-          'dependencies': [
-            'audio_coding_module',
-            '<(DEPTH)/testing/gtest.gyp:gtest',
-            '<(webrtc_root)/common.gyp:webrtc_common',
-            '<(webrtc_root)/test/test.gyp:test_support',
-            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
-            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
-            '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
-          ],
-          'sources': [
-             'test/insert_packet_with_timing.cc',
-             'test/Channel.cc',
-             'test/PCMFile.cc',
-           ],
-        }, # delay_test
-      ],
-    }],
-  ],
-}
diff --git a/webrtc/modules/audio_coding/main/include/audio_coding_module.h b/webrtc/modules/audio_coding/main/include/audio_coding_module.h
index fc3ddd5..03f4087 100644
--- a/webrtc/modules/audio_coding/main/include/audio_coding_module.h
+++ b/webrtc/modules/audio_coding/main/include/audio_coding_module.h
@@ -8,14 +8,16 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
+#define WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
+
+#pragma message("WARNING: audio_coding/main/include is DEPRECATED; use audio_coding/include")
 
 #include <vector>
 
 #include "webrtc/base/optional.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
 #include "webrtc/modules/include/module.h"
 #include "webrtc/system_wrappers/include/clock.h"
@@ -738,4 +740,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
diff --git a/webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h b/webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h
index 1ca6f9d..e1ec30a 100644
--- a/webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h
+++ b/webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h
@@ -8,8 +8,10 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
+#define WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
+
+#pragma message("WARNING: audio_coding/main/include is DEPRECATED; use audio_coding/include")
 
 #include <map>
 
@@ -48,4 +50,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_TYPEDEFS_H_
diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h
index d1aae4a..bc8bdd9 100644
--- a/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h
+++ b/webrtc/modules/audio_coding/neteq/audio_decoder_impl.h
@@ -20,7 +20,7 @@
 #ifdef WEBRTC_CODEC_G722
 #include "webrtc/modules/audio_coding/codecs/g722/g722_interface.h"
 #endif
-#include "webrtc/modules/audio_coding/main/acm2/rent_a_codec.h"
+#include "webrtc/modules/audio_coding/acm2/rent_a_codec.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_coding/neteq/nack.h b/webrtc/modules/audio_coding/neteq/nack.h
index 116b7e2..17fef46 100644
--- a/webrtc/modules/audio_coding/neteq/nack.h
+++ b/webrtc/modules/audio_coding/neteq/nack.h
@@ -15,7 +15,7 @@
 #include <map>
 
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
 #include "webrtc/test/testsupport/gtest_prod_util.h"
 
 //
diff --git a/webrtc/modules/audio_coding/neteq/nack_unittest.cc b/webrtc/modules/audio_coding/neteq/nack_unittest.cc
index 853af94..53b19dc 100644
--- a/webrtc/modules/audio_coding/neteq/nack_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/nack_unittest.cc
@@ -17,7 +17,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/typedefs.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
 
 namespace webrtc {
 namespace {
diff --git a/webrtc/modules/audio_coding/main/test/ACMTest.h b/webrtc/modules/audio_coding/test/ACMTest.h
similarity index 74%
rename from webrtc/modules/audio_coding/main/test/ACMTest.h
rename to webrtc/modules/audio_coding/test/ACMTest.h
index f73961f..d7e87d3 100644
--- a/webrtc/modules/audio_coding/main/test/ACMTest.h
+++ b/webrtc/modules/audio_coding/test/ACMTest.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ACMTEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ACMTEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_ACMTEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_ACMTEST_H_
 
 class ACMTest {
  public:
@@ -18,4 +18,4 @@
   virtual void Perform() = 0;
 };
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ACMTEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_ACMTEST_H_
diff --git a/webrtc/modules/audio_coding/main/test/APITest.cc b/webrtc/modules/audio_coding/test/APITest.cc
similarity index 99%
rename from webrtc/modules/audio_coding/main/test/APITest.cc
rename to webrtc/modules/audio_coding/test/APITest.cc
index 88ad7e2..59a5a3a 100644
--- a/webrtc/modules/audio_coding/main/test/APITest.cc
+++ b/webrtc/modules/audio_coding/test/APITest.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/APITest.h"
+#include "webrtc/modules/audio_coding/test/APITest.h"
 
 #include <ctype.h>
 #include <stdio.h>
@@ -24,8 +24,8 @@
 #include "webrtc/common.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/event_wrapper.h"
 #include "webrtc/system_wrappers/include/tick_util.h"
 #include "webrtc/system_wrappers/include/trace.h"
diff --git a/webrtc/modules/audio_coding/main/test/APITest.h b/webrtc/modules/audio_coding/test/APITest.h
similarity index 87%
rename from webrtc/modules/audio_coding/main/test/APITest.h
rename to webrtc/modules/audio_coding/test/APITest.h
index d4c5b1e..a1937c2 100644
--- a/webrtc/modules/audio_coding/main/test/APITest.h
+++ b/webrtc/modules/audio_coding/test/APITest.h
@@ -8,15 +8,15 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_APITEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_APITEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_
 
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/event_wrapper.h"
 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
 
@@ -160,4 +160,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_APITEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_
diff --git a/webrtc/modules/audio_coding/main/test/Channel.cc b/webrtc/modules/audio_coding/test/Channel.cc
similarity index 99%
rename from webrtc/modules/audio_coding/main/test/Channel.cc
rename to webrtc/modules/audio_coding/test/Channel.cc
index 02bd783..31521fe 100644
--- a/webrtc/modules/audio_coding/main/test/Channel.cc
+++ b/webrtc/modules/audio_coding/test/Channel.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
 
 #include <assert.h>
 #include <iostream>
diff --git a/webrtc/modules/audio_coding/main/test/Channel.h b/webrtc/modules/audio_coding/test/Channel.h
similarity index 92%
rename from webrtc/modules/audio_coding/main/test/Channel.h
rename to webrtc/modules/audio_coding/test/Channel.h
index ff6937e..b047aa9 100644
--- a/webrtc/modules/audio_coding/main/test/Channel.h
+++ b/webrtc/modules/audio_coding/test/Channel.h
@@ -8,12 +8,12 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_CHANNEL_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_CHANNEL_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_CHANNEL_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_CHANNEL_H_
 
 #include <stdio.h>
 
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/include/module_common_types.h"
 #include "webrtc/typedefs.h"
 
@@ -127,4 +127,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_CHANNEL_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_CHANNEL_H_
diff --git a/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc b/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc
rename to webrtc/modules/audio_coding/test/EncodeDecodeTest.cc
index d68e575..ef45705 100644
--- a/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.cc
+++ b/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h"
+#include "webrtc/modules/audio_coding/test/EncodeDecodeTest.h"
 
 #include <sstream>
 #include <stdio.h>
@@ -17,9 +17,9 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h b/webrtc/modules/audio_coding/test/EncodeDecodeTest.h
similarity index 86%
rename from webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h
rename to webrtc/modules/audio_coding/test/EncodeDecodeTest.h
index 4ad92ce..3881062 100644
--- a/webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h
+++ b/webrtc/modules/audio_coding/test/EncodeDecodeTest.h
@@ -8,16 +8,16 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ENCODEDECODETEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ENCODEDECODETEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_ENCODEDECODETEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_ENCODEDECODETEST_H_
 
 #include <stdio.h>
 #include <string.h>
 
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/RTPFile.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/RTPFile.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -120,4 +120,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ENCODEDECODETEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_ENCODEDECODETEST_H_
diff --git a/webrtc/modules/audio_coding/main/test/PCMFile.cc b/webrtc/modules/audio_coding/test/PCMFile.cc
similarity index 100%
rename from webrtc/modules/audio_coding/main/test/PCMFile.cc
rename to webrtc/modules/audio_coding/test/PCMFile.cc
diff --git a/webrtc/modules/audio_coding/main/test/PCMFile.h b/webrtc/modules/audio_coding/test/PCMFile.h
similarity index 90%
rename from webrtc/modules/audio_coding/main/test/PCMFile.h
rename to webrtc/modules/audio_coding/test/PCMFile.h
index 785ed66..9365180 100644
--- a/webrtc/modules/audio_coding/main/test/PCMFile.h
+++ b/webrtc/modules/audio_coding/test/PCMFile.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PCMFILE_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PCMFILE_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_PCMFILE_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_PCMFILE_H_
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -65,4 +65,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PCMFILE_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_PCMFILE_H_
diff --git a/webrtc/modules/audio_coding/main/test/PacketLossTest.cc b/webrtc/modules/audio_coding/test/PacketLossTest.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/test/PacketLossTest.cc
rename to webrtc/modules/audio_coding/test/PacketLossTest.cc
index f7c96fa..ad3e834 100644
--- a/webrtc/modules/audio_coding/main/test/PacketLossTest.cc
+++ b/webrtc/modules/audio_coding/test/PacketLossTest.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/PacketLossTest.h"
+#include "webrtc/modules/audio_coding/test/PacketLossTest.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/common.h"
diff --git a/webrtc/modules/audio_coding/main/test/PacketLossTest.h b/webrtc/modules/audio_coding/test/PacketLossTest.h
similarity index 86%
rename from webrtc/modules/audio_coding/main/test/PacketLossTest.h
rename to webrtc/modules/audio_coding/test/PacketLossTest.h
index d25dea2..f3570ae 100644
--- a/webrtc/modules/audio_coding/main/test/PacketLossTest.h
+++ b/webrtc/modules/audio_coding/test/PacketLossTest.h
@@ -8,12 +8,12 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PACKETLOSSTEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PACKETLOSSTEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_
 
 #include <string>
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h"
+#include "webrtc/modules/audio_coding/test/EncodeDecodeTest.h"
 
 namespace webrtc {
 
@@ -64,4 +64,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_PACKETLOSSTEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_PACKETLOSSTEST_H_
diff --git a/webrtc/modules/audio_coding/main/test/RTPFile.cc b/webrtc/modules/audio_coding/test/RTPFile.cc
similarity index 100%
rename from webrtc/modules/audio_coding/main/test/RTPFile.cc
rename to webrtc/modules/audio_coding/test/RTPFile.cc
diff --git a/webrtc/modules/audio_coding/main/test/RTPFile.h b/webrtc/modules/audio_coding/test/RTPFile.h
similarity index 92%
rename from webrtc/modules/audio_coding/main/test/RTPFile.h
rename to webrtc/modules/audio_coding/test/RTPFile.h
index 6bad755..696d41e 100644
--- a/webrtc/modules/audio_coding/main/test/RTPFile.h
+++ b/webrtc/modules/audio_coding/test/RTPFile.h
@@ -8,13 +8,13 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_RTPFILE_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_RTPFILE_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_RTPFILE_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_RTPFILE_H_
 
 #include <stdio.h>
 #include <queue>
 
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/include/module_common_types.h"
 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
 #include "webrtc/typedefs.h"
@@ -123,4 +123,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_RTPFILE_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_RTPFILE_H_
diff --git a/webrtc/modules/audio_coding/main/test/SpatialAudio.cc b/webrtc/modules/audio_coding/test/SpatialAudio.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/test/SpatialAudio.cc
rename to webrtc/modules/audio_coding/test/SpatialAudio.cc
index 17d4fc8..c9f8080 100644
--- a/webrtc/modules/audio_coding/main/test/SpatialAudio.cc
+++ b/webrtc/modules/audio_coding/test/SpatialAudio.cc
@@ -14,7 +14,7 @@
 #include <math.h>
 
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/test/SpatialAudio.h"
+#include "webrtc/modules/audio_coding/test/SpatialAudio.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
diff --git a/webrtc/modules/audio_coding/main/test/SpatialAudio.h b/webrtc/modules/audio_coding/test/SpatialAudio.h
similarity index 66%
rename from webrtc/modules/audio_coding/main/test/SpatialAudio.h
rename to webrtc/modules/audio_coding/test/SpatialAudio.h
index fc25897..3548cc9 100644
--- a/webrtc/modules/audio_coding/main/test/SpatialAudio.h
+++ b/webrtc/modules/audio_coding/test/SpatialAudio.h
@@ -8,15 +8,15 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_SPATIALAUDIO_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_SPATIALAUDIO_H_
 
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 
 #define MAX_FILE_NAME_LENGTH_BYTE 500
 
@@ -44,4 +44,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_SPATIALAUDIO_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_SPATIALAUDIO_H_
diff --git a/webrtc/modules/audio_coding/main/test/TestAllCodecs.cc b/webrtc/modules/audio_coding/test/TestAllCodecs.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/TestAllCodecs.cc
rename to webrtc/modules/audio_coding/test/TestAllCodecs.cc
index e9e4f2b..21ce7c1 100644
--- a/webrtc/modules/audio_coding/main/test/TestAllCodecs.cc
+++ b/webrtc/modules/audio_coding/test/TestAllCodecs.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/TestAllCodecs.h"
+#include "webrtc/modules/audio_coding/test/TestAllCodecs.h"
 
 #include <cstdio>
 #include <limits>
@@ -18,9 +18,9 @@
 
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/typedefs.h"
diff --git a/webrtc/modules/audio_coding/main/test/TestAllCodecs.h b/webrtc/modules/audio_coding/test/TestAllCodecs.h
similarity index 85%
rename from webrtc/modules/audio_coding/main/test/TestAllCodecs.h
rename to webrtc/modules/audio_coding/test/TestAllCodecs.h
index 1cdc0cb..e79bd69 100644
--- a/webrtc/modules/audio_coding/main/test/TestAllCodecs.h
+++ b/webrtc/modules/audio_coding/test/TestAllCodecs.h
@@ -8,13 +8,13 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTALLCODECS_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTALLCODECS_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TESTALLCODECS_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTALLCODECS_H_
 
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
@@ -81,4 +81,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTALLCODECS_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTALLCODECS_H_
diff --git a/webrtc/modules/audio_coding/main/test/TestRedFec.cc b/webrtc/modules/audio_coding/test/TestRedFec.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/test/TestRedFec.cc
rename to webrtc/modules/audio_coding/test/TestRedFec.cc
index 0627ae2..d544026 100644
--- a/webrtc/modules/audio_coding/main/test/TestRedFec.cc
+++ b/webrtc/modules/audio_coding/test/TestRedFec.cc
@@ -8,15 +8,15 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/TestRedFec.h"
+#include "webrtc/modules/audio_coding/test/TestRedFec.h"
 
 #include <assert.h>
 
 #include "webrtc/common.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_coding/main/test/TestRedFec.h b/webrtc/modules/audio_coding/test/TestRedFec.h
similarity index 78%
rename from webrtc/modules/audio_coding/main/test/TestRedFec.h
rename to webrtc/modules/audio_coding/test/TestRedFec.h
index ac0b6cd..6343d8e 100644
--- a/webrtc/modules/audio_coding/main/test/TestRedFec.h
+++ b/webrtc/modules/audio_coding/test/TestRedFec.h
@@ -8,14 +8,14 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_
 
 #include <string>
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
 
 namespace webrtc {
 
@@ -48,4 +48,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_
diff --git a/webrtc/modules/audio_coding/main/test/TestStereo.cc b/webrtc/modules/audio_coding/test/TestStereo.cc
similarity index 99%
rename from webrtc/modules/audio_coding/main/test/TestStereo.cc
rename to webrtc/modules/audio_coding/test/TestStereo.cc
index bb38fac..19f027b 100644
--- a/webrtc/modules/audio_coding/main/test/TestStereo.cc
+++ b/webrtc/modules/audio_coding/test/TestStereo.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/TestStereo.h"
+#include "webrtc/modules/audio_coding/test/TestStereo.h"
 
 #include <assert.h>
 
@@ -17,8 +17,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_coding/main/test/TestStereo.h b/webrtc/modules/audio_coding/test/TestStereo.h
similarity index 88%
rename from webrtc/modules/audio_coding/main/test/TestStereo.h
rename to webrtc/modules/audio_coding/test/TestStereo.h
index b56e995..4526be6 100644
--- a/webrtc/modules/audio_coding/main/test/TestStereo.h
+++ b/webrtc/modules/audio_coding/test/TestStereo.h
@@ -8,15 +8,15 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTSTEREO_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTSTEREO_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TESTSTEREO_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTSTEREO_H_
 
 #include <math.h>
 
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
 
 #define PCMA_AND_PCMU
 
@@ -114,4 +114,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTSTEREO_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTSTEREO_H_
diff --git a/webrtc/modules/audio_coding/main/test/TestVADDTX.cc b/webrtc/modules/audio_coding/test/TestVADDTX.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/TestVADDTX.cc
rename to webrtc/modules/audio_coding/test/TestVADDTX.cc
index bba7b91..98b1224 100644
--- a/webrtc/modules/audio_coding/main/test/TestVADDTX.cc
+++ b/webrtc/modules/audio_coding/test/TestVADDTX.cc
@@ -8,13 +8,13 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/TestVADDTX.h"
+#include "webrtc/modules/audio_coding/test/TestVADDTX.h"
 
 #include <string>
 
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_coding/main/test/TestVADDTX.h b/webrtc/modules/audio_coding/test/TestVADDTX.h
similarity index 85%
rename from webrtc/modules/audio_coding/main/test/TestVADDTX.h
rename to webrtc/modules/audio_coding/test/TestVADDTX.h
index 07596e2..1e7f0ef 100644
--- a/webrtc/modules/audio_coding/main/test/TestVADDTX.h
+++ b/webrtc/modules/audio_coding/test/TestVADDTX.h
@@ -8,16 +8,16 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TESTVADDTX_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTVADDTX_H_
 
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
 
 namespace webrtc {
 
@@ -99,4 +99,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TESTVADDTX_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTVADDTX_H_
diff --git a/webrtc/modules/audio_coding/main/test/Tester.cc b/webrtc/modules/audio_coding/test/Tester.cc
similarity index 87%
rename from webrtc/modules/audio_coding/main/test/Tester.cc
rename to webrtc/modules/audio_coding/test/Tester.cc
index 7302e5d..3ff3dd8 100644
--- a/webrtc/modules/audio_coding/main/test/Tester.cc
+++ b/webrtc/modules/audio_coding/test/Tester.cc
@@ -13,17 +13,17 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/APITest.h"
-#include "webrtc/modules/audio_coding/main/test/EncodeDecodeTest.h"
-#include "webrtc/modules/audio_coding/main/test/iSACTest.h"
-#include "webrtc/modules/audio_coding/main/test/opus_test.h"
-#include "webrtc/modules/audio_coding/main/test/PacketLossTest.h"
-#include "webrtc/modules/audio_coding/main/test/TestAllCodecs.h"
-#include "webrtc/modules/audio_coding/main/test/TestRedFec.h"
-#include "webrtc/modules/audio_coding/main/test/TestStereo.h"
-#include "webrtc/modules/audio_coding/main/test/TestVADDTX.h"
-#include "webrtc/modules/audio_coding/main/test/TwoWayCommunication.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/APITest.h"
+#include "webrtc/modules/audio_coding/test/EncodeDecodeTest.h"
+#include "webrtc/modules/audio_coding/test/iSACTest.h"
+#include "webrtc/modules/audio_coding/test/opus_test.h"
+#include "webrtc/modules/audio_coding/test/PacketLossTest.h"
+#include "webrtc/modules/audio_coding/test/TestAllCodecs.h"
+#include "webrtc/modules/audio_coding/test/TestRedFec.h"
+#include "webrtc/modules/audio_coding/test/TestStereo.h"
+#include "webrtc/modules/audio_coding/test/TestVADDTX.h"
+#include "webrtc/modules/audio_coding/test/TwoWayCommunication.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
diff --git a/webrtc/modules/audio_coding/main/test/TimedTrace.cc b/webrtc/modules/audio_coding/test/TimedTrace.cc
similarity index 100%
rename from webrtc/modules/audio_coding/main/test/TimedTrace.cc
rename to webrtc/modules/audio_coding/test/TimedTrace.cc
diff --git a/webrtc/modules/audio_coding/main/test/TimedTrace.h b/webrtc/modules/audio_coding/test/TimedTrace.h
similarity index 82%
rename from webrtc/modules/audio_coding/main/test/TimedTrace.h
rename to webrtc/modules/audio_coding/test/TimedTrace.h
index ef9609a..0793eb0 100644
--- a/webrtc/modules/audio_coding/main/test/TimedTrace.h
+++ b/webrtc/modules/audio_coding/test/TimedTrace.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef TIMED_TRACE_H
-#define TIMED_TRACE_H
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TIMEDTRACE_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_TIMEDTRACE_H_
 
 #include "webrtc/typedefs.h"
 
@@ -33,4 +33,4 @@
 
 };
 
-#endif
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_TIMEDTRACE_H_
diff --git a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc b/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
rename to webrtc/modules/audio_coding/test/TwoWayCommunication.cc
index 725cbf7..56e136b 100644
--- a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.cc
+++ b/webrtc/modules/audio_coding/test/TwoWayCommunication.cc
@@ -21,8 +21,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.h b/webrtc/modules/audio_coding/test/TwoWayCommunication.h
similarity index 69%
rename from webrtc/modules/audio_coding/main/test/TwoWayCommunication.h
rename to webrtc/modules/audio_coding/test/TwoWayCommunication.h
index bf969fe..7763993 100644
--- a/webrtc/modules/audio_coding/main/test/TwoWayCommunication.h
+++ b/webrtc/modules/audio_coding/test/TwoWayCommunication.h
@@ -8,15 +8,15 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TWOWAYCOMMUNICATION_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TWOWAYCOMMUNICATION_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
 
 #include "webrtc/base/scoped_ptr.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 
 namespace webrtc {
 
@@ -57,4 +57,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TWOWAYCOMMUNICATION_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
diff --git a/webrtc/modules/audio_coding/main/test/delay_test.cc b/webrtc/modules/audio_coding/test/delay_test.cc
similarity index 95%
rename from webrtc/modules/audio_coding/main/test/delay_test.cc
rename to webrtc/modules/audio_coding/test/delay_test.cc
index ce08c0f..a8c137f 100644
--- a/webrtc/modules/audio_coding/main/test/delay_test.cc
+++ b/webrtc/modules/audio_coding/test/delay_test.cc
@@ -19,12 +19,12 @@
 #include "webrtc/common.h"
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/event_wrapper.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_coding/main/test/iSACTest.cc b/webrtc/modules/audio_coding/test/iSACTest.cc
similarity index 98%
rename from webrtc/modules/audio_coding/main/test/iSACTest.cc
rename to webrtc/modules/audio_coding/test/iSACTest.cc
index 203e12b..09744b1 100644
--- a/webrtc/modules/audio_coding/main/test/iSACTest.cc
+++ b/webrtc/modules/audio_coding/test/iSACTest.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/iSACTest.h"
+#include "webrtc/modules/audio_coding/test/iSACTest.h"
 
 #include <ctype.h>
 #include <stdio.h>
@@ -23,8 +23,8 @@
 #include <time.h>
 #endif
 
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/event_wrapper.h"
 #include "webrtc/system_wrappers/include/tick_util.h"
 #include "webrtc/system_wrappers/include/trace.h"
diff --git a/webrtc/modules/audio_coding/main/test/iSACTest.h b/webrtc/modules/audio_coding/test/iSACTest.h
similarity index 76%
rename from webrtc/modules/audio_coding/main/test/iSACTest.h
rename to webrtc/modules/audio_coding/test/iSACTest.h
index 0693d93..c5bb515 100644
--- a/webrtc/modules/audio_coding/main/test/iSACTest.h
+++ b/webrtc/modules/audio_coding/test/iSACTest.h
@@ -8,18 +8,18 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ISACTEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ISACTEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_ISACTEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_ISACTEST_H_
 
 #include <string.h>
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 
 #define MAX_FILE_NAME_LENGTH_BYTE 500
 #define NO_OF_CLIENTS             15
@@ -76,4 +76,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_ISACTEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_ISACTEST_H_
diff --git a/webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc b/webrtc/modules/audio_coding/test/insert_packet_with_timing.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc
rename to webrtc/modules/audio_coding/test/insert_packet_with_timing.cc
index 857381d..481df55 100644
--- a/webrtc/modules/audio_coding/main/test/insert_packet_with_timing.cc
+++ b/webrtc/modules/audio_coding/test/insert_packet_with_timing.cc
@@ -14,9 +14,9 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
 #include "webrtc/modules/include/module_common_types.h"
 #include "webrtc/system_wrappers/include/clock.h"
 #include "webrtc/test/testsupport/fileutils.h"
diff --git a/webrtc/modules/audio_coding/main/test/opus_test.cc b/webrtc/modules/audio_coding/test/opus_test.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/opus_test.cc
rename to webrtc/modules/audio_coding/test/opus_test.cc
index 27cc40a..3372a2a 100644
--- a/webrtc/modules/audio_coding/main/test/opus_test.cc
+++ b/webrtc/modules/audio_coding/test/opus_test.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/modules/audio_coding/main/test/opus_test.h"
+#include "webrtc/modules/audio_coding/test/opus_test.h"
 
 #include <assert.h>
 
@@ -18,9 +18,9 @@
 #include "webrtc/common_types.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module_typedefs.h"
-#include "webrtc/modules/audio_coding/main/test/TestStereo.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
+#include "webrtc/modules/audio_coding/test/TestStereo.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_coding/main/test/opus_test.h b/webrtc/modules/audio_coding/test/opus_test.h
similarity index 72%
rename from webrtc/modules/audio_coding/main/test/opus_test.h
rename to webrtc/modules/audio_coding/test/opus_test.h
index 0b96009..090c8fa 100644
--- a/webrtc/modules/audio_coding/main/test/opus_test.h
+++ b/webrtc/modules/audio_coding/test/opus_test.h
@@ -8,18 +8,18 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_OPUS_TEST_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_OPUS_TEST_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_
 
 #include <math.h>
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_resampler.h"
-#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
-#include "webrtc/modules/audio_coding/main/test/Channel.h"
-#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
-#include "webrtc/modules/audio_coding/main/test/TestStereo.h"
+#include "webrtc/modules/audio_coding/acm2/acm_resampler.h"
+#include "webrtc/modules/audio_coding/test/ACMTest.h"
+#include "webrtc/modules/audio_coding/test/Channel.h"
+#include "webrtc/modules/audio_coding/test/PCMFile.h"
+#include "webrtc/modules/audio_coding/test/TestStereo.h"
 
 namespace webrtc {
 
@@ -54,4 +54,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_OPUS_TEST_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_OPUS_TEST_H_
diff --git a/webrtc/modules/audio_coding/main/test/target_delay_unittest.cc b/webrtc/modules/audio_coding/test/target_delay_unittest.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/target_delay_unittest.cc
rename to webrtc/modules/audio_coding/test/target_delay_unittest.cc
index afc0e10..d7c0411 100644
--- a/webrtc/modules/audio_coding/main/test/target_delay_unittest.cc
+++ b/webrtc/modules/audio_coding/test/target_delay_unittest.cc
@@ -12,8 +12,8 @@
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/test/utility.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/test/utility.h"
 #include "webrtc/modules/include/module_common_types.h"
 #include "webrtc/system_wrappers/include/sleep.h"
 #include "webrtc/test/testsupport/fileutils.h"
diff --git a/webrtc/modules/audio_coding/main/test/utility.cc b/webrtc/modules/audio_coding/test/utility.cc
similarity index 97%
rename from webrtc/modules/audio_coding/main/test/utility.cc
rename to webrtc/modules/audio_coding/test/utility.cc
index 34af5e7..89368bc 100644
--- a/webrtc/modules/audio_coding/main/test/utility.cc
+++ b/webrtc/modules/audio_coding/test/utility.cc
@@ -18,8 +18,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/common.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
-#include "webrtc/modules/audio_coding/main/acm2/acm_common_defs.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/acm2/acm_common_defs.h"
 
 #define NUM_CODECS_WITH_FIXED_PAYLOAD_TYPE 13
 
diff --git a/webrtc/modules/audio_coding/main/test/utility.h b/webrtc/modules/audio_coding/test/utility.h
similarity index 94%
rename from webrtc/modules/audio_coding/main/test/utility.h
rename to webrtc/modules/audio_coding/test/utility.h
index e936ec1..23869be 100644
--- a/webrtc/modules/audio_coding/main/test/utility.h
+++ b/webrtc/modules/audio_coding/test/utility.h
@@ -8,11 +8,11 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_UTILITY_H_
-#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_UTILITY_H_
+#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_UTILITY_H_
+#define WEBRTC_MODULES_AUDIO_CODING_TEST_UTILITY_H_
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 
 namespace webrtc {
 
@@ -136,4 +136,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_UTILITY_H_
+#endif  // WEBRTC_MODULES_AUDIO_CODING_TEST_UTILITY_H_
diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp
index 0c981e6..599a931 100644
--- a/webrtc/modules/modules.gyp
+++ b/webrtc/modules/modules.gyp
@@ -71,24 +71,24 @@
             '<@(audio_coding_defines)',
           ],
           'sources': [
-            'audio_coding/main/test/APITest.cc',
-            'audio_coding/main/test/Channel.cc',
-            'audio_coding/main/test/EncodeDecodeTest.cc',
-            'audio_coding/main/test/PCMFile.cc',
-            'audio_coding/main/test/PacketLossTest.cc',
-            'audio_coding/main/test/RTPFile.cc',
-            'audio_coding/main/test/SpatialAudio.cc',
-            'audio_coding/main/test/TestAllCodecs.cc',
-            'audio_coding/main/test/TestRedFec.cc',
-            'audio_coding/main/test/TestStereo.cc',
-            'audio_coding/main/test/TestVADDTX.cc',
-            'audio_coding/main/test/Tester.cc',
-            'audio_coding/main/test/TimedTrace.cc',
-            'audio_coding/main/test/TwoWayCommunication.cc',
-            'audio_coding/main/test/iSACTest.cc',
-            'audio_coding/main/test/opus_test.cc',
-            'audio_coding/main/test/target_delay_unittest.cc',
-            'audio_coding/main/test/utility.cc',
+            'audio_coding/test/APITest.cc',
+            'audio_coding/test/Channel.cc',
+            'audio_coding/test/EncodeDecodeTest.cc',
+            'audio_coding/test/PCMFile.cc',
+            'audio_coding/test/PacketLossTest.cc',
+            'audio_coding/test/RTPFile.cc',
+            'audio_coding/test/SpatialAudio.cc',
+            'audio_coding/test/TestAllCodecs.cc',
+            'audio_coding/test/TestRedFec.cc',
+            'audio_coding/test/TestStereo.cc',
+            'audio_coding/test/TestVADDTX.cc',
+            'audio_coding/test/Tester.cc',
+            'audio_coding/test/TimedTrace.cc',
+            'audio_coding/test/TwoWayCommunication.cc',
+            'audio_coding/test/iSACTest.cc',
+            'audio_coding/test/opus_test.cc',
+            'audio_coding/test/target_delay_unittest.cc',
+            'audio_coding/test/utility.cc',
             'rtp_rtcp/test/testFec/test_fec.cc',
             'video_coding/codecs/test/videoprocessor_integrationtest.cc',
             'video_coding/codecs/vp8/test/vp8_impl_unittest.cc',
@@ -156,12 +156,12 @@
               ],
               'sources': [
                 'audio_coding/codecs/cng/audio_encoder_cng_unittest.cc',
-                'audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc',
-                'audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc',
-                'audio_coding/main/acm2/call_statistics_unittest.cc',
-                'audio_coding/main/acm2/codec_manager_unittest.cc',
-                'audio_coding/main/acm2/initial_delay_manager_unittest.cc',
-                'audio_coding/main/acm2/rent_a_codec_unittest.cc',
+                'audio_coding/acm2/acm_receiver_unittest_oldapi.cc',
+                'audio_coding/acm2/audio_coding_module_unittest_oldapi.cc',
+                'audio_coding/acm2/call_statistics_unittest.cc',
+                'audio_coding/acm2/codec_manager_unittest.cc',
+                'audio_coding/acm2/initial_delay_manager_unittest.cc',
+                'audio_coding/acm2/rent_a_codec_unittest.cc',
                 'audio_coding/codecs/cng/cng_unittest.cc',
                 'audio_coding/codecs/isac/fix/source/filters_unittest.cc',
                 'audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc',
diff --git a/webrtc/modules/utility/source/coder.h b/webrtc/modules/utility/source/coder.h
index 4270e9b..abfa87e 100644
--- a/webrtc/modules/utility/source/coder.h
+++ b/webrtc/modules/utility/source/coder.h
@@ -13,7 +13,7 @@
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index ba18aaa..0e509d2 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -14,7 +14,7 @@
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/common_audio/resampler/include/push_resampler.h"
 #include "webrtc/common_types.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h"
 #include "webrtc/modules/audio_processing/rms_level.h"
 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc
index 677e9b1..2b5587d 100644
--- a/webrtc/voice_engine/voe_base_impl.cc
+++ b/webrtc/voice_engine/voe_base_impl.cc
@@ -13,7 +13,7 @@
 #include "webrtc/base/format_macros.h"
 #include "webrtc/common.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/modules/audio_device/audio_device_impl.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
diff --git a/webrtc/voice_engine/voe_codec_impl.cc b/webrtc/voice_engine/voe_codec_impl.cc
index 3ab02a6..162f1c2 100644
--- a/webrtc/voice_engine/voe_codec_impl.cc
+++ b/webrtc/voice_engine/voe_codec_impl.cc
@@ -10,7 +10,7 @@
 
 #include "webrtc/voice_engine/voe_codec_impl.h"
 
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/voice_engine/channel.h"
diff --git a/webrtc/voice_engine/voe_neteq_stats_impl.cc b/webrtc/voice_engine/voe_neteq_stats_impl.cc
index 00e04d8..807325b 100644
--- a/webrtc/voice_engine/voe_neteq_stats_impl.cc
+++ b/webrtc/voice_engine/voe_neteq_stats_impl.cc
@@ -10,7 +10,7 @@
 
 #include "webrtc/voice_engine/voe_neteq_stats_impl.h"
 
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/voice_engine/channel.h"
diff --git a/webrtc/voice_engine/voice_engine_impl.cc b/webrtc/voice_engine/voice_engine_impl.cc
index d9c5744..8df05cc 100644
--- a/webrtc/voice_engine/voice_engine_impl.cc
+++ b/webrtc/voice_engine/voice_engine_impl.cc
@@ -16,7 +16,7 @@
 #endif
 
 #include "webrtc/base/checks.h"
-#include "webrtc/modules/audio_coding/main/include/audio_coding_module.h"
+#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/voice_engine/channel_proxy.h"