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",
199 "RLBoxSoundTouchTypes.h",
206 "VideoFrameContainer.h",
219 EXPORTS.mozilla.media.webrtc += [
220 "webrtc/WebrtcGlobal.h",
221 "webrtc/WebrtcIPCTraits.h",
224 if not CONFIG["MOZ_WEBRTC"]:
225 EXPORTS.transport += [
226 "webrtc/transport/runnable_utils.h",
229 EXPORTS.mozilla.dom += [
231 "AudioStreamTrack.h",
234 "CanvasCaptureMediaStream.h",
235 "GetUserMediaRequest.h",
238 "MediaStreamError.h",
239 "MediaStreamTrack.h",
240 "VideoPlaybackQuality.h",
241 "VideoStreamTrack.h",
244 "webrtc/MediaTransportChild.h",
245 "webrtc/MediaTransportParent.h",
251 "AudioCaptureTrack.cpp",
252 "AudioChannelFormat.cpp",
253 "AudioCompactor.cpp",
255 "AudioConverter.cpp",
256 "AudioDeviceInfo.cpp",
257 "AudioInputSource.cpp",
258 "AudioRingBuffer.cpp",
261 "AudioStreamTrack.cpp",
263 "AudioTrackList.cpp",
264 "BackgroundVideoDecodingPermissionObserver.cpp",
265 "BaseMediaResource.cpp",
269 "CallbackThreadRegistry.cpp",
270 "CanvasCaptureMediaStream.cpp",
271 "ChannelMediaDecoder.cpp",
272 "ChannelMediaResource.cpp",
273 "CloneableWithRangeMediaResource.cpp",
274 "CrossGraphPort.cpp",
275 "CubebInputStream.cpp",
276 "DeviceInputTrack.cpp",
277 "DOMMediaStream.cpp",
278 "DynamicResampler.cpp",
279 "ExternalEngineStateMachine.cpp",
280 "FileBlockCache.cpp",
281 "FileMediaResource.cpp",
282 "ForwardedInputTrack.cpp",
283 "GetUserMediaRequest.cpp",
288 "MediaContainerType.cpp",
290 "MediaDecoderStateMachine.cpp",
291 "MediaDecoderStateMachineBase.cpp",
292 "MediaDeviceInfo.cpp",
294 "MediaFormatReader.cpp",
297 "MediaMIMETypes.cpp",
298 "MediaPlaybackDelayPolicy.cpp",
301 "MediaShutdownManager.cpp",
302 "MediaStreamError.cpp",
303 "MediaStreamTrack.cpp",
304 "MediaStreamWindowCapturer.cpp",
307 "MediaTrackGraph.cpp",
308 "MediaTrackList.cpp",
309 "MediaTrackListener.cpp",
310 "MemoryBlockCache.cpp",
313 "RLBoxSoundTouch.cpp",
317 "VideoFrameContainer.cpp",
318 "VideoPlaybackQuality.cpp",
320 "VideoStreamTrack.cpp",
322 "VideoTrackList.cpp",
327 if CONFIG["OS_TARGET"] == "Linux":
328 UNIFIED_SOURCES += ["UnderrunHandlerLinux.cpp"]
330 UNIFIED_SOURCES += ["UnderrunHandlerNoop.cpp"]
332 # CubebUtils.cpp needs to be built separately due to what appears to be some kind
333 # of compiler bug on Android 4.2 x86 opt. See bug 1408459.
334 # DecoderTraits.cpp needs to be built separately because of Mac OS X headers.
335 # MediaData.cpp : ambiguous compilation error caused by Mac OS X headers.
342 # Some codec-related code uses multi-character constants, which GCC and clang
343 # warn about. Suppress turning this warning into an error.
344 SOURCES["DecoderTraits.cpp"].flags += ["-Wno-error=multichar"]
346 if CONFIG["MOZ_WEBRTC"]:
351 EXTRA_JS_MODULES.media += [
352 "PeerConnection.sys.mjs",
355 EXTRA_JS_MODULES.media += [
356 "IdpSandbox.sys.mjs",
357 "PeerConnectionIdp.sys.mjs",
368 "/media/libyuv/libyuv/include",
370 "/toolkit/content/tests/browser/",
373 if CONFIG["MOZ_WEBRTC"]:
375 "/dom/media/webrtc/common",
376 "/third_party/libwebrtc",
377 "/third_party/libwebrtc/third_party/abseil-cpp",
380 DEFINES["MOZILLA_INTERNAL_API"] = True
382 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
383 DEFINES["MOZ_ANDROID_HLS_SUPPORT"] = True
385 if CONFIG["COMPILE_ENVIRONMENT"]:
387 "!audioipc2_client_ffi_generated.h",
388 "!audioipc2_server_ffi_generated.h",
392 "audioipc2_client_ffi_generated.h",
393 inputs=["/third_party/rust/audioipc2-client"],
397 "audioipc2_server_ffi_generated.h",
398 inputs=["/third_party/rust/audioipc2-server"],
401 if CONFIG["ENABLE_TESTS"]:
403 "test/rdd_process_xpcom",
406 include("/ipc/chromium/chromium-config.mozbuild")
408 # Suppress some GCC warnings being treated as errors:
409 # - about attributes on forward declarations for types that are already
410 # defined, which complains about an important MOZ_EXPORT for android::AString
411 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
413 "-Wno-error=attributes",
416 CXXFLAGS += ["-Werror=switch"]
418 FINAL_LIBRARY = "xul"