1 # -*- Mode: python; c-basic-offset: 4; 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/.
24 if CONFIG['MOZ_WAVE']:
27 if CONFIG['MOZ_WEBM']:
30 if CONFIG['MOZ_GSTREAMER']:
33 if CONFIG['MOZ_DIRECTSHOW']:
34 DIRS += ['directshow']
36 if CONFIG['MOZ_ANDROID_OMX']:
42 if CONFIG['MOZ_FMP4']:
45 if CONFIG['MOZ_APPLEMEDIA']:
48 if CONFIG['MOZ_WEBRTC']:
51 if CONFIG['MOZ_OMX_DECODER']:
53 DIRS += ['omx/mediaresourcemanager']
63 MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
65 MOCHITEST_MANIFESTS += [
67 'tests/mochitest/identity/mochitest.ini',
68 'tests/mochitest/ipc/mochitest.ini',
71 if CONFIG['MOZ_WEBRTC']:
72 MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
73 WEBRTC_SIGNALLING_TEST_MANIFESTS += ['tests/mochitest/steeplechase.ini']
76 'nsIDOMNavigatorUserMedia.idl',
77 'nsIMediaManager.idl',
80 XPIDL_MODULE = 'dom_media'
83 'AbstractMediaDecoder.h',
85 'AudioChannelFormat.h',
88 'AudioSampleFormat.h',
91 'BufferMediaResource.h',
95 'EncodedBufferCache.h',
102 'MediaDecoderOwner.h',
103 'MediaDecoderReader.h',
104 'MediaDecoderStateMachine.h',
105 'MediaDecoderStateMachineScheduler.h',
107 'MediaMetadataManager.h',
113 'MediaStreamGraph.h',
118 'nsIDocumentActivity.h',
119 'RtspMediaResource.h',
122 'SharedThreadPool.h',
124 'ThreadPoolCOMListener.h',
126 'TrackUnionStream.h',
127 'VideoFrameContainer.h',
137 if CONFIG['MOZ_B2G']:
139 'MediaPermissionGonk.h',
142 EXPORTS.mozilla.dom += [
143 'AudioStreamTrack.h',
146 'GetUserMediaRequest.h',
148 'MediaStreamError.h',
149 'MediaStreamTrack.h',
152 'TextTrackCueList.h',
155 'VideoPlaybackQuality.h',
156 'VideoStreamTrack.h',
162 'AudioChannelFormat.cpp',
163 'AudioCompactor.cpp',
167 'AudioStreamTrack.cpp',
169 'AudioTrackList.cpp',
171 'DOMMediaStream.cpp',
172 'EncodedBufferCache.cpp',
173 'FileBlockCache.cpp',
174 'GetUserMediaRequest.cpp',
180 'MediaDecoderReader.cpp',
181 'MediaDecoderStateMachine.cpp',
182 'MediaDecoderStateMachineScheduler.cpp',
188 'MediaShutdownManager.cpp',
189 'MediaStreamError.cpp',
190 'MediaStreamGraph.cpp',
191 'MediaStreamTrack.cpp',
192 'MediaTaskQueue.cpp',
194 'MediaTrackList.cpp',
195 'MP3FrameParser.cpp',
196 'RtspMediaResource.cpp',
197 'SharedThreadPool.cpp',
201 'TextTrackCueList.cpp',
203 'TextTrackRegion.cpp',
204 'TrackUnionStream.cpp',
205 'VideoFrameContainer.cpp',
206 'VideoPlaybackQuality.cpp',
208 'VideoStreamTrack.cpp',
210 'VideoTrackList.cpp',
212 'WebVTTListener.cpp',
215 if CONFIG['OS_TARGET'] == 'WINNT':
216 SOURCES += [ 'ThreadPoolCOMListener.cpp' ]
218 if CONFIG['MOZ_B2G']:
220 'MediaPermissionGonk.cpp',
223 # DecoderTraits.cpp needs to be built separately because of Mac OS X headers.
228 # Some codec-related code uses multi-character constants, which GCC and clang
229 # warn about. Suppress turning this warning into an error.
230 if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
231 SOURCES['DecoderTraits.cpp'].flags += ['-Wno-error=multichar']
233 EXTRA_COMPONENTS += [
235 'PeerConnection.manifest',
238 EXTRA_JS_MODULES.media += [
240 'PeerConnectionIdp.jsm',
241 'RTCStatsReport.jsm',
244 FAIL_ON_WARNINGS = True
246 MSVC_ENABLE_PGO = True
257 if CONFIG['MOZ_DIRECTSHOW']:
259 '/media/webrtc/trunk/webrtc/modules/video_capture/windows',
262 if CONFIG['MOZ_WEBRTC']:
264 '/media/webrtc/signaling/src/common',
265 '/media/webrtc/trunk',
268 DEFINES['MOZILLA_INTERNAL_API'] = True
270 if CONFIG['MOZ_OMX_DECODER']:
271 DEFINES['MOZ_OMX_DECODER'] = True
273 if CONFIG['ANDROID_VERSION'] > '15':
274 DEFINES['MOZ_OMX_WEBM_DECODER'] = True
276 CFLAGS += CONFIG['GSTREAMER_CFLAGS']
277 CXXFLAGS += CONFIG['GSTREAMER_CFLAGS']
279 include('/ipc/chromium/chromium-config.mozbuild')
281 # Suppress some GCC warnings being treated as errors:
282 # - about attributes on forward declarations for types that are already
283 # defined, which complains about an important MOZ_EXPORT for android::AString
285 CXXFLAGS += ['-Wno-error=attributes']
287 FINAL_LIBRARY = 'xul'