Bug 1382182 - Build media-conduit using moz.build; r?ted,jesup draft
authorDan Minor <dminor@mozilla.com>
Fri, 21 Jul 2017 12:07:07 -0400
changeset 616065 ab10c7644e972154e75a3d67860bc5a6d09de906
parent 616064 9c21e1564a3cc87b91a9c8dcae2787e35f41aaa7
child 616066 b2d6108deec6e6e2dd6e548d79b6f9a17804964e
push id70559
push userbmo:dminor@mozilla.com
push dateWed, 26 Jul 2017 17:25:19 +0000
reviewersted, jesup
bugs1382182
milestone56.0a1
Bug 1382182 - Build media-conduit using moz.build; r?ted,jesup MozReview-Commit-ID: I0mHRkY4owZ
media/webrtc/signaling/moz.build
media/webrtc/signaling/signaling.gyp
media/webrtc/signaling/src/media-conduit/AudioConduit.h
media/webrtc/signaling/src/media-conduit/moz.build
media/webrtc/signaling/src/mediapipeline/RtpLogger.cpp
--- a/media/webrtc/signaling/moz.build
+++ b/media/webrtc/signaling/moz.build
@@ -1,9 +1,10 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 DIRS += [
   'src/jsep',
+  'src/media-conduit',
   'src/sdp',
 ]
--- a/media/webrtc/signaling/signaling.gyp
+++ b/media/webrtc/signaling/signaling.gyp
@@ -89,22 +89,16 @@
       'export_dependent_settings': [
       ],
 
 
       #
       # SOURCES
       #
       'sources': [
-        # Media Conduit
-        './src/media-conduit/AudioConduit.h',
-        './src/media-conduit/AudioConduit.cpp',
-        './src/media-conduit/VideoConduit.h',
-        './src/media-conduit/VideoConduit.cpp',
-        './src/media-conduit/RunningStat.h',
         # Common
         './src/common/CommonTypes.h',
         './src/common/csf_common.h',
         './src/common/NullDeleter.h',
         './src/common/PtrVector.h',
         './src/common/Wrapper.h',
         './src/common/NullTransport.h',
         './src/common/YuvStamper.cpp',
@@ -205,24 +199,16 @@
           'include_dirs': [
             './test'
           ],
           'defines' : [
             'NO_CHROMIUM_LOGGING',
             'USE_FAKE_PCOBSERVER',
           ],
         }],
-        ['build_for_standalone==0', {
-          'sources': [
-            './src/media-conduit/GmpVideoCodec.cpp',
-            './src/media-conduit/MediaDataDecoderCodec.cpp',
-            './src/media-conduit/WebrtcGmpVideoCodec.cpp',
-            './src/media-conduit/WebrtcMediaDataDecoderCodec.cpp',
-          ],
-        }],
         ['build_for_standalone!=0', {
           'include_dirs': [
             './test'
           ],
           'defines' : [
             'NO_CHROMIUM_LOGGING',
             'USE_FAKE_PCOBSERVER',
           ],
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.h
@@ -159,17 +159,17 @@ public:
   /**
    * Webrtc transport implementation to send and receive RTCP packet.
    * AudioConduit registers itself as ExternalTransport to the VoiceEngine
    */
   virtual bool SendRtcp(const uint8_t *data,
                         size_t len) override;
 
   virtual uint64_t CodecPluginID() override { return 0; }
-  virtual void SetPCHandle(const std::string& aPCHandle) {}
+  virtual void SetPCHandle(const std::string& aPCHandle) override {}
 
   explicit WebrtcAudioConduit():
                       mVoiceEngine(nullptr),
                       mTransportMonitor("WebrtcAudioConduit"),
                       mTransmitterTransport(nullptr),
                       mReceiverTransport(nullptr),
                       mEngineTransmitting(false),
                       mEngineReceiving(false),
new file mode 100644
--- /dev/null
+++ b/media/webrtc/signaling/src/media-conduit/moz.build
@@ -0,0 +1,52 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+LOCAL_INCLUDES += [
+  '!/ipc/ipdl/_ipdlheaders',
+  '/ipc/chromium/src',
+  '/media/libyuv/libyuv/include',
+  '/media/mtransport',
+  '/media/webrtc',
+  '/media/webrtc/signaling/src/common',
+  '/media/webrtc/signaling/src/common/browser_logging',
+  '/media/webrtc/signaling/src/common/time_profiling',
+  '/media/webrtc/signaling/src/peerconnection',
+  '/media/webrtc/trunk',
+]
+
+if CONFIG['OS_TARGET'] == 'Linux':
+  DEFINES['WEBRTC_LINUX'] = True
+  DEFINES['WEBRTC_POSIX'] = True
+elif CONFIG['OS_TARGET'] == 'Darwin':
+  DEFINES['WEBRTC_MAC'] = True
+  DEFINES['WEBRTC_POSIX'] = True
+elif CONFIG['OS_TARGET'] == 'WINNT':
+  DEFINES['WEBRTC_WIN'] = True
+else:
+  DEFINES['WEBRTC_POSIX'] = True
+
+SOURCES += [
+  'AudioConduit.cpp',
+  'VideoConduit.cpp',
+]
+
+UNIFIED_SOURCES += [
+  'GmpVideoCodec.cpp',
+  'MediaDataDecoderCodec.cpp',
+  'WebrtcGmpVideoCodec.cpp',
+  'WebrtcMediaDataDecoderCodec.cpp',
+]
+
+if CONFIG['OS_TARGET'] == 'Android':
+  # Duplicate definition of logTag
+  SOURCES += [
+    'MediaCodecVideoCodec.cpp',
+    'WebrtcMediaCodecVP8VideoCodec.cpp',
+  ]
+
+FINAL_LIBRARY = 'xul'
+
+if CONFIG['GNU_CXX']:
+    CXXFLAGS += ['-Wno-shadow']
--- a/media/webrtc/signaling/src/mediapipeline/RtpLogger.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/RtpLogger.cpp
@@ -2,16 +2,18 @@
  * 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
 
 #include "RtpLogger.h"
 #include "logging.h"
 
+#include <ctime>
+#include <iomanip>
 #include <sstream>
 #ifdef _WIN32
 #include <time.h>
 #include <sys/timeb.h>
 #else
 #include <sys/time.h>
 #endif