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.sys.mjs"):
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",
61 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
64 if CONFIG["MOZ_WEBRTC"]:
71 # Add libFuzzer configuration directives
72 include("/tools/fuzzing/libfuzzer-config.mozbuild")
74 if CONFIG["FUZZING_INTERFACES"]:
77 if CONFIG["MOZ_WEBRTC_SIGNALING"]:
78 if CONFIG["FUZZING_INTERFACES"]:
79 TEST_DIRS += ["webrtc/tests/fuzztests"]
81 MOCHITEST_MANIFESTS += [
83 "test/mochitest_background_video.ini",
84 "test/mochitest_bugs.ini",
85 "test/mochitest_compat.ini",
86 "test/mochitest_eme.ini",
87 "test/mochitest_media_engine.ini",
88 "test/mochitest_media_recorder.ini",
89 "test/mochitest_seek.ini",
90 "test/mochitest_stream.ini",
91 "webrtc/tests/mochitests/identity/mochitest.ini",
94 MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.toml"]
96 BROWSER_CHROME_MANIFESTS += [
97 "mediacontrol/tests/browser/browser.toml",
98 "mediasession/test/browser.toml",
99 "test/browser/browser.toml",
100 "test/browser/wmfme/browser.toml",
103 if CONFIG["MOZ_WEBRTC"]:
104 MOCHITEST_MANIFESTS += [
105 "webrtc/tests/mochitests/mochitest.ini",
106 "webrtc/tests/mochitests/mochitest_datachannel.ini",
107 "webrtc/tests/mochitests/mochitest_getusermedia.ini",
108 "webrtc/tests/mochitests/mochitest_peerconnection.ini",
111 CRASHTEST_MANIFESTS += ["webrtc/tests/crashtests/crashtests.list"]
114 "nsIAudioDeviceInfo.idl",
115 "nsIMediaDevice.idl",
116 "nsIMediaManager.idl",
119 XPIDL_MODULE = "dom_media"
122 "../../third_party/rust/audio_thread_priority/audio_thread_priority.h",
126 "AudibilityMonitor.h",
127 "AudioBufferUtils.h",
128 "AudioChannelFormat.h",
133 "AudioDriftCorrection.h",
137 "AudioSampleFormat.h",
140 "BackgroundVideoDecodingPermissionObserver.h",
144 "BufferMediaResource.h",
147 "CallbackThreadRegistry.h",
148 "ChannelMediaDecoder.h",
153 "DriftCompensation.h",
154 "DynamicResampler.h",
155 "ExternalEngineStateMachine.h",
157 "ForwardedInputTrack.h",
162 "MediaContainerType.h",
164 "MediaDataDemuxer.h",
166 "MediaDecoderOwner.h",
167 "MediaDecoderStateMachine.h",
168 "MediaDecoderStateMachineBase.h",
169 "MediaEventSource.h",
170 "MediaFormatReader.h",
172 "MediaMetadataManager.h",
174 "MediaPlaybackDelayPolicy.h",
175 "MediaPromiseDefs.h",
179 "MediaResourceCallback.h",
182 "MediaShutdownManager.h",
185 "MediaStreamWindowCapturer.h",
190 "MediaTrackListener.h",
191 "MemoryBlockCache.h",
193 "nsIDocumentActivity.h",
194 "PrincipalChangeObserver.h",
204 "VideoFrameContainer.h",
217 EXPORTS.mozilla.media.webrtc += [
218 "webrtc/WebrtcGlobal.h",
219 "webrtc/WebrtcIPCTraits.h",
222 if not CONFIG["MOZ_WEBRTC"]:
223 EXPORTS.transport += [
224 "webrtc/transport/runnable_utils.h",
227 EXPORTS.mozilla.dom += [
229 "AudioStreamTrack.h",
232 "CanvasCaptureMediaStream.h",
233 "GetUserMediaRequest.h",
236 "MediaStreamError.h",
237 "MediaStreamTrack.h",
238 "VideoPlaybackQuality.h",
239 "VideoStreamTrack.h",
242 "webrtc/MediaTransportChild.h",
243 "webrtc/MediaTransportParent.h",
249 "AudioCaptureTrack.cpp",
250 "AudioChannelFormat.cpp",
251 "AudioCompactor.cpp",
253 "AudioConverter.cpp",
254 "AudioDeviceInfo.cpp",
255 "AudioInputSource.cpp",
256 "AudioRingBuffer.cpp",
259 "AudioStreamTrack.cpp",
261 "AudioTrackList.cpp",
262 "BackgroundVideoDecodingPermissionObserver.cpp",
263 "BaseMediaResource.cpp",
267 "CallbackThreadRegistry.cpp",
268 "CanvasCaptureMediaStream.cpp",
269 "ChannelMediaDecoder.cpp",
270 "ChannelMediaResource.cpp",
271 "CloneableWithRangeMediaResource.cpp",
272 "CrossGraphPort.cpp",
273 "CubebInputStream.cpp",
274 "DeviceInputTrack.cpp",
275 "DOMMediaStream.cpp",
276 "DynamicResampler.cpp",
277 "ExternalEngineStateMachine.cpp",
278 "FileBlockCache.cpp",
279 "FileMediaResource.cpp",
280 "ForwardedInputTrack.cpp",
281 "GetUserMediaRequest.cpp",
286 "MediaContainerType.cpp",
288 "MediaDecoderStateMachine.cpp",
289 "MediaDecoderStateMachineBase.cpp",
290 "MediaDeviceInfo.cpp",
292 "MediaFormatReader.cpp",
295 "MediaMIMETypes.cpp",
296 "MediaPlaybackDelayPolicy.cpp",
299 "MediaShutdownManager.cpp",
300 "MediaStreamError.cpp",
301 "MediaStreamTrack.cpp",
302 "MediaStreamWindowCapturer.cpp",
305 "MediaTrackGraph.cpp",
306 "MediaTrackList.cpp",
307 "MediaTrackListener.cpp",
308 "MemoryBlockCache.cpp",
314 "VideoFrameContainer.cpp",
315 "VideoPlaybackQuality.cpp",
317 "VideoStreamTrack.cpp",
319 "VideoTrackList.cpp",
324 if CONFIG["OS_TARGET"] == "Linux":
325 UNIFIED_SOURCES += ["UnderrunHandlerLinux.cpp"]
327 UNIFIED_SOURCES += ["UnderrunHandlerNoop.cpp"]
329 # CubebUtils.cpp needs to be built separately due to what appears to be some kind
330 # of compiler bug on Android 4.2 x86 opt. See bug 1408459.
331 # DecoderTraits.cpp needs to be built separately because of Mac OS X headers.
332 # MediaData.cpp : ambiguous compilation error caused by Mac OS X headers.
339 # Some codec-related code uses multi-character constants, which GCC and clang
340 # warn about. Suppress turning this warning into an error.
341 SOURCES["DecoderTraits.cpp"].flags += ["-Wno-error=multichar"]
343 if CONFIG["MOZ_WEBRTC"]:
348 EXTRA_JS_MODULES.media += [
349 "PeerConnection.sys.mjs",
352 EXTRA_JS_MODULES.media += [
353 "IdpSandbox.sys.mjs",
354 "PeerConnectionIdp.sys.mjs",
358 "!/media/libsoundtouch/src",
365 "/media/libyuv/libyuv/include",
367 "/toolkit/content/tests/browser/",
370 if CONFIG["MOZ_WEBRTC"]:
372 "/dom/media/webrtc/common",
373 "/third_party/libwebrtc",
374 "/third_party/libwebrtc/third_party/abseil-cpp",
377 DEFINES["MOZILLA_INTERNAL_API"] = True
379 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
380 DEFINES["MOZ_ANDROID_HLS_SUPPORT"] = True
382 if CONFIG["COMPILE_ENVIRONMENT"]:
384 "!audioipc2_client_ffi_generated.h",
385 "!audioipc2_server_ffi_generated.h",
389 "audioipc2_client_ffi_generated.h",
390 inputs=["/third_party/rust/audioipc2-client"],
394 "audioipc2_server_ffi_generated.h",
395 inputs=["/third_party/rust/audioipc2-server"],
398 if CONFIG["ENABLE_TESTS"]:
400 "test/rdd_process_xpcom",
403 include("/ipc/chromium/chromium-config.mozbuild")
405 # Suppress some GCC warnings being treated as errors:
406 # - about attributes on forward declarations for types that are already
407 # defined, which complains about an important MOZ_EXPORT for android::AString
408 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
410 "-Wno-error=attributes",
413 CXXFLAGS += ["-Werror=switch"]
415 FINAL_LIBRARY = "xul"