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
39 "gmp-plugin-openh264",
62 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
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 += [
83 "test/mochitest.toml",
84 "test/mochitest_background_video.toml",
85 "test/mochitest_bugs.toml",
86 "test/mochitest_compat.toml",
87 "test/mochitest_eme.toml",
88 "test/mochitest_eme_compat.toml",
89 "test/mochitest_media_engine.toml",
90 "test/mochitest_media_recorder.toml",
91 "test/mochitest_seek.toml",
92 "test/mochitest_stream.toml",
93 "webrtc/tests/mochitests/identity/mochitest.toml",
96 MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.toml"]
98 BROWSER_CHROME_MANIFESTS += [
99 "mediacontrol/tests/browser/browser.toml",
100 "mediasession/test/browser.toml",
101 "test/browser/browser.toml",
102 "test/browser/wmfme/browser.toml",
105 if CONFIG["MOZ_WEBRTC"]:
106 MOCHITEST_MANIFESTS += [
107 "webrtc/tests/mochitests/mochitest.toml",
108 "webrtc/tests/mochitests/mochitest_datachannel.toml",
109 "webrtc/tests/mochitests/mochitest_getusermedia.toml",
110 "webrtc/tests/mochitests/mochitest_peerconnection.toml",
113 CRASHTEST_MANIFESTS += ["webrtc/tests/crashtests/crashtests.list"]
116 "nsIAudioDeviceInfo.idl",
117 "nsIMediaDevice.idl",
118 "nsIMediaManager.idl",
121 XPIDL_MODULE = "dom_media"
124 "../../third_party/rust/audio_thread_priority/audio_thread_priority.h",
128 "AudibilityMonitor.h",
129 "AudioBufferUtils.h",
130 "AudioChannelFormat.h",
138 "AudioSampleFormat.h",
141 "BackgroundVideoDecodingPermissionObserver.h",
145 "BufferMediaResource.h",
148 "CallbackThreadRegistry.h",
149 "ChannelMediaDecoder.h",
154 "DriftCompensation.h",
156 "ExternalEngineStateMachine.h",
158 "ForwardedInputTrack.h",
163 "MediaContainerType.h",
165 "MediaDataDemuxer.h",
167 "MediaDecoderOwner.h",
168 "MediaDecoderStateMachine.h",
169 "MediaDecoderStateMachineBase.h",
170 "MediaEventSource.h",
171 "MediaFormatReader.h",
173 "MediaMetadataManager.h",
175 "MediaPlaybackDelayPolicy.h",
176 "MediaPromiseDefs.h",
180 "MediaResourceCallback.h",
183 "MediaShutdownManager.h",
186 "MediaStreamWindowCapturer.h",
191 "MediaTrackListener.h",
192 "MemoryBlockCache.h",
194 "nsIDocumentActivity.h",
195 "PrincipalChangeObserver.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 "ExternalEngineStateMachine.cpp",
279 "FileBlockCache.cpp",
280 "FileMediaResource.cpp",
281 "ForwardedInputTrack.cpp",
282 "GetUserMediaRequest.cpp",
287 "MediaContainerType.cpp",
289 "MediaDecoderStateMachine.cpp",
290 "MediaDecoderStateMachineBase.cpp",
291 "MediaDeviceInfo.cpp",
293 "MediaFormatReader.cpp",
296 "MediaMIMETypes.cpp",
297 "MediaPlaybackDelayPolicy.cpp",
300 "MediaShutdownManager.cpp",
301 "MediaStreamError.cpp",
302 "MediaStreamTrack.cpp",
303 "MediaStreamWindowCapturer.cpp",
306 "MediaTrackGraph.cpp",
307 "MediaTrackList.cpp",
308 "MediaTrackListener.cpp",
309 "MemoryBlockCache.cpp",
315 "VideoFrameContainer.cpp",
316 "VideoPlaybackQuality.cpp",
318 "VideoStreamTrack.cpp",
320 "VideoTrackList.cpp",
325 if CONFIG["OS_TARGET"] == "Linux":
326 UNIFIED_SOURCES += ["UnderrunHandlerLinux.cpp"]
328 UNIFIED_SOURCES += ["UnderrunHandlerNoop.cpp"]
330 # CubebUtils.cpp needs to be built separately due to what appears to be some kind
331 # of compiler bug on Android 4.2 x86 opt. See bug 1408459.
332 # DecoderTraits.cpp needs to be built separately because of Mac OS X headers.
333 # MediaData.cpp : ambiguous compilation error caused by Mac OS X headers.
340 # Some codec-related code uses multi-character constants, which GCC and clang
341 # warn about. Suppress turning this warning into an error.
342 SOURCES["DecoderTraits.cpp"].flags += ["-Wno-error=multichar"]
344 if CONFIG["MOZ_WEBRTC"]:
349 EXTRA_JS_MODULES.media += [
350 "PeerConnection.sys.mjs",
353 EXTRA_JS_MODULES.media += [
354 "IdpSandbox.sys.mjs",
355 "PeerConnectionIdp.sys.mjs",
359 "!/media/libsoundtouch/src",
366 "/media/libyuv/libyuv/include",
368 "/toolkit/content/tests/browser/",
371 if CONFIG["MOZ_WEBRTC"]:
373 "/dom/media/webrtc/common",
374 "/third_party/libwebrtc",
375 "/third_party/libwebrtc/third_party/abseil-cpp",
378 DEFINES["MOZILLA_INTERNAL_API"] = True
380 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
381 DEFINES["MOZ_ANDROID_HLS_SUPPORT"] = True
383 if CONFIG["COMPILE_ENVIRONMENT"]:
385 "!audioipc2_client_ffi_generated.h",
386 "!audioipc2_server_ffi_generated.h",
390 "audioipc2_client_ffi_generated.h",
391 inputs=["/third_party/rust/audioipc2-client"],
395 "audioipc2_server_ffi_generated.h",
396 inputs=["/third_party/rust/audioipc2-server"],
399 if CONFIG["ENABLE_TESTS"]:
401 "test/rdd_process_xpcom",
404 include("/ipc/chromium/chromium-config.mozbuild")
406 # Suppress some GCC warnings being treated as errors:
407 # - about attributes on forward declarations for types that are already
408 # defined, which complains about an important MOZ_EXPORT for android::AString
409 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
411 "-Wno-error=attributes",
414 CXXFLAGS += ["-Werror=switch"]
416 FINAL_LIBRARY = "xul"