1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 include("/dom/media/webrtc/third_party_build/webrtc.mozbuild")
9 BUG_COMPONENT = ("Core", "Audio/Video")
11 with Files("test/**"):
12 BUG_COMPONENT = ("Core", "Audio/Video: Playback")
14 with Files("gtest/TestGMP*"):
15 BUG_COMPONENT = ("Core", "Audio/Video: GMP")
17 with Files("tests/**"):
18 BUG_COMPONENT = ("Core", "WebRTC")
20 component_signaling = ("Core", "WebRTC: Signaling")
21 with Files("IdpSandbox.jsm"):
22 BUG_COMPONENT = component_signaling
23 with Files("PeerConnection*"):
24 BUG_COMPONENT = component_signaling
26 component_av = ("Core", "WebRTC: Audio/Video")
27 with Files("GetUserMedia*"):
28 BUG_COMPONENT = component_av
38 "gmp-plugin-openh264",
59 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
62 if CONFIG["MOZ_FMP4"]:
65 if CONFIG["MOZ_WEBRTC"]:
72 # Add libFuzzer configuration directives
73 include("/tools/fuzzing/libfuzzer-config.mozbuild")
75 if CONFIG["FUZZING_INTERFACES"]:
78 if CONFIG["MOZ_WEBRTC_SIGNALING"]:
79 if CONFIG["FUZZING_INTERFACES"]:
80 TEST_DIRS += ["webrtc/tests/fuzztests"]
82 MOCHITEST_MANIFESTS += [
84 "webrtc/tests/mochitests/identity/mochitest.ini",
87 MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.ini"]
89 BROWSER_CHROME_MANIFESTS += [
90 "mediacontrol/tests/browser/browser.ini",
91 "mediasession/test/browser.ini",
92 "test/browser/browser.ini",
95 if CONFIG["MOZ_WEBRTC"]:
96 MOCHITEST_MANIFESTS += ["webrtc/tests/mochitests/mochitest.ini"]
99 "nsIAudioDeviceInfo.idl",
100 "nsIMediaDevice.idl",
101 "nsIMediaManager.idl",
104 XPIDL_MODULE = "dom_media"
107 "../../third_party/rust/audio_thread_priority/audio_thread_priority.h",
111 "AudibilityMonitor.h",
112 "AudioBufferUtils.h",
113 "AudioChannelFormat.h",
118 "AudioDriftCorrection.h",
122 "AudioSampleFormat.h",
125 "AudioThreadRegistry.h",
126 "BackgroundVideoDecodingPermissionObserver.h",
130 "BufferMediaResource.h",
133 "ChannelMediaDecoder.h",
138 "DriftCompensation.h",
139 "DynamicResampler.h",
141 "ForwardedInputTrack.h",
146 "MediaContainerType.h",
148 "MediaDataDemuxer.h",
150 "MediaDecoderOwner.h",
151 "MediaDecoderStateMachine.h",
152 "MediaEventSource.h",
153 "MediaFormatReader.h",
155 "MediaMetadataManager.h",
157 "MediaPlaybackDelayPolicy.h",
158 "MediaPromiseDefs.h",
162 "MediaResourceCallback.h",
165 "MediaShutdownManager.h",
168 "MediaStreamWindowCapturer.h",
173 "MediaTrackListener.h",
174 "MemoryBlockCache.h",
176 "nsIDocumentActivity.h",
177 "PrincipalChangeObserver.h",
184 "ThreadPoolCOMListener.h",
187 "VideoFrameContainer.h",
201 EXPORTS.mozilla.media.webrtc += [
202 "webrtc/WebrtcGlobal.h",
203 "webrtc/WebrtcIPCTraits.h",
206 if not CONFIG["MOZ_WEBRTC"]:
207 EXPORTS.transport += [
208 "webrtc/transport/runnable_utils.h",
211 EXPORTS.mozilla.dom += [
213 "AudioStreamTrack.h",
216 "CanvasCaptureMediaStream.h",
217 "GetUserMediaRequest.h",
220 "MediaStreamError.h",
221 "MediaStreamTrack.h",
222 "VideoPlaybackQuality.h",
223 "VideoStreamTrack.h",
226 "webrtc/MediaTransportChild.h",
227 "webrtc/MediaTransportParent.h",
233 "AudioCaptureTrack.cpp",
234 "AudioChannelFormat.cpp",
235 "AudioCompactor.cpp",
237 "AudioConverter.cpp",
238 "AudioDeviceInfo.cpp",
239 "AudioRingBuffer.cpp",
242 "AudioStreamTrack.cpp",
244 "AudioTrackList.cpp",
245 "BackgroundVideoDecodingPermissionObserver.cpp",
246 "BaseMediaResource.cpp",
250 "CanvasCaptureMediaStream.cpp",
251 "ChannelMediaDecoder.cpp",
252 "ChannelMediaResource.cpp",
253 "CloneableWithRangeMediaResource.cpp",
254 "CrossGraphPort.cpp",
255 "DOMMediaStream.cpp",
256 "DynamicResampler.cpp",
257 "FileBlockCache.cpp",
258 "FileMediaResource.cpp",
259 "ForwardedInputTrack.cpp",
260 "GetUserMediaRequest.cpp",
265 "MediaContainerType.cpp",
268 "MediaDecoderStateMachine.cpp",
269 "MediaDeviceInfo.cpp",
271 "MediaFormatReader.cpp",
274 "MediaMIMETypes.cpp",
275 "MediaPlaybackDelayPolicy.cpp",
278 "MediaShutdownManager.cpp",
279 "MediaStreamError.cpp",
280 "MediaStreamTrack.cpp",
281 "MediaStreamWindowCapturer.cpp",
284 "MediaTrackGraph.cpp",
285 "MediaTrackList.cpp",
286 "MediaTrackListener.cpp",
287 "MemoryBlockCache.cpp",
292 "VideoFrameContainer.cpp",
293 "VideoPlaybackQuality.cpp",
295 "VideoStreamTrack.cpp",
297 "VideoTrackList.cpp",
302 if CONFIG["OS_TARGET"] == "Linux":
303 UNIFIED_SOURCES += ["UnderrunHandlerLinux.cpp"]
305 UNIFIED_SOURCES += ["UnderrunHandlerNoop.cpp"]
307 if CONFIG["OS_TARGET"] == "WINNT":
309 "ThreadPoolCOMListener.cpp",
312 # CubebUtils.cpp needs to be built separately due to what appears to be some kind
313 # of compiler bug on Android 4.2 x86 opt. See bug 1408459.
314 # DecoderTraits.cpp needs to be built separately because of Mac OS X headers.
320 # Some codec-related code uses multi-character constants, which GCC and clang
321 # warn about. Suppress turning this warning into an error.
322 SOURCES["DecoderTraits.cpp"].flags += ["-Wno-error=multichar"]
324 if CONFIG["MOZ_WEBRTC"]:
329 EXTRA_JS_MODULES.media += [
330 "PeerConnection.jsm",
333 EXTRA_JS_MODULES.media += [
335 "PeerConnectionIdp.jsm",
344 "/media/libyuv/libyuv/include",
346 "/toolkit/content/tests/browser/",
349 if CONFIG["MOZ_WEBRTC"]:
351 "/dom/media/webrtc/common",
352 "/third_party/libwebrtc",
353 "/third_party/libwebrtc/webrtc",
356 DEFINES["MOZILLA_INTERNAL_API"] = True
357 DEFINES["TRACING"] = True
359 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
360 DEFINES["MOZ_ANDROID_HLS_SUPPORT"] = True
362 if CONFIG["COMPILE_ENVIRONMENT"]:
364 "!audioipc_client_ffi_generated.h",
365 "!audioipc_server_ffi_generated.h",
369 "audioipc_client_ffi_generated.h", inputs=["/third_party/rust/audioipc-client"]
373 "audioipc_server_ffi_generated.h", inputs=["/third_party/rust/audioipc-server"]
376 include("/ipc/chromium/chromium-config.mozbuild")
378 # Suppress some GCC warnings being treated as errors:
379 # - about attributes on forward declarations for types that are already
380 # defined, which complains about an important MOZ_EXPORT for android::AString
381 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
383 "-Wno-error=attributes",
387 CXXFLAGS += ["-Werror=switch"]
389 FINAL_LIBRARY = "xul"