Bug 1382182 - Build jsep using moz.build; r?ted,jesup
MozReview-Commit-ID: 9UhlBZi0yO0
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -1,13 +1,14 @@
# -*- 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/.
+include('/media/webrtc/webrtc.mozbuild')
FILES_PER_UNIFIED_FILE = 6
with Files('*'):
BUG_COMPONENT = ('Core', 'Audio/Video')
with Files('test/**'):
BUG_COMPONENT = ('Core', 'Audio/Video: Playback')
@@ -307,21 +308,16 @@ LOCAL_INCLUDES += [
if CONFIG['MOZ_WEBRTC']:
LOCAL_INCLUDES += [
'/media/webrtc/signaling/src/common',
'/media/webrtc/trunk',
]
DEFINES['MOZILLA_INTERNAL_API'] = True
-if CONFIG['OS_TARGET'] == 'WINNT':
- DEFINES['WEBRTC_WIN'] = True
-else:
- DEFINES['WEBRTC_POSIX'] = True
-
if CONFIG['ANDROID_VERSION'] > '15':
DEFINES['MOZ_OMX_WEBM_DECODER'] = True
if CONFIG['MOZ_GONK_MEDIACODEC']:
DEFINES['MOZ_GONK_MEDIACODEC'] = True
if CONFIG['MOZ_ANDROID_HLS_SUPPORT']:
DEFINES['MOZ_ANDROID_HLS_SUPPORT'] = True
--- a/dom/media/systemservices/moz.build
+++ b/dom/media/systemservices/moz.build
@@ -1,13 +1,14 @@
# -*- Mode: python; c-basic-offset: 4; 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/.
+include('/media/webrtc/webrtc.mozbuild')
if CONFIG['MOZ_WEBRTC']:
EXPORTS += [
'CamerasChild.h',
'CamerasParent.h',
'VideoEngine.h',
'VideoFrameUtils.h'
]
@@ -17,20 +18,17 @@ if CONFIG['MOZ_WEBRTC']:
'ShmemPool.cpp',
'VideoEngine.cpp',
'VideoFrameUtils.cpp'
]
LOCAL_INCLUDES += [
'/media/webrtc/signaling',
'/media/webrtc/trunk',
]
-if CONFIG['OS_TARGET'] == 'WINNT':
- DEFINES['WEBRTC_WIN'] = True
-else:
- DEFINES['WEBRTC_POSIX'] = True
+if CONFIG['OS_TARGET'] != 'WINNT':
# Must match build/gyp.mozbuild: enable_libevent
DEFINES['WEBRTC_BUILD_LIBEVENT'] = True
if CONFIG['OS_TARGET'] == 'Android':
DEFINES['WEBRTC_ANDROID'] = True
if CONFIG['OS_TARGET'] == 'Android':
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -1,13 +1,14 @@
# -*- 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/.
+include('/media/webrtc/webrtc.mozbuild')
with Files('*'):
BUG_COMPONENT = ('Core', 'WebRTC: Audio/Video')
with Files('PeerIdentity.*'):
BUG_COMPONENT = ('Core', 'WebRTC: Signaling')
XPIDL_MODULE = 'content_webrtc'
@@ -15,20 +16,16 @@ XPIDL_MODULE = 'content_webrtc'
EXPORTS += [
'MediaEngine.h',
'MediaEngineCameraVideoSource.h',
'MediaEngineDefault.h',
'MediaTrackConstraints.h',
]
if CONFIG['MOZ_WEBRTC']:
- if CONFIG['OS_TARGET'] == 'WINNT':
- DEFINES['WEBRTC_WIN'] = True
- else:
- DEFINES['WEBRTC_POSIX'] = True
EXPORTS += ['AudioOutputObserver.h',
'MediaEngineRemoteVideoSource.h',
'MediaEngineWebRTC.h']
EXPORTS.mozilla.dom += [ 'RTCIdentityProviderRegistrar.h' ]
UNIFIED_SOURCES += [
'MediaEngineCameraVideoSource.cpp',
'MediaEngineRemoteVideoSource.cpp',
'MediaEngineTabVideoSource.cpp',
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -1,13 +1,14 @@
# -*- 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/.
+include('/media/webrtc/webrtc.mozbuild')
EXPORTS += [
'nsIIPCBackgroundChildCreateCallback.h',
'nsIIPCSerializableInputStream.h',
'nsIIPCSerializableURI.h',
]
EXPORTS.mozilla.ipc += [
@@ -46,27 +47,25 @@ EXPORTS.mozilla.ipc += [
'WindowsMessageLoop.h',
]
if CONFIG['FUZZING'] == '1':
EXPORTS.mozilla.ipc += ['Faulty.h']
SOURCES += ['Faulty.cpp']
if CONFIG['OS_ARCH'] == 'WINNT':
- DEFINES['WEBRTC_WIN'] = True
EXPORTS.mozilla.ipc += [
'Transport_win.h',
]
SOURCES += [
'SharedMemory_windows.cpp',
'Transport_win.cpp',
'WindowsMessageLoop.cpp',
]
else:
- DEFINES['WEBRTC_POSIX'] = True
EXPORTS.mozilla.ipc += [
'Transport_posix.h',
]
UNIFIED_SOURCES += [
'SharedMemory_posix.cpp',
'Transport_posix.cpp',
]
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -70,22 +70,18 @@ elif CONFIG['MOZ_TSAN']:
GYP_DIRS['trunk'].input = 'trunk/peerconnection.gyp'
GYP_DIRS['trunk'].variables = gyp_vars_copy
# We allow warnings for third-party code that can be updated from upstream.
GYP_DIRS['trunk'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
GYP_DIRS['trunk'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
GYP_DIRS['trunk'].non_unified_sources += webrtc_non_unified_sources
-if CONFIG['ENABLE_TESTS']:
- TEST_DIRS += [
-# 'trunk/gtest',
- ]
-
if CONFIG['MOZ_WEBRTC_SIGNALING']:
+ DIRS += ['signaling']
GYP_DIRS += ['signaling']
GYP_DIRS['signaling'].input = 'signaling/signaling.gyp'
GYP_DIRS['signaling'].variables = gyp_vars_copy.copy()
GYP_DIRS['signaling'].variables.update(
build_for_test=0,
build_for_standalone=0
)
GYP_DIRS['signaling'].sandbox_vars['FINAL_LIBRARY'] = 'xul'
--- a/media/webrtc/signaling/gtest/moz.build
+++ b/media/webrtc/signaling/gtest/moz.build
@@ -1,28 +1,17 @@
# -*- 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/.
+include('../../webrtc.mozbuild')
# TODO: bug 1172551 - get these tests working on iOS
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit' and CONFIG['OS_TARGET'] != 'Android':
- if CONFIG['OS_TARGET'] == 'Linux':
- DEFINES['WEBRTC_LINUX'] = True
- DEFINES['WEBRTC_POSIX'] = True
- elif CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
- DEFINES['WEBRTC_BSD'] = 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
-
LOCAL_INCLUDES += [
'/dom/media',
'/ipc/chromium/src',
'/media/mtransport',
'/media/mtransport/test',
'/media/mtransport/third_party/nrappkit/src/registry',
'/media/webrtc/',
'/media/webrtc/signaling/src/common',
new file mode 100644
--- /dev/null
+++ b/media/webrtc/signaling/moz.build
@@ -0,0 +1,8 @@
+# -*- 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',
+]
--- a/media/webrtc/signaling/signaling.gyp
+++ b/media/webrtc/signaling/signaling.gyp
@@ -163,26 +163,16 @@
'./src/sdp/SipccSdp.h',
'./src/sdp/SipccSdpAttributeList.h',
'./src/sdp/SipccSdpAttributeList.cpp',
'./src/sdp/SipccSdpMediaSection.h',
'./src/sdp/SipccSdpParser.h',
'./src/sdp/SipccSdp.cpp',
'./src/sdp/SipccSdpMediaSection.cpp',
'./src/sdp/SipccSdpParser.cpp',
-
- # JSEP
- './src/jsep/JsepCodecDescription.h',
- './src/jsep/JsepSession.h',
- './src/jsep/JsepSessionImpl.cpp',
- './src/jsep/JsepSessionImpl.h',
- './src/jsep/JsepTrack.cpp',
- './src/jsep/JsepTrack.h',
- './src/jsep/JsepTrackEncoding.h',
- './src/jsep/JsepTransport.h'
],
#
# DEFINES
#
'defines' : [
'LOG4CXX_STATIC',
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -16,17 +16,16 @@
#include "logging.h"
#include "mozilla/Move.h"
#include "mozilla/UniquePtr.h"
#include "webrtc/config.h"
#include "signaling/src/jsep/JsepTrack.h"
-#include "signaling/src/jsep/JsepTrack.h"
#include "signaling/src/jsep/JsepTransport.h"
#include "signaling/src/sdp/Sdp.h"
#include "signaling/src/sdp/SipccSdp.h"
#include "signaling/src/sdp/SipccSdpParser.h"
#include "mozilla/net/DataChannelProtocol.h"
namespace mozilla {
new file mode 100644
--- /dev/null
+++ b/media/webrtc/signaling/src/jsep/moz.build
@@ -0,0 +1,22 @@
+# -*- 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/.
+include('../../../webrtc.mozbuild')
+
+LOCAL_INCLUDES += [
+ '/media/mtransport',
+ '/media/webrtc',
+ '/media/webrtc/trunk',
+]
+
+UNIFIED_SOURCES += [
+ 'JsepSessionImpl.cpp',
+ 'JsepTrack.cpp'
+]
+
+FINAL_LIBRARY = 'xul'
+
+if CONFIG['GNU_CXX']:
+ CXXFLAGS += ['-Wno-shadow']
--- a/media/webrtc/trunk/gtest/moz.build
+++ b/media/webrtc/trunk/gtest/moz.build
@@ -2,16 +2,17 @@
# 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/.
# Once we have gn support available in the build system
# (see Bug 1336429) we can use the gn build files directly
# rather than building things here.
+include('../../webrtc.mozbuild')
ALLOW_COMPILER_WARNINGS = True
DEFINES['GTEST_RELATIVE_PATH'] = True
DEFINES['WEBRTC_APM_DEBUG_DUMP'] = True
DEFINES['WEBRTC_INTELLIGIBILITY_ENHANCER'] = 0
# Hit build errors on windows with xutility otherwise
@@ -51,18 +52,16 @@ else:
if CONFIG['MOZ_SYSTEM_LIBVPX']:
OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
else:
USE_LIBS += ['media_libvpx']
if CONFIG['OS_TARGET'] in ['Darwin', 'Linux', 'WINNT']:
if CONFIG['OS_TARGET'] == 'Linux':
DEFINES['WEBRTC_BUILD_LIBEVENT'] = True
- DEFINES['WEBRTC_LINUX'] = True
- DEFINES['WEBRTC_POSIX'] = True
LOCAL_INCLUDES += [
'../third_party/gflags/gen/posix/include',
'../third_party/gflags/gen/posix/include/private',
]
if CONFIG['MOZ_SYSTEM_LIBEVENT']:
OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
@@ -77,18 +76,16 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
'Xcomposite',
'Xdamage',
'Xext',
'Xfixes',
'Xrandr',
'Xrender',
]
elif CONFIG['OS_TARGET'] == 'Darwin':
- DEFINES['WEBRTC_MAC'] = True
- DEFINES['WEBRTC_POSIX'] = True
DEFINES['MOZ_JEMALLOC_IMPL'] = True
LOCAL_INCLUDES += [
'../third_party/gflags/gen/posix/include',
'../third_party/gflags/gen/posix/include/private',
]
USE_LIBS += [
@@ -110,18 +107,16 @@ if CONFIG['OS_TARGET'] in ['Darwin', 'Li
'-F%s' % CONFIG['MACOS_PRIVATE_FRAMEWORKS_DIR'],
'-framework CoreUI',
]
SOURCES += [
'OSXRunLoopSingleton.cpp',
]
elif CONFIG['OS_TARGET'] == 'WINNT':
- DEFINES['WEBRTC_WIN'] = True
-
DEFINES['UNICODE'] = True
DEFINES['_UNICODE'] = True
LOCAL_INCLUDES += [
'../third_party/gflags/gen/win/include',
'../third_party/gflags/gen/win/include/private',
]
new file mode 100644
--- /dev/null
+++ b/media/webrtc/webrtc.mozbuild
@@ -0,0 +1,21 @@
+# -*- 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/.
+if CONFIG['MOZ_WEBRTC']:
+ DEFINES['HAVE_UINT64_T'] = True
+ if CONFIG['OS_TARGET'] != 'WINNT':
+ DEFINES['WEBRTC_POSIX'] = True
+
+ if CONFIG['OS_TARGET'] == 'Linux':
+ DEFINES['WEBRTC_LINUX'] = True
+ elif CONFIG['OS_TARGET'] == 'Darwin':
+ DEFINES['WEBRTC_MAC'] = True
+ elif CONFIG['OS_TARGET'] == 'WINNT':
+ DEFINES['WEBRTC_WIN'] = True
+ DEFINES['HAVE_WINSOCK2_H'] = True
+ elif CONFIG['OS_TARGET'] in ('DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD'):
+ DEFINES['WEBRTC_BSD'] = True
+ elif CONFIG['OS_TARGET'] == 'Android':
+ DEFINES['WEBRTC_ANDROID'] = True