Bug 1708422: part 16) Rename `mozInlineSpellChecker::SpellCheckerTimeSlice` to `mozIn...
[gecko.git] / dom / media / moz.build
blob20dc56e7440e94d8ed1a380b62463b0757fc0362
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")
8 with Files("*"):
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
30 DIRS += [
31     "autoplay",
32     "doctor",
33     "eme",
34     "encoder",
35     "fake-cdm",
36     "flac",
37     "gmp",
38     "gmp-plugin-openh264",
39     "imagecapture",
40     "ipc",
41     "mediacapabilities",
42     "mediacontrol",
43     "mediasink",
44     "mediasource",
45     "mediasession",
46     "mp3",
47     "ogg",
48     "platforms",
49     "systemservices",
50     "utils",
51     "wave",
52     "webaudio",
53     "webm",
54     "webrtc",
55     "webspeech",
56     "webvtt",
59 if CONFIG["MOZ_ANDROID_HLS_SUPPORT"]:
60     DIRS += ["hls"]
62 if CONFIG["MOZ_FMP4"]:
63     DIRS += ["mp4"]
65 if CONFIG["MOZ_WEBRTC"]:
66     DIRS += ["bridge"]
68 TEST_DIRS += [
69     "gtest",
72 # Add libFuzzer configuration directives
73 include("/tools/fuzzing/libfuzzer-config.mozbuild")
75 if CONFIG["FUZZING_INTERFACES"]:
76     TEST_DIRS += ["fuzz"]
78 if CONFIG["MOZ_WEBRTC_SIGNALING"]:
79     if CONFIG["FUZZING_INTERFACES"]:
80         TEST_DIRS += ["webrtc/tests/fuzztests"]
82 MOCHITEST_MANIFESTS += [
83     "test/mochitest.ini",
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"]
98 XPIDL_SOURCES += [
99     "nsIAudioDeviceInfo.idl",
100     "nsIMediaDevice.idl",
101     "nsIMediaManager.idl",
104 XPIDL_MODULE = "dom_media"
106 EXPORTS += [
107     "../../third_party/rust/audio_thread_priority/audio_thread_priority.h",
108     "ADTSDecoder.h",
109     "ADTSDemuxer.h",
110     "AsyncLogger.h",
111     "AudibilityMonitor.h",
112     "AudioBufferUtils.h",
113     "AudioChannelFormat.h",
114     "AudioCompactor.h",
115     "AudioConfig.h",
116     "AudioConverter.h",
117     "AudioDeviceInfo.h",
118     "AudioDriftCorrection.h",
119     "AudioMixer.h",
120     "AudioPacketizer.h",
121     "AudioRingBuffer.h",
122     "AudioSampleFormat.h",
123     "AudioSegment.h",
124     "AudioStream.h",
125     "AudioThreadRegistry.h",
126     "BackgroundVideoDecodingPermissionObserver.h",
127     "Benchmark.h",
128     "BitReader.h",
129     "BitWriter.h",
130     "BufferMediaResource.h",
131     "BufferReader.h",
132     "ByteWriter.h",
133     "ChannelMediaDecoder.h",
134     "CrossGraphPort.h",
135     "CubebUtils.h",
136     "DecoderTraits.h",
137     "DOMMediaStream.h",
138     "DriftCompensation.h",
139     "DynamicResampler.h",
140     "FileBlockCache.h",
141     "ForwardedInputTrack.h",
142     "FrameStatistics.h",
143     "ImageToI420.h",
144     "Intervals.h",
145     "MediaCache.h",
146     "MediaContainerType.h",
147     "MediaData.h",
148     "MediaDataDemuxer.h",
149     "MediaDecoder.h",
150     "MediaDecoderOwner.h",
151     "MediaDecoderStateMachine.h",
152     "MediaEventSource.h",
153     "MediaFormatReader.h",
154     "MediaInfo.h",
155     "MediaMetadataManager.h",
156     "MediaMIMETypes.h",
157     "MediaPlaybackDelayPolicy.h",
158     "MediaPromiseDefs.h",
159     "MediaQueue.h",
160     "MediaRecorder.h",
161     "MediaResource.h",
162     "MediaResourceCallback.h",
163     "MediaResult.h",
164     "MediaSegment.h",
165     "MediaShutdownManager.h",
166     "MediaSpan.h",
167     "MediaStatistics.h",
168     "MediaStreamWindowCapturer.h",
169     "MediaTimer.h",
170     "MediaTrack.h",
171     "MediaTrackGraph.h",
172     "MediaTrackList.h",
173     "MediaTrackListener.h",
174     "MemoryBlockCache.h",
175     "MPSCQueue.h",
176     "nsIDocumentActivity.h",
177     "PrincipalChangeObserver.h",
178     "PrincipalHandle.h",
179     "QueueObject.h",
180     "SeekJob.h",
181     "SeekTarget.h",
182     "SelfRef.h",
183     "SharedBuffer.h",
184     "ThreadPoolCOMListener.h",
185     "TimeUnits.h",
186     "Tracing.h",
187     "VideoFrameContainer.h",
188     "VideoLimits.h",
189     "VideoSegment.h",
190     "VideoUtils.h",
191     "VorbisUtils.h",
192     "WavDumper.h",
193     "XiphExtradata.h",
196 EXPORTS.mozilla += [
197     "MediaManager.h",
198     "UnderrunHandler.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",
209     ]
211 EXPORTS.mozilla.dom += [
212     "AudioDeviceInfo.h",
213     "AudioStreamTrack.h",
214     "AudioTrack.h",
215     "AudioTrackList.h",
216     "CanvasCaptureMediaStream.h",
217     "GetUserMediaRequest.h",
218     "MediaDeviceInfo.h",
219     "MediaDevices.h",
220     "MediaStreamError.h",
221     "MediaStreamTrack.h",
222     "VideoPlaybackQuality.h",
223     "VideoStreamTrack.h",
224     "VideoTrack.h",
225     "VideoTrackList.h",
226     "webrtc/MediaTransportChild.h",
227     "webrtc/MediaTransportParent.h",
230 UNIFIED_SOURCES += [
231     "ADTSDecoder.cpp",
232     "ADTSDemuxer.cpp",
233     "AudioCaptureTrack.cpp",
234     "AudioChannelFormat.cpp",
235     "AudioCompactor.cpp",
236     "AudioConfig.cpp",
237     "AudioConverter.cpp",
238     "AudioDeviceInfo.cpp",
239     "AudioRingBuffer.cpp",
240     "AudioSegment.cpp",
241     "AudioStream.cpp",
242     "AudioStreamTrack.cpp",
243     "AudioTrack.cpp",
244     "AudioTrackList.cpp",
245     "BackgroundVideoDecodingPermissionObserver.cpp",
246     "BaseMediaResource.cpp",
247     "Benchmark.cpp",
248     "BitReader.cpp",
249     "BitWriter.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",
261     "GraphDriver.cpp",
262     "GraphRunner.cpp",
263     "ImageToI420.cpp",
264     "MediaCache.cpp",
265     "MediaContainerType.cpp",
266     "MediaData.cpp",
267     "MediaDecoder.cpp",
268     "MediaDecoderStateMachine.cpp",
269     "MediaDeviceInfo.cpp",
270     "MediaDevices.cpp",
271     "MediaFormatReader.cpp",
272     "MediaInfo.cpp",
273     "MediaManager.cpp",
274     "MediaMIMETypes.cpp",
275     "MediaPlaybackDelayPolicy.cpp",
276     "MediaRecorder.cpp",
277     "MediaResource.cpp",
278     "MediaShutdownManager.cpp",
279     "MediaStreamError.cpp",
280     "MediaStreamTrack.cpp",
281     "MediaStreamWindowCapturer.cpp",
282     "MediaTimer.cpp",
283     "MediaTrack.cpp",
284     "MediaTrackGraph.cpp",
285     "MediaTrackList.cpp",
286     "MediaTrackListener.cpp",
287     "MemoryBlockCache.cpp",
288     "QueueObject.cpp",
289     "ReaderProxy.cpp",
290     "SeekJob.cpp",
291     "Tracing.cpp",
292     "VideoFrameContainer.cpp",
293     "VideoPlaybackQuality.cpp",
294     "VideoSegment.cpp",
295     "VideoStreamTrack.cpp",
296     "VideoTrack.cpp",
297     "VideoTrackList.cpp",
298     "VideoUtils.cpp",
299     "XiphExtradata.cpp",
302 if CONFIG["OS_TARGET"] == "Linux":
303     UNIFIED_SOURCES += ["UnderrunHandlerLinux.cpp"]
304 else:
305     UNIFIED_SOURCES += ["UnderrunHandlerNoop.cpp"]
307 if CONFIG["OS_TARGET"] == "WINNT":
308     SOURCES += [
309         "ThreadPoolCOMListener.cpp",
310     ]
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.
315 SOURCES += [
316     "CubebUtils.cpp",
317     "DecoderTraits.cpp",
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"]:
325     XPCOM_MANIFESTS += [
326         "components.conf",
327     ]
329     EXTRA_JS_MODULES.media += [
330         "PeerConnection.jsm",
331     ]
333 EXTRA_JS_MODULES.media += [
334     "IdpSandbox.jsm",
335     "PeerConnectionIdp.jsm",
338 LOCAL_INCLUDES += [
339     "/caps",
340     "/docshell/base",
341     "/dom/base",
342     "/layout/generic",
343     "/layout/xul",
344     "/media/libyuv/libyuv/include",
345     "/netwerk/base",
346     "/toolkit/content/tests/browser/",
349 if CONFIG["MOZ_WEBRTC"]:
350     LOCAL_INCLUDES += [
351         "/dom/media/webrtc/common",
352         "/third_party/libwebrtc",
353         "/third_party/libwebrtc/webrtc",
354     ]
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"]:
363     EXPORTS += [
364         "!audioipc_client_ffi_generated.h",
365         "!audioipc_server_ffi_generated.h",
366     ]
368     CbindgenHeader(
369         "audioipc_client_ffi_generated.h", inputs=["/third_party/rust/audioipc-client"]
370     )
372     CbindgenHeader(
373         "audioipc_server_ffi_generated.h", inputs=["/third_party/rust/audioipc-server"]
374     )
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"):
382     CXXFLAGS += [
383         "-Wno-error=attributes",
384         "-Wno-error=shadow",
385     ]
387 CXXFLAGS += ["-Werror=switch"]
389 FINAL_LIBRARY = "xul"