Split webrtc/video into webrtc/{audio,call,video}.

Moves audio_receive_stream.{h,cc} into webrtc/audio, and common parts
into webrtc/call, splitting out audio/shared components with separate
OWNERS files.

BUG=webrtc:4690
R=solenberg@webrtc.org, tina.legrand@webrtc.org
TBR=mflodman@webrtc.org

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

Cr-Original-Commit-Position: refs/heads/master@{#10073}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 5c389d3e09646c0e2ed76d5ccb37a3419a09eb6a
diff --git a/BUILD.gn b/BUILD.gn
index 4036859..5c3d9bc 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -178,8 +178,10 @@
   public_configs = [ ":common_inherited_config" ]
 
   deps = [
+    "audio",
     ":webrtc_common",
     "base:rtc_base",
+    "call",
     "common_audio",
     "common_video",
     "modules/audio_coding",
@@ -247,16 +249,16 @@
 if (rtc_enable_protobuf) {
   proto_library("rtc_event_log_proto") {
     sources = [
-      "video/rtc_event_log.proto",
+      "call/rtc_event_log.proto",
     ]
-    proto_out_dir = "webrtc/video"
+    proto_out_dir = "webrtc/call"
   }
 }
 
 source_set("rtc_event_log") {
   sources = [
-    "video/rtc_event_log.cc",
-    "video/rtc_event_log.h",
+    "call/rtc_event_log.cc",
+    "call/rtc_event_log.h",
   ]
 
   defines = []
diff --git a/audio/BUILD.gn b/audio/BUILD.gn
new file mode 100644
index 0000000..db0791f
--- /dev/null
+++ b/audio/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright (c) 2015 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.
+
+import("../build/webrtc.gni")
+
+source_set("audio") {
+  sources = [
+    "audio_receive_stream.cc",
+    "audio_receive_stream.h",
+  ]
+
+  configs += [ "..:common_config" ]
+  public_configs = [ "..:common_inherited_config" ]
+
+  if (is_clang) {
+    # Suppress warnings from Chrome's Clang plugins.
+    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+    configs -= [ "//build/config/clang:find_bad_constructs" ]
+  }
+
+  deps = [
+    "..:webrtc_common",
+    "../voice_engine",
+    "../system_wrappers",
+  ]
+}
diff --git a/audio/OWNERS b/audio/OWNERS
new file mode 100644
index 0000000..f0cc72a
--- /dev/null
+++ b/audio/OWNERS
@@ -0,0 +1,9 @@
+solenberg@webrtc.org
+tina.legrand@webrtc.org
+
+# 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=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/video/audio_receive_stream.cc b/audio/audio_receive_stream.cc
similarity index 98%
rename from video/audio_receive_stream.cc
rename to audio/audio_receive_stream.cc
index a1cf2ca..064749c 100644
--- a/video/audio_receive_stream.cc
+++ b/audio/audio_receive_stream.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/video/audio_receive_stream.h"
+#include "webrtc/audio/audio_receive_stream.h"
 
 #include <string>
 
diff --git a/video/audio_receive_stream.h b/audio/audio_receive_stream.h
similarity index 91%
rename from video/audio_receive_stream.h
rename to audio/audio_receive_stream.h
index c9ac04a..70ad4fc 100644
--- a/video/audio_receive_stream.h
+++ b/audio/audio_receive_stream.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_VIDEO_AUDIO_RECEIVE_STREAM_H_
-#define WEBRTC_VIDEO_AUDIO_RECEIVE_STREAM_H_
+#ifndef WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
+#define WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
 
 #include "webrtc/audio_receive_stream.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
@@ -50,4 +50,4 @@
 }  // namespace internal
 }  // namespace webrtc
 
-#endif  // WEBRTC_VIDEO_AUDIO_RECEIVE_STREAM_H_
+#endif  // WEBRTC_AUDIO_AUDIO_RECEIVE_STREAM_H_
diff --git a/video/audio_receive_stream_unittest.cc b/audio/audio_receive_stream_unittest.cc
similarity index 98%
rename from video/audio_receive_stream_unittest.cc
rename to audio/audio_receive_stream_unittest.cc
index cf5314c..d6cce69 100644
--- a/video/audio_receive_stream_unittest.cc
+++ b/audio/audio_receive_stream_unittest.cc
@@ -10,9 +10,9 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include "webrtc/audio/audio_receive_stream.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
-#include "webrtc/video/audio_receive_stream.h"
 
 namespace webrtc {
 
diff --git a/audio/webrtc_audio.gypi b/audio/webrtc_audio.gypi
new file mode 100644
index 0000000..42f91ac
--- /dev/null
+++ b/audio/webrtc_audio.gypi
@@ -0,0 +1,21 @@
+# Copyright (c) 2013 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': {
+    'webrtc_audio_dependencies': [
+      '<(webrtc_root)/common.gyp:webrtc_common',
+      '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
+      '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
+      '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+    ],
+    'webrtc_audio_sources': [
+      'audio/audio_receive_stream.cc',
+      'audio/audio_receive_stream.h',
+    ],
+  },
+}
diff --git a/call/BUILD.gn b/call/BUILD.gn
new file mode 100644
index 0000000..ebd30db
--- /dev/null
+++ b/call/BUILD.gn
@@ -0,0 +1,33 @@
+# Copyright (c) 2015 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.
+
+import("../build/webrtc.gni")
+
+source_set("call") {
+  sources = [
+    "call.cc",
+    "transport_adapter.cc",
+    "transport_adapter.h",
+  ]
+
+  configs += [ "..:common_config" ]
+  public_configs = [ "..:common_inherited_config" ]
+
+  if (is_clang) {
+    # Suppress warnings from Chrome's Clang plugins.
+    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
+    configs -= [ "//build/config/clang:find_bad_constructs" ]
+  }
+
+  deps = [
+    "..:rtc_event_log",
+    "..:webrtc_common",
+    "../modules/rtp_rtcp",
+    "../system_wrappers",
+  ]
+}
diff --git a/call/OWNERS b/call/OWNERS
new file mode 100644
index 0000000..792de19
--- /dev/null
+++ b/call/OWNERS
@@ -0,0 +1,11 @@
+mflodman@webrtc.org
+pbos@webrtc.org
+solenberg@webrtc.org
+stefan@webrtc.org
+
+# 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=*
+
+per-file BUILD.gn=kjellander@webrtc.org
diff --git a/video/bitrate_estimator_tests.cc b/call/bitrate_estimator_tests.cc
similarity index 100%
rename from video/bitrate_estimator_tests.cc
rename to call/bitrate_estimator_tests.cc
diff --git a/video/call.cc b/call/call.cc
similarity index 98%
rename from video/call.cc
rename to call/call.cc
index 2b2d596..21109c2 100644
--- a/video/call.cc
+++ b/call/call.cc
@@ -13,26 +13,23 @@
 #include <map>
 #include <vector>
 
+#include "webrtc/audio/audio_receive_stream.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/common.h"
 #include "webrtc/config.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
 #include "webrtc/modules/utility/interface/process_thread.h"
-#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
-#include "webrtc/modules/video_render/include/video_render.h"
 #include "webrtc/system_wrappers/interface/cpu_info.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
 #include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/system_wrappers/interface/trace_event.h"
-#include "webrtc/video/audio_receive_stream.h"
-#include "webrtc/video/rtc_event_log.h"
 #include "webrtc/video/video_receive_stream.h"
 #include "webrtc/video/video_send_stream.h"
 #include "webrtc/voice_engine/include/voe_codec.h"
diff --git a/video/call_perf_tests.cc b/call/call_perf_tests.cc
similarity index 99%
rename from video/call_perf_tests.cc
rename to call/call_perf_tests.cc
index bbf4caa..a7714b1 100644
--- a/video/call_perf_tests.cc
+++ b/call/call_perf_tests.cc
@@ -17,6 +17,7 @@
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/call.h"
+#include "webrtc/call/transport_adapter.h"
 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
@@ -33,7 +34,6 @@
 #include "webrtc/test/rtp_rtcp_observer.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/perf_test.h"
-#include "webrtc/video/transport_adapter.h"
 #include "webrtc/voice_engine/include/voe_base.h"
 #include "webrtc/voice_engine/include/voe_codec.h"
 #include "webrtc/voice_engine/include/voe_network.h"
diff --git a/video/packet_injection_tests.cc b/call/packet_injection_tests.cc
similarity index 100%
rename from video/packet_injection_tests.cc
rename to call/packet_injection_tests.cc
diff --git a/video/rtc_event_log.cc b/call/rtc_event_log.cc
similarity index 98%
rename from video/rtc_event_log.cc
rename to call/rtc_event_log.cc
index 8e6d1b9..23b120c 100644
--- a/video/rtc_event_log.cc
+++ b/call/rtc_event_log.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/video/rtc_event_log.h"
+#include "webrtc/call/rtc_event_log.h"
 
 #include <deque>
 
@@ -23,9 +23,9 @@
 #ifdef ENABLE_RTC_EVENT_LOG
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/video/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
 #else
-#include "webrtc/video/rtc_event_log.pb.h"
+#include "webrtc/call/rtc_event_log.pb.h"
 #endif
 #endif
 
diff --git a/video/rtc_event_log.h b/call/rtc_event_log.h
similarity index 95%
rename from video/rtc_event_log.h
rename to call/rtc_event_log.h
index daab3c1..a4b7cad 100644
--- a/video/rtc_event_log.h
+++ b/call/rtc_event_log.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_VIDEO_RTC_EVENT_LOG_H_
-#define WEBRTC_VIDEO_RTC_EVENT_LOG_H_
+#ifndef WEBRTC_CALL_RTC_EVENT_LOG_H_
+#define WEBRTC_CALL_RTC_EVENT_LOG_H_
 
 #include <string>
 
@@ -75,4 +75,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_VIDEO_RTC_EVENT_LOG_H_
+#endif  // WEBRTC_CALL_RTC_EVENT_LOG_H_
diff --git a/video/rtc_event_log.proto b/call/rtc_event_log.proto
similarity index 100%
rename from video/rtc_event_log.proto
rename to call/rtc_event_log.proto
diff --git a/video/rtc_event_log2rtp_dump.cc b/call/rtc_event_log2rtp_dump.cc
similarity index 97%
rename from video/rtc_event_log2rtp_dump.cc
rename to call/rtc_event_log2rtp_dump.cc
index 4f1d93b..8357d48 100644
--- a/video/rtc_event_log2rtp_dump.cc
+++ b/call/rtc_event_log2rtp_dump.cc
@@ -15,15 +15,15 @@
 #include "gflags/gflags.h"
 #include "webrtc/base/checks.h"
 #include "webrtc/base/scoped_ptr.h"
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
 #include "webrtc/test/rtp_file_writer.h"
-#include "webrtc/video/rtc_event_log.h"
 
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/video/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
 #else
-#include "webrtc/video/rtc_event_log.pb.h"
+#include "webrtc/call/rtc_event_log.pb.h"
 #endif
 
 namespace {
diff --git a/video/rtc_event_log_unittest.cc b/call/rtc_event_log_unittest.cc
similarity index 98%
rename from video/rtc_event_log_unittest.cc
rename to call/rtc_event_log_unittest.cc
index cc8a8d2..a916a2d 100644
--- a/video/rtc_event_log_unittest.cc
+++ b/call/rtc_event_log_unittest.cc
@@ -19,18 +19,18 @@
 #include "webrtc/base/checks.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/test/test_suite.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
-#include "webrtc/video/rtc_event_log.h"
 
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/video/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
 #else
-#include "webrtc/video/rtc_event_log.pb.h"
+#include "webrtc/call/rtc_event_log.pb.h"
 #endif
 
 namespace webrtc {
@@ -50,7 +50,7 @@
                                  RtpExtension::kTransportSequenceNumber};
 const size_t kNumExtensions = 5;
 
-}  // namepsace
+}  // namespace
 
 // TODO(terelius): Place this definition with other parsing functions?
 MediaType GetRuntimeMediaType(rtclog::MediaType media_type) {
diff --git a/video/transport_adapter.cc b/call/transport_adapter.cc
similarity index 96%
rename from video/transport_adapter.cc
rename to call/transport_adapter.cc
index 653e55c..733f3db 100644
--- a/video/transport_adapter.cc
+++ b/call/transport_adapter.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/video/transport_adapter.h"
+#include "webrtc/call/transport_adapter.h"
 
 #include "webrtc/base/checks.h"
 
diff --git a/video/transport_adapter.h b/call/transport_adapter.h
similarity index 87%
rename from video/transport_adapter.h
rename to call/transport_adapter.h
index c9a7938..c14c262 100644
--- a/video/transport_adapter.h
+++ b/call/transport_adapter.h
@@ -7,8 +7,8 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
-#ifndef WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_
-#define WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_
+#ifndef WEBRTC_CALL_TRANSPORT_ADAPTER_H_
+#define WEBRTC_CALL_TRANSPORT_ADAPTER_H_
 
 #include "webrtc/common_types.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
@@ -34,4 +34,4 @@
 }  // namespace internal
 }  // namespace webrtc
 
-#endif  // WEBRTC_VIDEO_TRANSPORT_ADAPTER_H_
+#endif  // WEBRTC_CALL_TRANSPORT_ADAPTER_H_
diff --git a/call/webrtc_call.gypi b/call/webrtc_call.gypi
new file mode 100644
index 0000000..4a606f8
--- /dev/null
+++ b/call/webrtc_call.gypi
@@ -0,0 +1,22 @@
+# Copyright (c) 2013 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': {
+    'webrtc_call_dependencies': [
+      '<(webrtc_root)/common.gyp:webrtc_common',
+      '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
+      '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
+      '<(webrtc_root)/webrtc.gyp:rtc_event_log',
+    ],
+    'webrtc_call_sources': [
+      'call/call.cc',
+      'call/transport_adapter.cc',
+      'call/transport_adapter.h',
+    ],
+  },
+}
diff --git a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
index 14e1051..bfd49d3 100644
--- a/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
+++ b/modules/audio_coding/neteq/tools/rtc_event_log_source.cc
@@ -16,15 +16,15 @@
 #include <limits>
 
 #include "webrtc/base/checks.h"
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
-#include "webrtc/video/rtc_event_log.h"
 
 // Files generated at build-time by the protobuf compiler.
 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
-#include "external/webrtc/webrtc/video/rtc_event_log.pb.h"
+#include "external/webrtc/webrtc/call/rtc_event_log.pb.h"
 #else
-#include "webrtc/video/rtc_event_log.pb.h"
+#include "webrtc/call/rtc_event_log.pb.h"
 #endif
 
 namespace webrtc {
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 04d95ce..a2233c2 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -35,17 +35,12 @@
     "../video_engine/vie_remb.h",
     "../video_engine/vie_sync_module.cc",
     "../video_engine/vie_sync_module.h",
-    "audio_receive_stream.cc",
-    "audio_receive_stream.h",
-    "call.cc",
     "encoded_frame_callback_adapter.cc",
     "encoded_frame_callback_adapter.h",
     "receive_statistics_proxy.cc",
     "receive_statistics_proxy.h",
     "send_statistics_proxy.cc",
     "send_statistics_proxy.h",
-    "transport_adapter.cc",
-    "transport_adapter.h",
     "video_capture_input.cc",
     "video_capture_input.h",
     "video_decoder.cc",
diff --git a/video/OWNERS b/video/OWNERS
index b5f9aeb..3f5e165 100644
--- a/video/OWNERS
+++ b/video/OWNERS
@@ -1,6 +1,6 @@
 mflodman@webrtc.org
-stefan@webrtc.org
 pbos@webrtc.org
+stefan@webrtc.org
 
 # 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.
diff --git a/video/end_to_end_tests.cc b/video/end_to_end_tests.cc
index 7224478..1248f6c 100644
--- a/video/end_to_end_tests.cc
+++ b/video/end_to_end_tests.cc
@@ -18,6 +18,7 @@
 #include "webrtc/base/event.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
+#include "webrtc/call/transport_adapter.h"
 #include "webrtc/frame_callback.h"
 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
@@ -42,7 +43,6 @@
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
 #include "webrtc/test/testsupport/perf_test.h"
-#include "webrtc/video/transport_adapter.h"
 #include "webrtc/video_encoder.h"
 
 namespace webrtc {
diff --git a/video/rampup_tests.h b/video/rampup_tests.h
index 8c18a52..62edda3 100644
--- a/video/rampup_tests.h
+++ b/video/rampup_tests.h
@@ -17,10 +17,10 @@
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
+#include "webrtc/call/transport_adapter.h"
 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
 #include "webrtc/test/call_test.h"
-#include "webrtc/video/transport_adapter.h"
 
 namespace webrtc {
 
diff --git a/video/video_receive_stream.h b/video/video_receive_stream.h
index 1574238..ef2e135 100644
--- a/video/video_receive_stream.h
+++ b/video/video_receive_stream.h
@@ -15,13 +15,13 @@
 
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
+#include "webrtc/call/transport_adapter.h"
 #include "webrtc/common_video/interface/incoming_video_stream.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/video_render/include/video_render_defines.h"
 #include "webrtc/system_wrappers/interface/clock.h"
 #include "webrtc/video/encoded_frame_callback_adapter.h"
 #include "webrtc/video/receive_statistics_proxy.h"
-#include "webrtc/video/transport_adapter.h"
 #include "webrtc/video_engine/vie_channel.h"
 #include "webrtc/video_engine/vie_channel_group.h"
 #include "webrtc/video_engine/vie_encoder.h"
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index 5859314..94f5f5a 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -15,15 +15,15 @@
 #include <vector>
 
 #include "webrtc/call.h"
+#include "webrtc/call/transport_adapter.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
+#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/video/encoded_frame_callback_adapter.h"
 #include "webrtc/video/send_statistics_proxy.h"
-#include "webrtc/video/transport_adapter.h"
 #include "webrtc/video/video_capture_input.h"
 #include "webrtc/video_receive_stream.h"
 #include "webrtc/video_send_stream.h"
-#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 
 namespace webrtc {
 
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index b396cd6..688278e 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -17,6 +17,7 @@
 #include "webrtc/base/criticalsection.h"
 #include "webrtc/base/scoped_ptr.h"
 #include "webrtc/call.h"
+#include "webrtc/call/transport_adapter.h"
 #include "webrtc/frame_callback.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
@@ -36,7 +37,6 @@
 #include "webrtc/test/null_transport.h"
 #include "webrtc/test/testsupport/perf_test.h"
 #include "webrtc/video/send_statistics_proxy.h"
-#include "webrtc/video/transport_adapter.h"
 #include "webrtc/video_frame.h"
 #include "webrtc/video_send_stream.h"
 
diff --git a/video/webrtc_video.gypi b/video/webrtc_video.gypi
index 198fe3e..66ab577 100644
--- a/video/webrtc_video.gypi
+++ b/video/webrtc_video.gypi
@@ -24,17 +24,12 @@
       '<(webrtc_root)/webrtc.gyp:rtc_event_log',
     ],
     'webrtc_video_sources': [
-      'video/audio_receive_stream.cc',
-      'video/audio_receive_stream.h',
-      'video/call.cc',
       'video/encoded_frame_callback_adapter.cc',
       'video/encoded_frame_callback_adapter.h',
       'video/receive_statistics_proxy.cc',
       'video/receive_statistics_proxy.h',
       'video/send_statistics_proxy.cc',
       'video/send_statistics_proxy.h',
-      'video/transport_adapter.cc',
-      'video/transport_adapter.h',
       'video/video_capture_input.cc',
       'video/video_capture_input.h',
       'video/video_decoder.cc',
diff --git a/voice_engine/channel_manager.h b/voice_engine/channel_manager.h
index d01fc68..81768e0 100644
--- a/voice_engine/channel_manager.h
+++ b/voice_engine/channel_manager.h
@@ -15,10 +15,10 @@
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/scoped_ptr.h"
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/system_wrappers/interface/atomic32.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/typedefs.h"
-#include "webrtc/video/rtc_event_log.h"
 
 namespace webrtc {
 
diff --git a/voice_engine/test/auto_test/standard/codec_test.cc b/voice_engine/test/auto_test/standard/codec_test.cc
index e7c9fbf..eeb12ab 100644
--- a/voice_engine/test/auto_test/standard/codec_test.cc
+++ b/voice_engine/test/auto_test/standard/codec_test.cc
@@ -11,11 +11,11 @@
 #include <stdio.h>
 #include <string>
 
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/test/test_suite.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
 #include "webrtc/voice_engine/voice_engine_defines.h"
-#include "webrtc/video/rtc_event_log.h"
 
 class CodecTest : public AfterStreamingFixture {
  protected:
diff --git a/voice_engine/test/cmd_test/voe_cmd_test.cc b/voice_engine/test/cmd_test/voe_cmd_test.cc
index bb52463..312ac7c 100644
--- a/voice_engine/test/cmd_test/voe_cmd_test.cc
+++ b/voice_engine/test/cmd_test/voe_cmd_test.cc
@@ -20,12 +20,12 @@
 #include "gflags/gflags.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/scoped_ptr.h"
+#include "webrtc/call/rtc_event_log.h"
 #include "webrtc/engine_configurations.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/test/channel_transport/include/channel_transport.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/trace_to_stderr.h"
-#include "webrtc/video/rtc_event_log.h"
 #include "webrtc/voice_engine/include/voe_audio_processing.h"
 #include "webrtc/voice_engine/include/voe_base.h"
 #include "webrtc/voice_engine/include/voe_codec.h"
diff --git a/webrtc.gyp b/webrtc.gyp
index 283aa46..13d88b3 100644
--- a/webrtc.gyp
+++ b/webrtc.gyp
@@ -22,10 +22,10 @@
           # This target should only be built if enable_protobuf is defined
           'target_name': 'rtc_event_log_proto',
           'type': 'static_library',
-          'sources': ['video/rtc_event_log.proto',],
+          'sources': ['call/rtc_event_log.proto',],
           'variables': {
-            'proto_in_dir': 'video',
-            'proto_out_dir': 'webrtc/video',
+            'proto_in_dir': 'call',
+            'proto_out_dir': 'webrtc/call',
           },
         'includes': ['build/protoc.gypi'],
         },
@@ -36,7 +36,7 @@
         {
           'target_name': 'rtc_event_log2rtp_dump',
           'type': 'executable',
-          'sources': ['video/rtc_event_log2rtp_dump.cc',],
+          'sources': ['call/rtc_event_log2rtp_dump.cc',],
           'dependencies': [
             '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
             'rtc_event_log',
@@ -49,6 +49,8 @@
   ],
   'includes': [
     'build/common.gypi',
+    'audio/webrtc_audio.gypi',
+    'call/webrtc_call.gypi',
     'video/webrtc_video.gypi',
   ],
   'variables': {
@@ -105,10 +107,14 @@
         'video_renderer.h',
         'video_send_stream.h',
 
+        '<@(webrtc_audio_sources)',
+        '<@(webrtc_call_sources)',
         '<@(webrtc_video_sources)',
       ],
       'dependencies': [
         'common.gyp:*',
+        '<@(webrtc_audio_dependencies)',
+        '<@(webrtc_call_dependencies)',
         '<@(webrtc_video_dependencies)',
         'rtc_event_log',
       ],
@@ -127,8 +133,8 @@
       'target_name': 'rtc_event_log',
       'type': 'static_library',
       'sources': [
-        'video/rtc_event_log.cc',
-        'video/rtc_event_log.h',
+        'call/rtc_event_log.cc',
+        'call/rtc_event_log.h',
       ],
       'conditions': [
         # If enable_protobuf is defined, we want to compile the protobuf
diff --git a/webrtc_tests.gypi b/webrtc_tests.gypi
index 06bb25f..3e0fcbf 100644
--- a/webrtc_tests.gypi
+++ b/webrtc_tests.gypi
@@ -146,18 +146,17 @@
       ],
     },
     {
-      # TODO(pbos): Rename target to webrtc_tests or rtc_tests, this target is
-      # not meant to only include video.
+      # TODO(pbos): Add separate target webrtc_audio_tests and move files there.
       'target_name': 'video_engine_tests',
       'type': '<(gtest_target_type)',
       'sources': [
+        'audio/audio_receive_stream_unittest.cc',
+        'call/bitrate_estimator_tests.cc',
+        'call/packet_injection_tests.cc',
         'test/common_unittest.cc',
         'test/testsupport/metrics/video_metrics_unittest.cc',
         'tools/agc/agc_manager_unittest.cc',
-        'video/audio_receive_stream_unittest.cc',
-        'video/bitrate_estimator_tests.cc',
         'video/end_to_end_tests.cc',
-        'video/packet_injection_tests.cc',
         'video/send_statistics_proxy_unittest.cc',
         'video/video_capture_input_unittest.cc',
         'video/video_decoder_unittest.cc',
@@ -194,7 +193,7 @@
             'webrtc.gyp:rtc_event_log_proto',
           ],
           'sources': [
-            'video/rtc_event_log_unittest.cc',
+            'call/rtc_event_log_unittest.cc',
           ],
         }],
       ],
@@ -203,11 +202,10 @@
       'target_name': 'webrtc_perf_tests',
       'type': '<(gtest_target_type)',
       'sources': [
+        'call/call_perf_tests.cc',
         'modules/audio_coding/neteq/test/neteq_performance_unittest.cc',
         'modules/remote_bitrate_estimator/remote_bitrate_estimators_test.cc',
-
         'tools/agc/agc_manager_integrationtest.cc',
-        'video/call_perf_tests.cc',
         'video/full_stack.cc',
         'video/rampup_tests.cc',
         'video/rampup_tests.h',