summaryrefslogtreecommitdiff
path: root/dom/media/webrtc/moz.build
blob: 5b76e17cb90df12745c6058be2913331e8cc058c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- 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/.

with Files('*'):
    BUG_COMPONENT = ('Core', 'WebRTC: Audio/Video')

with Files('PeerIdentity.*'):
    BUG_COMPONENT = ('Core', 'WebRTC: Signaling')

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',
    ]
    SOURCES += [
        'MediaEngineTabVideoSource.cpp',
        'MediaEngineWebRTC.cpp',
        'MediaEngineWebRTCAudio.cpp',
        'RTCCertificate.cpp',
        'RTCIdentityProviderRegistrar.cpp',
    ]
    LOCAL_INCLUDES += [
        '/dom/base',
        '/media/libyuv/include',
        '/media/webrtc/signaling/src/common',
        '/media/webrtc/signaling/src/common/browser_logging',
        '/media/webrtc/trunk',
    ]

XPIDL_SOURCES += [
    'nsITabSource.idl'
]

UNIFIED_SOURCES += [
    'MediaTrackConstraints.cpp',
]
SOURCES += [
    'MediaEngineDefault.cpp',
    'PeerIdentity.cpp',
]

EXPORTS.mozilla += [
    'PeerIdentity.h',
]
EXPORTS.mozilla.dom += [
    'RTCCertificate.h',
]

include('/ipc/chromium/chromium-config.mozbuild')

# Suppress some GCC/clang warnings being treated as errors:
#  - about attributes on forward declarations for types that are already
#    defined, which complains about important MOZ_EXPORT attributes for
#    android API types
if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
    CXXFLAGS += [
        '-Wno-error=attributes',
        '-Wno-error=shadow',
    ]

FINAL_LIBRARY = 'xul'

if CONFIG['_MSC_VER']:
    CXXFLAGS += [
        '-wd4275', # non dll-interface class used as base for dll-interface class
        '-wd4312', # This is intended as a temporary hack to support building with VS2015
                   # 'reinterpret_cast': conversion from 'DWORD' to 'HANDLE' of greater size
    ]
    DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__'