Bug 1654112 - Update include paths for moved upstream code
authorDan Minor <dminor@mozilla.com>
Fri, 23 Oct 2020 14:02:54 -0400
changeset 4000591 91fa77a7d556eb27800b9786832d10292cba123f
parent 4000590 df8f4bac949533af8c4ab19c39cc52af54977406
child 4000592 2e5dc99b3ecc8cfd01c4d2e30728b081cbac2fd2
push id736585
push userbcampen@mozilla.com
push dateMon, 04 Oct 2021 16:52:36 +0000
treeherdertry@dce10d2619ca [default view] [failures only]
bugs1654112
milestone94.0a1
Bug 1654112 - Update include paths for moved upstream code
dom/bindings/moz.build
dom/media/MediaManager.cpp
dom/media/VideoFrameConverter.h
dom/media/bridge/moz.build
dom/media/gtest/moz.build
dom/media/moz.build
dom/media/systemservices/CamerasChild.h
dom/media/systemservices/CamerasParent.cpp
dom/media/systemservices/CamerasParent.h
dom/media/systemservices/VideoEngine.cpp
dom/media/systemservices/VideoEngine.h
dom/media/systemservices/VideoFrameUtils.cpp
dom/media/systemservices/moz.build
dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
dom/media/webrtc/MediaEngineRemoteVideoSource.h
dom/media/webrtc/MediaEngineWebRTC.h
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
dom/media/webrtc/MediaEngineWebRTCAudio.h
dom/media/webrtc/common/NullTransport.h
dom/media/webrtc/common/browser_logging/CSFLog.cpp
dom/media/webrtc/common/browser_logging/WebRtcLog.cpp
dom/media/webrtc/common/moz.build
dom/media/webrtc/jsapi/moz.build
dom/media/webrtc/jsep/JsepSessionImpl.cpp
dom/media/webrtc/jsep/moz.build
dom/media/webrtc/libwebrtcglue/AudioConduit.cpp
dom/media/webrtc/libwebrtcglue/MediaConduitInterface.h
dom/media/webrtc/libwebrtcglue/MediaDataCodec.h
dom/media/webrtc/libwebrtcglue/RtpRtcpConfig.h
dom/media/webrtc/libwebrtcglue/RtpSourceObserver.cpp
dom/media/webrtc/libwebrtcglue/RtpSourceObserver.h
dom/media/webrtc/libwebrtcglue/VideoConduit.cpp
dom/media/webrtc/libwebrtcglue/VideoStreamFactory.h
dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
dom/media/webrtc/libwebrtcglue/WebrtcImageBuffer.h
dom/media/webrtc/libwebrtcglue/WebrtcMediaDataDecoderCodec.h
dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h
dom/media/webrtc/libwebrtcglue/moz.build
dom/media/webrtc/moz.build
dom/media/webrtc/third_party_build/moz.build
dom/media/webrtc/transportbridge/MediaPipeline.cpp
dom/media/webrtc/transportbridge/MediaPipeline.h
dom/media/webrtc/transportbridge/MediaPipelineFilter.cpp
dom/media/webrtc/transportbridge/RtpLogger.h
dom/media/webrtc/transportbridge/moz.build
ipc/glue/moz.build
media/webrtc/signaling/gtest/MockCall.h
media/webrtc/signaling/gtest/moz.build
media/webrtc/signaling/gtest/rtpsources_unittests.cpp
media/webrtc/signaling/gtest/videoconduit_unittests.cpp
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -90,17 +90,16 @@ LOCAL_INCLUDES += [
     "/js/xpconnect/src",
     "/js/xpconnect/wrappers",
     "/layout/generic",
     "/layout/style",
     "/layout/xul/tree",
     "/media/webrtc/",
     "/netwerk/base/",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
 ]
 
 LOCAL_INCLUDES += ["/third_party/msgpack/include"]
 
 DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True
 DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
 
 UNIFIED_SOURCES += [
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -63,17 +63,17 @@
 #include "pk11pub.h"
 
 /* Using WebRTC backend on Desktops (Mac, Windows, Linux), otherwise default */
 #include "MediaEngineDefault.h"
 #if defined(MOZ_WEBRTC)
 #  include "MediaEngineWebRTC.h"
 #  include "MediaEngineWebRTCAudio.h"
 #  include "browser_logging/WebRtcLog.h"
-#  include "webrtc/modules/audio_processing/include/audio_processing.h"
+#  include "modules/audio_processing/include/audio_processing.h"
 #endif
 
 #if defined(XP_WIN)
 #  include <iphlpapi.h>
 #  include <objbase.h>
 #  include <tchar.h>
 #  include <winsock2.h>
 
--- a/dom/media/VideoFrameConverter.h
+++ b/dom/media/VideoFrameConverter.h
@@ -11,21 +11,21 @@
 #include "MediaTimer.h"
 #include "VideoSegment.h"
 #include "VideoUtils.h"
 #include "nsISupportsImpl.h"
 #include "nsThreadUtils.h"
 #include "mozilla/TaskQueue.h"
 #include "mozilla/dom/ImageBitmapBinding.h"
 #include "mozilla/dom/ImageUtils.h"
-#include "webrtc/api/video/video_frame.h"
-#include "webrtc/common_video/include/i420_buffer_pool.h"
-#include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/rtc_base/keep_ref_until_done.h"
-#include "webrtc/system_wrappers/include/clock.h"
+#include "api/video/video_frame.h"
+#include "common_video/include/i420_buffer_pool.h"
+#include "common_video/include/video_frame_buffer.h"
+#include "rtc_base/keep_ref_until_done.h"
+#include "system_wrappers/include/clock.h"
 
 // The number of frame buffers VideoFrameConverter may create before returning
 // errors.
 // Sometimes these are released synchronously but they can be forwarded all the
 // way to the encoder for asynchronous encoding. With a pool size of 5,
 // we allow 1 buffer for the current conversion, and 4 buffers to be queued at
 // the encoder.
 #define CONVERTER_BUFFER_POOL_SIZE 5
--- a/dom/media/bridge/moz.build
+++ b/dom/media/bridge/moz.build
@@ -19,17 +19,16 @@ LOCAL_INCLUDES += [
     "/dom/media/webrtc/common/time_profiling",
     "/dom/media/webrtc/jsapi",
     "/dom/media/webrtc/libwebrtcglue",
     "/dom/media/webrtc/transport",
     "/dom/media/webrtc/transportbridge",
     "/ipc/chromium/src",
     "/media/webrtc/",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
 ]
 
 if CONFIG["MOZ_WEBRTC"]:
     XPCOM_MANIFESTS += [
         "components.conf",
     ]
 
 FINAL_LIBRARY = "xul"
--- a/dom/media/gtest/moz.build
+++ b/dom/media/gtest/moz.build
@@ -7,17 +7,16 @@
 include("/dom/media/webrtc/third_party_build/webrtc.mozbuild")
 
 DEFINES["ENABLE_SET_CUBEB_BACKEND"] = True
 
 LOCAL_INCLUDES += [
     "/dom/media/mediasink",
     "/dom/media/webrtc/common/",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
 ]
 
 UNIFIED_SOURCES += [
     "MockCubeb.cpp",
     "MockMediaResource.cpp",
     "TestAudioBuffers.cpp",
     "TestAudioCallbackDriver.cpp",
     "TestAudioCompactor.cpp",
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -339,17 +339,16 @@ LOCAL_INCLUDES += [
     "/netwerk/base",
     "/toolkit/content/tests/browser/",
 ]
 
 if CONFIG["MOZ_WEBRTC"]:
     LOCAL_INCLUDES += [
         "/dom/media/webrtc/common",
         "/third_party/libwebrtc",
-        "/third_party/libwebrtc/webrtc",
     ]
 
 DEFINES["MOZILLA_INTERNAL_API"] = True
 DEFINES["TRACING"] = True
 
 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
     DEFINES["MOZ_ANDROID_HLS_SUPPORT"] = True
 
--- a/dom/media/systemservices/CamerasChild.h
+++ b/dom/media/systemservices/CamerasChild.h
@@ -12,17 +12,17 @@
 #include "MediaEventSource.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/camera/PCamerasChild.h"
 #include "mozilla/camera/PCamerasParent.h"
 #include "nsCOMPtr.h"
 
 // conflicts with #include of scoped_ptr.h
 #undef FF
-#include "webrtc/modules/video_capture/video_capture_defines.h"
+#include "modules/video_capture/video_capture_defines.h"
 
 namespace mozilla {
 
 namespace ipc {
 class BackgroundChildImpl;
 }  // namespace ipc
 
 namespace camera {
--- a/dom/media/systemservices/CamerasParent.cpp
+++ b/dom/media/systemservices/CamerasParent.cpp
@@ -19,17 +19,17 @@
 #include "mozilla/dom/CanonicalBrowsingContext.h"
 #include "mozilla/dom/WindowGlobalParent.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/StaticPrefs_permissions.h"
 #include "nsIPermissionManager.h"
 #include "nsThreadUtils.h"
 #include "nsNetUtil.h"
 
-#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
+#include "common_video/libyuv/include/webrtc_libyuv.h"
 
 #if defined(_WIN32)
 #  include <process.h>
 #  define getpid() _getpid()
 #endif
 
 #undef LOG
 #undef LOG_VERBOSE
--- a/dom/media/systemservices/CamerasParent.h
+++ b/dom/media/systemservices/CamerasParent.h
@@ -7,24 +7,20 @@
 #ifndef mozilla_CamerasParent_h
 #define mozilla_CamerasParent_h
 
 #include "VideoEngine.h"
 #include "mozilla/camera/PCamerasParent.h"
 #include "mozilla/ipc/Shmem.h"
 #include "mozilla/ShmemPool.h"
 #include "mozilla/Atomics.h"
-#include "webrtc/modules/video_capture/video_capture.h"
-#include "webrtc/modules/video_capture/video_capture_defines.h"
-#include "webrtc/common_video/include/incoming_video_stream.h"
-#include "webrtc/media/base/videosinkinterface.h"
-
-// conflicts with #include of scoped_ptr.h
-#undef FF
-#include "webrtc/common_types.h"
+#include "api/video/video_sink_interface.h"
+#include "common_video/include/incoming_video_stream.h"
+#include "modules/video_capture/video_capture.h"
+#include "modules/video_capture/video_capture_defines.h"
 
 #include "CamerasChild.h"
 
 #include "base/thread.h"
 
 namespace mozilla {
 
 namespace camera {
--- a/dom/media/systemservices/VideoEngine.cpp
+++ b/dom/media/systemservices/VideoEngine.cpp
@@ -1,19 +1,19 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set sw=2 ts=8 et ft=cpp : */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "VideoEngine.h"
 #include "video_engine/desktop_capture_impl.h"
-#include "webrtc/system_wrappers/include/clock.h"
+#include "system_wrappers/include/clock.h"
 #ifdef WEBRTC_ANDROID
-#  include "webrtc/modules/video_capture/video_capture.h"
+#  include "modules/video_capture/video_capture.h"
 #endif
 
 #ifdef MOZ_WIDGET_ANDROID
 #  include "mozilla/jni/Utils.h"
 #endif
 
 namespace mozilla::camera {
 
--- a/dom/media/systemservices/VideoEngine.h
+++ b/dom/media/systemservices/VideoEngine.h
@@ -5,19 +5,19 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_VideoEngine_h
 #define mozilla_VideoEngine_h
 
 #include "MediaEngine.h"
 #include "VideoFrameUtils.h"
 #include "mozilla/media/MediaUtils.h"
-#include "webrtc/modules/video_capture/video_capture_impl.h"
-#include "webrtc/modules/video_capture/video_capture_defines.h"
-#include "webrtc/modules/video_capture/video_capture_factory.h"
+#include "modules/video_capture/video_capture_impl.h"
+#include "modules/video_capture/video_capture_defines.h"
+#include "modules/video_capture/video_capture_factory.h"
 #include <memory>
 #include <functional>
 
 namespace mozilla {
 namespace camera {
 
 // Historically the video engine was part of webrtc
 // it was removed (and reimplemented in Talk)
--- a/dom/media/systemservices/VideoFrameUtils.cpp
+++ b/dom/media/systemservices/VideoFrameUtils.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set sw=2 ts=8 et ft=cpp : */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "VideoFrameUtils.h"
-#include "webrtc/api/video/video_frame.h"
+#include "api/video/video_frame.h"
 #include "mozilla/ShmemPool.h"
 
 namespace mozilla {
 
 uint32_t VideoFrameUtils::TotalRequiredBufferSize(
     const webrtc::VideoFrame& aVideoFrame) {
   auto i420 = aVideoFrame.video_frame_buffer()->ToI420();
   auto height = i420->height();
--- a/dom/media/systemservices/moz.build
+++ b/dom/media/systemservices/moz.build
@@ -17,17 +17,16 @@ if CONFIG["MOZ_WEBRTC"]:
         "CamerasParent.cpp",
         "VideoEngine.cpp",
         "VideoFrameUtils.cpp",
     ]
     LOCAL_INCLUDES += [
         "/dom/media/webrtc",
         "/media/libyuv/libyuv/include",
         "/third_party/libwebrtc",
-        "/third_party/libwebrtc/webrtc",
         "/tools/profiler/public",
     ]
 
     if CONFIG["OS_TARGET"] == "Android":
         UNIFIED_SOURCES += [
             "android_video_capture/device_info_android.cc",
             "android_video_capture/video_capture_android.cc",
         ]
--- a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
@@ -10,18 +10,18 @@
 #include "MediaManager.h"
 #include "MediaTrackConstraints.h"
 #include "mozilla/ErrorNames.h"
 #include "mozilla/gfx/Point.h"
 #include "mozilla/RefPtr.h"
 #include "Tracing.h"
 #include "VideoFrameUtils.h"
 #include "VideoUtils.h"
-#include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
+#include "common_video/include/video_frame_buffer.h"
+#include "common_video/libyuv/include/webrtc_libyuv.h"
 
 namespace mozilla {
 
 extern LazyLogModule gMediaManagerLog;
 #define LOG(...) MOZ_LOG(gMediaManagerLog, LogLevel::Debug, (__VA_ARGS__))
 #define LOG_FRAME(...) \
   MOZ_LOG(gMediaManagerLog, LogLevel::Verbose, (__VA_ARGS__))
 
--- a/dom/media/webrtc/MediaEngineRemoteVideoSource.h
+++ b/dom/media/webrtc/MediaEngineRemoteVideoSource.h
@@ -29,18 +29,18 @@
 #include "mozilla/dom/MediaStreamTrackBinding.h"
 
 // Camera Access via IPC
 #include "CamerasChild.h"
 
 #include "NullTransport.h"
 
 // WebRTC includes
-#include "webrtc/common_video/include/i420_buffer_pool.h"
-#include "webrtc/modules/video_capture/video_capture_defines.h"
+#include "common_video/include/i420_buffer_pool.h"
+#include "modules/video_capture/video_capture_defines.h"
 
 namespace webrtc {
 using CaptureCapability = VideoCaptureCapability;
 }
 
 namespace mozilla {
 
 // Fitness distance is defined in
--- a/dom/media/webrtc/MediaEngineWebRTC.h
+++ b/dom/media/webrtc/MediaEngineWebRTC.h
@@ -31,20 +31,17 @@
 #include "nsComponentManagerUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsRefPtrHashtable.h"
 #include "nsThreadUtils.h"
 #include "prcvar.h"
 #include "prthread.h"
 
 // WebRTC library includes follow
-// Video Engine
-// conflicts with #include of scoped_ptr.h
-#undef FF
-#include "webrtc/modules/video_capture/video_capture_defines.h"
+#include "modules/video_capture/video_capture_defines.h"
 
 namespace mozilla {
 
 class MediaEngineWebRTC : public MediaEngine {
   typedef MediaEngine Super;
 
  public:
   explicit MediaEngineWebRTC(MediaEnginePrefs& aPrefs);
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -14,23 +14,18 @@
 #include "MediaTrackConstraints.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/ErrorNames.h"
 #include "nsContentUtils.h"
 #include "nsIDUtils.h"
 #include "transport/runnable_utils.h"
 #include "Tracing.h"
 
-// scoped_ptr.h uses FF
-#ifdef FF
-#  undef FF
-#endif
-#include "webrtc/voice_engine/voice_engine_defines.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/common_audio/include/audio_util.h"
+#include "common_audio/include/audio_util.h"
+#include "modules/audio_processing/include/audio_processing.h"
 
 using namespace webrtc;
 
 // These are restrictions from the webrtc.org code
 #define MAX_CHANNELS 2
 #define MONO 1
 #define MAX_SAMPLING_FREQ 48000  // Hz - multiple of 100
 
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.h
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.h
@@ -6,17 +6,17 @@
 #ifndef MediaEngineWebRTCAudio_h
 #define MediaEngineWebRTCAudio_h
 
 #include "AudioPacketizer.h"
 #include "AudioSegment.h"
 #include "AudioDeviceInfo.h"
 #include "MediaEngineWebRTC.h"
 #include "MediaTrackListener.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
+#include "modules/audio_processing/include/audio_processing.h"
 
 namespace mozilla {
 
 class AudioInputProcessing;
 class AudioInputTrack;
 
 // This class is created and used exclusively on the Media Manager thread, with
 // exactly two exceptions:
--- a/dom/media/webrtc/common/NullTransport.h
+++ b/dom/media/webrtc/common/NullTransport.h
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef NULL_TRANSPORT_H_
 #define NULL_TRANSPORT_H_
 
 #include "mozilla/Attributes.h"
 
-#include "webrtc/api/call/transport.h"
+#include "api/call/transport.h"
 
 namespace mozilla {
 
 /**
  * NullTransport is registered as ExternalTransport to throw away data
  */
 class NullTransport : public webrtc::Transport {
  public:
--- a/dom/media/webrtc/common/browser_logging/CSFLog.cpp
+++ b/dom/media/webrtc/common/browser_logging/CSFLog.cpp
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
 
 #include "CSFLog.h"
-#include "rtc_base/basictypes.h"
 
 #include <map>
 #include "prrwlock.h"
 #include "prthread.h"
 #include "nsThreadUtils.h"
 
 #include "mozilla/Logging.h"
 #include "mozilla/Sprintf.h"
--- a/dom/media/webrtc/common/browser_logging/WebRtcLog.cpp
+++ b/dom/media/webrtc/common/browser_logging/WebRtcLog.cpp
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "WebRtcLog.h"
 
 #include "mozilla/Logging.h"
 #include "mozilla/StaticPtr.h"
 #include "prenv.h"
-#include "common_types.h"
 #include "rtc_base/logging.h"
 
 #include "nscore.h"
 #include "nsString.h"
 #include "nsXULAppAPI.h"
 #include "mozilla/Preferences.h"
 
 #include "nsIFile.h"
--- a/dom/media/webrtc/common/moz.build
+++ b/dom/media/webrtc/common/moz.build
@@ -4,17 +4,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 include("/dom/media/webrtc/third_party_build/webrtc.mozbuild")
 
 EXPORTS.mozilla.dom += ["CandidateInfo.h"]
 
 LOCAL_INCLUDES += [
     "/dom/media/webrtc/transport/third_party/nrappkit/src/util/libekr",
-    "/third_party/libwebrtc/webrtc",
+    "/third_party/libwebrtc",
 ]
 
 UNIFIED_SOURCES += [
     "browser_logging/CSFLog.cpp",
     "browser_logging/WebRtcLog.cpp",
     "time_profiling/timecard.c",
     "YuvStamper.cpp",
 ]
--- a/dom/media/webrtc/jsapi/moz.build
+++ b/dom/media/webrtc/jsapi/moz.build
@@ -10,17 +10,16 @@ LOCAL_INCLUDES += [
     "/dom/base",
     "/dom/media",
     "/dom/media/webrtc",
     "/ipc/chromium/src",
     "/media/webrtc",
     "/netwerk/dns",  # For nsDNSService2.h
     "/third_party/libsrtp/src/include",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
 ]
 
 UNIFIED_SOURCES += [
     "MediaTransportHandler.cpp",
     "MediaTransportHandlerIPC.cpp",
     "MediaTransportParent.cpp",
     "PacketDumper.cpp",
     "PeerConnectionCtx.cpp",
--- a/dom/media/webrtc/jsep/JsepSessionImpl.cpp
+++ b/dom/media/webrtc/jsep/JsepSessionImpl.cpp
@@ -17,17 +17,17 @@
 #include "mozilla/Telemetry.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/net/DataChannelProtocol.h"
 #include "nsDebug.h"
 #include "nspr.h"
 #include "nss.h"
 #include "pk11pub.h"
 
-#include "webrtc/api/rtpparameters.h"
+#include "api/rtp_parameters.h"
 
 #include "jsep/JsepTrack.h"
 #include "jsep/JsepTransport.h"
 #include "sdp/HybridSdpParser.h"
 #include "sdp/SipccSdp.h"
 
 namespace mozilla {
 
--- a/dom/media/webrtc/jsep/moz.build
+++ b/dom/media/webrtc/jsep/moz.build
@@ -4,15 +4,14 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 include("/dom/media/webrtc/third_party_build/webrtc.mozbuild")
 
 LOCAL_INCLUDES += [
     "/dom/media/webrtc",
     "/media/webrtc",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
     "/third_party/sipcc",
 ]
 
 UNIFIED_SOURCES += ["JsepSessionImpl.cpp", "JsepTrack.cpp", "SsrcGenerator.cpp"]
 
 FINAL_LIBRARY = "xul"
--- a/dom/media/webrtc/libwebrtcglue/AudioConduit.cpp
+++ b/dom/media/webrtc/libwebrtcglue/AudioConduit.cpp
@@ -16,25 +16,23 @@
 #include "mozilla/media/MediaUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Telemetry.h"
 #include "transport/runnable_utils.h"
 
 #include "pk11pub.h"
 
-#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
-#include "webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory.h"
-
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
-#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
-#include "webrtc/voice_engine/include/voe_errors.h"
-#include "webrtc/voice_engine/voice_engine_impl.h"
-#include "webrtc/system_wrappers/include/clock.h"
+#include "api/audio_codecs/builtin_audio_decoder_factory.h"
+#include "modules/audio_processing/include/audio_processing.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "modules/rtp_rtcp/source/rtp_packet_received.h"
+#include "modules/voice_engine/include/voe_errors.h"
+#include "modules/voice_engine/voice_engine_impl.h"
+#include "system_wrappers/include/clock.h"
 
 #ifdef MOZ_WIDGET_ANDROID
 #  include "AndroidBridge.h"
 #endif
 
 namespace mozilla {
 
 static const char* acLogTag = "WebrtcAudioSessionConduit";
--- a/dom/media/webrtc/libwebrtcglue/MediaConduitInterface.h
+++ b/dom/media/webrtc/libwebrtcglue/MediaConduitInterface.h
@@ -15,26 +15,22 @@
 #include "RtcpEventObserver.h"
 #include "CodecConfig.h"
 #include "VideoTypes.h"
 #include "MediaConduitErrors.h"
 #include "jsapi/RTCStatsReport.h"
 
 #include "ImageContainer.h"
 
-#include "webrtc/call/call.h"
-#include "webrtc/common_types.h"
-#include "webrtc/common_types.h"
-#include "webrtc/api/video/video_frame_buffer.h"
-#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
-#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
-#include "webrtc/modules/audio_device/include/fake_audio_device.h"
-#include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/voice_engine/include/voe_base.h"
+#include "api/audio_codecs/builtin_audio_decoder_factory.h"
+#include "api/video/video_frame_buffer.h"
+#include "call/call.h"
+#include "modules/audio_device/include/fake_audio_device.h"
+#include "modules/audio_mixer/audio_mixer_impl.h"
+#include "modules/audio_processing/include/audio_processing.h"
 
 #include <vector>
 #include <set>
 
 namespace webrtc {
 class VideoFrame;
 }
 
--- a/dom/media/webrtc/libwebrtcglue/MediaDataCodec.h
+++ b/dom/media/webrtc/libwebrtcglue/MediaDataCodec.h
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MEDIA_DATA_CODEC_H_
 #define MEDIA_DATA_CODEC_H_
 
 #include "MediaConduitInterface.h"
-#include "webrtc/common_types.h"
 
 namespace mozilla {
 
 class WebrtcVideoDecoder;
 class WebrtcVideoEncoder;
 class MediaDataCodec {
  public:
   /**
--- a/dom/media/webrtc/libwebrtcglue/RtpRtcpConfig.h
+++ b/dom/media/webrtc/libwebrtcglue/RtpRtcpConfig.h
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __RTPRTCP_CONFIG_H__
 #define __RTPRTCP_CONFIG_H__
-#include "webrtc/common_types.h"
+#include "api/rtp_headers.h"
 
 namespace mozilla {
 class RtpRtcpConfig {
  public:
   RtpRtcpConfig() = delete;
   explicit RtpRtcpConfig(const webrtc::RtcpMode aMode) : mRtcpMode(aMode) {}
   webrtc::RtcpMode GetRtcpMode() const { return mRtcpMode; }
 
--- a/dom/media/webrtc/libwebrtcglue/RtpSourceObserver.cpp
+++ b/dom/media/webrtc/libwebrtcglue/RtpSourceObserver.cpp
@@ -1,18 +1,19 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "RtpSourceObserver.h"
 #include "nsThreadUtils.h"
-#include "webrtc/system_wrappers/include/clock.h"
-#include "webrtc/modules/include/module_common_types.h"
+
+#include "modules/include/module_common_types.h"
+#include "system_wrappers/include/clock.h"
 
 namespace mozilla {
 
 using EntryType = dom::RTCRtpSourceEntryType;
 
 double RtpSourceObserver::RtpSourceEntry::ToLinearAudioLevel() const {
   // Spec indicates that a value of 127 should be set to 0
   if (audioLevel == 127) {
--- a/dom/media/webrtc/libwebrtcglue/RtpSourceObserver.h
+++ b/dom/media/webrtc/libwebrtcglue/RtpSourceObserver.h
@@ -7,19 +7,21 @@
 #ifndef AUDIOLEVELOBSERVER_H
 #define AUDIOLEVELOBSERVER_H
 
 #include <vector>
 #include <map>
 
 #include "nsISupportsImpl.h"
 #include "mozilla/dom/RTCRtpSourcesBinding.h"
-#include "webrtc/common_types.h"
 #include "jsapi/RTCStatsReport.h"
 
+#include "api/rtp_headers.h"
+#include "modules/include/module_common_types.h"
+
 // Unit Test class
 namespace test {
 class RtpSourcesTest;
 }
 
 namespace mozilla {
 
 /* Observes reception of RTP packets and tabulates data about the
--- a/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp
+++ b/dom/media/webrtc/libwebrtcglue/VideoConduit.cpp
@@ -22,24 +22,23 @@
 #include "nsIPrefService.h"
 #include "nsServiceManagerUtils.h"
 
 #include "nsThreadUtils.h"
 
 #include "pk11pub.h"
 
 #include "api/video_codecs/sdp_video_format.h"
+#include "common_video/include/video_frame_buffer.h"
+#include "common_video/libyuv/include/webrtc_libyuv.h"
+#include "media/base/media_constants.h"
 #include "media/engine/encoder_simulcast_proxy.h"
-#include "webrtc/common_types.h"
-#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
-#include "webrtc/media/base/mediaconstants.h"
-#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
-#include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
-#include "webrtc/common_video/include/video_frame_buffer.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
+#include "modules/video_coding/codecs/vp8/include/vp8.h"
+#include "modules/video_coding/codecs/vp9/include/vp9.h"
 
 #include "mozilla/Unused.h"
 
 #if defined(MOZ_WIDGET_ANDROID)
 #  include "VideoEngine.h"
 #endif
 
 #include "GmpVideoCodec.h"
--- a/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.h
+++ b/dom/media/webrtc/libwebrtcglue/VideoStreamFactory.h
@@ -5,18 +5,18 @@
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
 
 #ifndef VideoStreamFactory_h
 #define VideoStreamFactory_h
 
 #include "CodecConfig.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/UniquePtr.h"
-#include "webrtc/media/base/videoadapter.h"
-#include "call/video_config.h"
+#include "api/video_codecs/video_encoder_config.h"
+#include "media/base/video_adapter.h"
 
 namespace mozilla {
 
 // Factory class for VideoStreams... vie_encoder.cc will call this to
 // reconfigure.
 class VideoStreamFactory
     : public webrtc::VideoEncoderConfig::VideoStreamFactoryInterface {
  public:
--- a/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcGmpVideoCodec.h
@@ -39,17 +39,17 @@
 #include "nsThreadUtils.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/Mutex.h"
 
 #include "mozIGeckoMediaPluginService.h"
 #include "MediaConduitInterface.h"
 #include "AudioConduit.h"
 #include "VideoConduit.h"
-#include "webrtc/modules/video_coding/include/video_codec_interface.h"
+#include "modules/video_coding/include/video_codec_interface.h"
 
 #include "gmp-video-host.h"
 #include "GMPVideoDecoderProxy.h"
 #include "GMPVideoEncoderProxy.h"
 
 #include "jsapi/PeerConnectionImpl.h"
 
 namespace mozilla {
--- a/dom/media/webrtc/libwebrtcglue/WebrtcImageBuffer.h
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcImageBuffer.h
@@ -2,18 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef WebrtcImageBuffer_h__
 #define WebrtcImageBuffer_h__
 
-#include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/rtc_base/keep_ref_until_done.h"
+#include "common_video/include/video_frame_buffer.h"
+#include "rtc_base/keep_ref_until_done.h"
 
 namespace mozilla {
 namespace layers {
 class Image;
 }
 
 class ImageBuffer : public webrtc::VideoFrameBuffer {
  public:
--- a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataDecoderCodec.h
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataDecoderCodec.h
@@ -6,18 +6,18 @@
 #define WebrtcMediaDataDecoderCodec_h__
 
 #include "MediaConduitInterface.h"
 #include "MediaInfo.h"
 #include "MediaResult.h"
 #include "PlatformDecoderModule.h"
 #include "VideoConduit.h"
 #include "WebrtcImageBuffer.h"
-#include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/modules/video_coding/include/video_codec_interface.h"
+#include "common_video/include/video_frame_buffer.h"
+#include "modules/video_coding/include/video_codec_interface.h"
 
 namespace webrtc {
 class DecodedImageCallback;
 }
 namespace mozilla {
 namespace layers {
 class Image;
 class ImageContainer;
--- a/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h
+++ b/dom/media/webrtc/libwebrtcglue/WebrtcMediaDataEncoderCodec.h
@@ -6,17 +6,17 @@
 #define WebrtcMediaDataEncoderCodec_h__
 
 #include "MediaConduitInterface.h"
 #include "MediaInfo.h"
 #include "MediaResult.h"
 #include "PlatformEncoderModule.h"
 #include "WebrtcGmpVideoCodec.h"
 #include "common_video/include/bitrate_adjuster.h"
-#include "webrtc/modules/video_coding/include/video_codec_interface.h"
+#include "modules/video_coding/include/video_codec_interface.h"
 
 namespace mozilla {
 
 class MediaData;
 class PEMFactory;
 class SharedThreadPool;
 class TaskQueue;
 
--- a/dom/media/webrtc/libwebrtcglue/moz.build
+++ b/dom/media/webrtc/libwebrtcglue/moz.build
@@ -8,17 +8,16 @@ include("/dom/media/webrtc/third_party_b
 LOCAL_INCLUDES += [
     "!/ipc/ipdl/_ipdlheaders",
     "/dom/media/gmp",  # for GMPLog.h,
     "/dom/media/webrtc",
     "/ipc/chromium/src",
     "/media/libyuv/libyuv/include",
     "/media/webrtc",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
 ]
 
 UNIFIED_SOURCES += [
     "AudioConduit.cpp",
     "GmpVideoCodec.cpp",
     "MediaDataCodec.cpp",
     "RtpSourceObserver.cpp",
     "VideoConduit.cpp",
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -58,17 +58,16 @@ if CONFIG["MOZ_WEBRTC"]:
     LOCAL_INCLUDES += [
         "..",
         "/dom/base",
         "/dom/media",
         "/dom/media/webrtc/common",
         "/dom/media/webrtc/common/browser_logging",
         "/media/libyuv/libyuv/include",
         "/third_party/libwebrtc",
-        "/third_party/libwebrtc/webrtc",
     ]
 
 if CONFIG["MOZ_WEBRTC_SIGNALING"]:
     DIRS += [
         "common",
         "jsapi",
         "jsep",
         "libwebrtcglue",
--- a/dom/media/webrtc/third_party_build/moz.build
+++ b/dom/media/webrtc/third_party_build/moz.build
@@ -5,60 +5,48 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "WebRTC")
 
 include("/build/gn.mozbuild")
 
 webrtc_non_unified_sources = [
-    "../../../../third_party/libwebrtc/webrtc/common_audio/vad/vad_core.c",  # Because of name clash in the kInitCheck variable
-    "../../../../third_party/libwebrtc/webrtc/common_audio/vad/webrtc_vad.c",  # Because of name clash in the kInitCheck variable
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/acm2/codec_manager.cc",  # Because of duplicate IsCodecRED/etc
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/codecs/g722/g722_decode.c",  # Because of name clash in the saturate function
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/codecs/g722/g722_encode.c",  # Because of name clash in the saturate function
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c",  # Because of name clash in the exp2_Q10_T function
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c",  # Because of name clash in the exp2_Q10_T function
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c",  # Because of name clash in the kDampFilter variable
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c",  # Because of name clash in the kDampFilter variable
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_coding/neteq/audio_vector.cc",  # Because of explicit template specializations
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/android/audio_manager.cc",  # Because of TAG redefinition
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/android/audio_record_jni.cc",  # Becuse of commonly named module static vars
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/android/audio_track_jni.cc",  # Becuse of commonly named module static vars
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/android/opensles_player.cc",  # Because of TAG redefinition
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc",  # Because of LATE()
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc",  # Because of LATE()
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_device/win/audio_device_core_win.cc",  # Because of ordering assumptions in strsafe.h
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/aec/echo_cancellation.cc",  # Because of conflicts over 'near' on windows
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/aecm/aecm_core.cc",  # Because of the PART_LEN2 define
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/aecm/aecm_core_c.cc",  # Because of the PART_LEN2 define
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc",  # Because of the PART_LEN2 define
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc",  # Because of the PART_LEN2 define
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/aecm/echo_control_mobile.cc",  # Because of the PART_LEN2 define
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/agc/legacy/analog_agc.c",  # Because of name clash in the kInitCheck variable
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc",  # Because of needing to define _USE_MATH_DEFINES before including <cmath>
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc",  # Because of needing to define _USE_MATH_DEFINES before including <cmath>
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc",  # Because of needing to define _USE_MATH_DEFINES before including <cmath>
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/echo_cancellation_impl.cc",  # Because of name clash in the MapError function
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/echo_control_mobile_impl.cc",  # Because of name clash in the MapError function
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc",  # Because of kAlpha
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/gain_control_impl.cc",  # Because of name clash in the Handle typedef
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/noise_suppression_impl.cc",  # Because of name clash in the Handle typedef
-    "../../../../third_party/libwebrtc/webrtc/modules/audio_processing/rms_level.cc",  # Because of name clash in the kMinLevel variable
-    "../../../../third_party/libwebrtc/webrtc/modules/congestion_controller/trendline_estimator.cc",  # Because of name clash in kDeltaCounterMax
-    "../../../../third_party/libwebrtc/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc",  # Because base/logging.h uses #ifndef LOG before defining anything
-    "../../../../third_party/libwebrtc/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc",  # Because of duplicate definitions of static consts against remote_bitrate_estimator_abs_send_time.cc
-    "../../../../third_party/libwebrtc/webrtc/modules/rtp_rtcp/source/flexfec_receiver.cc",  # Because of identically named functions and vars between flexfec_receiver.cc and flexfec_sender.cc in an anonymous namespaces
-    "../../../../third_party/libwebrtc/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc",  # Because of identically named functions and vars between tmmbr.cc and tmmbn.cc in an anonymous namespaces
-    "../../../../third_party/libwebrtc/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc",  # Because of identically named functions and vars between tmmbr.cc and tmmbn.cc in an anonymous namespaces
-    "../../../../third_party/libwebrtc/webrtc/modules/rtp_rtcp/source/ulpfec_generator.cc",  # Because of identically named constant kRedForFecHeaderLength in an anonymous namespace
-    "../../../../third_party/libwebrtc/webrtc/modules/video_capture/windows/device_info_ds.cc",  # Because of the MEDIASUBTYPE_HDYC variable
-    "../../../../third_party/libwebrtc/webrtc/modules/video_capture/windows/help_functions_ds.cc",  # Because of initguid.h
-    "../../../../third_party/libwebrtc/webrtc/modules/video_capture/windows/sink_filter_ds.cc",  # Because of the MEDIASUBTYPE_HDYC variable and initguid.h
-    "../../../../third_party/libwebrtc/webrtc/video/overuse_frame_detector.cc",  # Because of name clash with call_stats.cc on kWeightFactor
+    "../../../../third_party/libwebrtc/common_audio/vad/vad_core.c",                                  # Because of name clash in the kInitCheck variable
+    "../../../../third_party/libwebrtc/common_audio/vad/webrtc_vad.c",                                # Because of name clash in the kInitCheck variable
+    "../../../../third_party/libwebrtc/modules/audio_coding/codecs/isac/fix/source/decode_plc.c",   # Because of name clash in the exp2_Q10_T function
+    "../../../../third_party/libwebrtc/modules/audio_coding/codecs/isac/fix/source/lpc_masking_model.c",   # Because of name clash in the exp2_Q10_T function
+    "../../../../third_party/libwebrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c",   # Because of name clash in the kDampFilter variable
+    "../../../../third_party/libwebrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter_c.c", # Because of name clash in the kDampFilter variable
+    "../../../../third_party/libwebrtc/modules/audio_coding/neteq/audio_vector.cc",                   # Because of explicit template specializations
+    "../../../../third_party/libwebrtc/modules/audio_device/android/audio_manager.cc",                # Because of TAG redefinition
+    "../../../../third_party/libwebrtc/modules/audio_device/android/audio_record_jni.cc",             # Becuse of commonly named module static vars
+    "../../../../third_party/libwebrtc/modules/audio_device/android/audio_track_jni.cc",              # Becuse of commonly named module static vars
+    "../../../../third_party/libwebrtc/modules/audio_device/android/opensles_player.cc",              # Because of TAG redefinition
+    "../../../../third_party/libwebrtc/modules/audio_device/linux/audio_device_pulse_linux.cc",       # Because of LATE()
+    "../../../../third_party/libwebrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc",# Because of LATE()
+    "../../../../third_party/libwebrtc/modules/audio_device/win/audio_device_core_win.cc",            # Because of ordering assumptions in strsafe.h
+    "../../../../third_party/libwebrtc/modules/audio_processing/aecm/aecm_core.cc",                   # Because of the PART_LEN2 define
+    "../../../../third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_c.cc",                 # Because of the PART_LEN2 define
+    "../../../../third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_mips.cc",              # Because of the PART_LEN2 define
+    "../../../../third_party/libwebrtc/modules/audio_processing/aecm/aecm_core_neon.cc",              # Because of the PART_LEN2 define
+    "../../../../third_party/libwebrtc/modules/audio_processing/aecm/echo_control_mobile.cc",         # Because of the PART_LEN2 define
+    "../../../../third_party/libwebrtc/modules/audio_processing/echo_control_mobile_impl.cc",         # Because of name clash in the MapError function
+    "../../../../third_party/libwebrtc/modules/audio_processing/echo_detector/normalized_covariance_estimator.cc", # Because of kAlpha
+    "../../../../third_party/libwebrtc/modules/audio_processing/gain_control_impl.cc",                # Because of name clash in the Handle typedef
+    "../../../../third_party/libwebrtc/modules/audio_processing/rms_level.cc",                        # Because of name clash in the kMinLevel variable
+    "../../../../third_party/libwebrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc",       # Because base/logging.h uses #ifndef LOG before defining anything
+    "../../../../third_party/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc", # Because of duplicate definitions of static consts against remote_bitrate_estimator_abs_send_time.cc
+    "../../../../third_party/libwebrtc/modules/rtp_rtcp/source/flexfec_receiver.cc",                  # Because of identically named functions and vars between flexfec_receiver.cc and flexfec_sender.cc in an anonymous namespaces
+    "../../../../third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc",                 # Because of identically named functions and vars between tmmbr.cc and tmmbn.cc in an anonymous namespaces
+    "../../../../third_party/libwebrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc",                 # Because of identically named functions and vars between tmmbr.cc and tmmbn.cc in an anonymous namespaces
+    "../../../../third_party/libwebrtc/modules/rtp_rtcp/source/ulpfec_generator.cc",                  # Because of identically named constant kRedForFecHeaderLength in an anonymous namespace
+    "../../../../third_party/libwebrtc/modules/video_capture/windows/device_info_ds.cc",              # Because of the MEDIASUBTYPE_HDYC variable
+    "../../../../third_party/libwebrtc/modules/video_capture/windows/help_functions_ds.cc",           # Because of initguid.h
+    "../../../../third_party/libwebrtc/modules/video_capture/windows/sink_filter_ds.cc",              # Because of the MEDIASUBTYPE_HDYC variable and initguid.h
 ]
 
 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
     DIRS += ["../../../../third_party/pipewire/libpipewire"]
 
 GN_DIRS += ["../../../../third_party/libwebrtc/webrtc"]
 
 gn_vars_copy = gn_vars.copy()
--- a/dom/media/webrtc/transportbridge/MediaPipeline.cpp
+++ b/dom/media/webrtc/transportbridge/MediaPipeline.cpp
@@ -41,18 +41,18 @@
 #include "mozilla/gfx/Point.h"
 #include "mozilla/gfx/Types.h"
 #include "nsError.h"
 #include "nsThreadUtils.h"
 #include "transport/runnable_utils.h"
 #include "jsapi/MediaTransportHandler.h"
 #include "Tracing.h"
 #include "libwebrtcglue/WebrtcImageBuffer.h"
-#include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
+#include "common_video/include/video_frame_buffer.h"
+#include "modules/rtp_rtcp/include/rtp_rtcp.h"
 
 // Max size given stereo is 480*2*2 = 1920 (10ms of 16-bits stereo audio at
 // 48KHz)
 #define AUDIO_SAMPLE_BUFFER_MAX_BYTES (480 * 2 * 2)
 static_assert((WEBRTC_MAX_SAMPLE_RATE / 100) * sizeof(uint16_t) * 2 <=
                   AUDIO_SAMPLE_BUFFER_MAX_BYTES,
               "AUDIO_SAMPLE_BUFFER_MAX_BYTES is not large enough");
 
--- a/dom/media/webrtc/transportbridge/MediaPipeline.h
+++ b/dom/media/webrtc/transportbridge/MediaPipeline.h
@@ -19,17 +19,17 @@
 #include "transport/SrtpFlow.h"  // For SRTP_MAX_EXPANSION
 #include "transport/mediapacket.h"
 #include "transport/runnable_utils.h"
 #include "AudioPacketizer.h"
 #include "MediaPipelineFilter.h"
 #include "MediaSegment.h"
 #include "jsapi/PacketDumper.h"
 
-#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
+#include "test/rtp_header_parser.h"
 
 // Should come from MediaEngine.h, but that's a pain to include here
 // because of the MOZILLA_EXTERNAL_LINKAGE stuff.
 #define WEBRTC_MAX_SAMPLE_RATE 48000
 
 class nsIPrincipal;
 
 namespace mozilla {
--- a/dom/media/webrtc/transportbridge/MediaPipelineFilter.cpp
+++ b/dom/media/webrtc/transportbridge/MediaPipelineFilter.cpp
@@ -4,18 +4,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Original author: bcampen@mozilla.com
 
 #include "MediaPipelineFilter.h"
 
-#include "webrtc/common_types.h"
-#include "webrtc/api/rtpparameters.h"
+#include "api/rtpparameters.h"
 #include "mozilla/Logging.h"
 
 // defined in MediaPipeline.cpp
 extern mozilla::LazyLogModule gMediaPipelineLog;
 
 #define DEBUG_LOG(x) MOZ_LOG(gMediaPipelineLog, LogLevel::Debug, x)
 
 namespace mozilla {
--- a/dom/media/webrtc/transportbridge/RtpLogger.h
+++ b/dom/media/webrtc/transportbridge/RtpLogger.h
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Original author: nohlmeier@mozilla.com
 
 #ifndef rtplogger_h__
 #define rtplogger_h__
 
-#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
+#include "test/rtp_header_parser.h"
 #include "transport/mediapacket.h"
 
 namespace mozilla {
 
 /* This class logs RTP and RTCP packets in hex in a format compatible to
  * text2pcap.
  * Example to convert the MOZ log file into a PCAP file:
  *   egrep '(RTP_PACKET|RTCP_PACKET)' moz.log | \
--- a/dom/media/webrtc/transportbridge/moz.build
+++ b/dom/media/webrtc/transportbridge/moz.build
@@ -10,17 +10,16 @@ LOCAL_INCLUDES += [
     "/dom/media",
     "/dom/media/webrtc",
     "/ipc/chromium/src",
     "/media/libyuv/libyuv/include",
     "/media/webrtc",
     "/third_party/libsrtp/src/crypto/include",
     "/third_party/libsrtp/src/include",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
 ]
 
 UNIFIED_SOURCES += [
     "MediaPipeline.cpp",
     "MediaPipelineFilter.cpp",
     "RtpLogger.cpp",
 ]
 
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -211,17 +211,16 @@ else:
 
 LOCAL_INCLUDES += [
     "/caps",
     "/dom/broadcastchannel",
     "/dom/indexedDB",
     "/dom/storage",
     "/netwerk/base",
     "/third_party/libwebrtc",
-    "/third_party/libwebrtc/webrtc",
     "/xpcom/build",
 ]
 
 IPDL_SOURCES = [
     "InputStreamParams.ipdlh",
     "IPCStream.ipdlh",
     "PBackground.ipdl",
     "PBackgroundSharedTypes.ipdlh",
--- a/media/webrtc/signaling/gtest/MockCall.h
+++ b/media/webrtc/signaling/gtest/MockCall.h
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOCK_CALL_H_
 #define MOCK_CALL_H_
 
 #include "mozilla/Assertions.h"
-#include <webrtc/api/call/audio_sink.h>
-#include <webrtc/call/call.h>
+#include <api/call/audio_sink.h>
+#include <call/call.h>
 
 using namespace webrtc;
 
 namespace test {
 
 class MockAudioSendStream : public webrtc::AudioSendStream {
  public:
   MockAudioSendStream() : mConfig(nullptr) {}
--- a/media/webrtc/signaling/gtest/moz.build
+++ b/media/webrtc/signaling/gtest/moz.build
@@ -29,17 +29,16 @@ if (
         "/dom/media/webrtc/transport",
         "/dom/media/webrtc/transport/test",
         "/dom/media/webrtc/transport/third_party/nrappkit/src/registry",
         "/dom/media/webrtc/transportbridge",
         "/ipc/chromium/src",
         "/media/webrtc/",
         "/third_party/libsrtp/src/include",
         "/third_party/libwebrtc",
-        "/third_party/libwebrtc/webrtc",
         "/third_party/sipcc",
     ]
 
     SOURCES += [
         "audioconduit_unittests.cpp",
         "jsep_session_unittest.cpp",
         "jsep_track_unittest.cpp",
         "mediapipeline_unittest.cpp",
--- a/media/webrtc/signaling/gtest/rtpsources_unittests.cpp
+++ b/media/webrtc/signaling/gtest/rtpsources_unittests.cpp
@@ -1,11 +1,11 @@
 #include <RtpSourceObserver.h>
 #include "RTCStatsReport.h"
-#include "webrtc/modules/include/module_common_types.h"
+#include "modules/include/module_common_types.h"
 #define GTEST_HAS_RTTI 0
 #include "gtest/gtest.h"
 
 using namespace mozilla;
 
 namespace test {
 class RtpSourcesTest : public ::testing::Test {
   using RtpSourceHistory = RtpSourceObserver::RtpSourceHistory;
--- a/media/webrtc/signaling/gtest/videoconduit_unittests.cpp
+++ b/media/webrtc/signaling/gtest/videoconduit_unittests.cpp
@@ -9,18 +9,18 @@
 #include "nspr.h"
 #include "nss.h"
 #include "ssl.h"
 
 #include "VideoConduit.h"
 #include "RtpRtcpConfig.h"
 #include "WebrtcGmpVideoCodec.h"
 
-#include "webrtc/media/base/videoadapter.h"
-#include "webrtc/media/base/videosinkinterface.h"
+#include "api/video/video_sink_interface.h"
+#include "media/base/video_adapter.h"
 
 #include "MockCall.h"
 
 using namespace mozilla;
 
 namespace test {
 
 class MockVideoSink : public rtc::VideoSinkInterface<webrtc::VideoFrame> {