summaryrefslogtreecommitdiffstats
path: root/dom/media/gmp/moz.build
blob: 8595ee0de20278b7ff909080e3a7a159f4ea1da3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

XPIDL_MODULE = 'content_geckomediaplugins'

XPIDL_SOURCES += [
    'mozIGeckoMediaPluginChromeService.idl',
    'mozIGeckoMediaPluginService.idl',
]

EXPORTS += [
    'gmp-api/gmp-async-shutdown.h',
    'gmp-api/gmp-audio-codec.h',
    'gmp-api/gmp-audio-decode.h',
    'gmp-api/gmp-audio-host.h',
    'gmp-api/gmp-audio-samples.h',
    'gmp-api/gmp-decryption.h',
    'gmp-api/gmp-entrypoints.h',
    'gmp-api/gmp-errors.h',
    'gmp-api/gmp-platform.h',
    'gmp-api/gmp-storage.h',
    'gmp-api/gmp-video-codec.h',
    'gmp-api/gmp-video-decode.h',
    'gmp-api/gmp-video-encode.h',
    'gmp-api/gmp-video-frame-encoded.h',
    'gmp-api/gmp-video-frame-i420.h',
    'gmp-api/gmp-video-frame.h',
    'gmp-api/gmp-video-host.h',
    'gmp-api/gmp-video-plane.h',
    'GMPAudioDecoderChild.h',
    'GMPAudioDecoderParent.h',
    'GMPAudioDecoderProxy.h',
    'GMPAudioHost.h',
    'GMPCallbackBase.h',
    'GMPChild.h',
    'GMPContentChild.h',
    'GMPContentParent.h',
    'GMPCrashHelperHolder.h',
    'GMPDecryptorChild.h',
    'GMPDecryptorParent.h',
    'GMPDecryptorProxy.h',
    'GMPEncryptedBufferDataImpl.h',
    'GMPLoader.h',
    'GMPMessageUtils.h',
    'GMPParent.h',
    'GMPPlatform.h',
    'GMPProcessChild.h',
    'GMPProcessParent.h',
    'GMPService.h',
    'GMPServiceChild.h',
    'GMPServiceParent.h',
    'GMPSharedMemManager.h',
    'GMPStorage.h',
    'GMPStorageChild.h',
    'GMPStorageParent.h',
    'GMPTimerChild.h',
    'GMPTimerParent.h',
    'GMPUtils.h',
    'GMPVideoDecoderChild.h',
    'GMPVideoDecoderParent.h',
    'GMPVideoDecoderProxy.h',
    'GMPVideoEncodedFrameImpl.h',
    'GMPVideoEncoderChild.h',
    'GMPVideoEncoderParent.h',
    'GMPVideoEncoderProxy.h',
    'GMPVideoHost.h',
    'GMPVideoi420FrameImpl.h',
    'GMPVideoPlaneImpl.h',
]

if CONFIG['MOZ_EME']:
    EXPORTS += [
        'GMPCDMCallbackProxy.h',
        'GMPCDMProxy.h',
    ]

# We link GMPLoader into xul on B2G/Fennec as its code does not need to be
# covered by a DRM vendor's voucher.
if CONFIG['OS_TARGET'] == 'Android':
    SOURCES += [
      'GMPLoader.cpp',
    ]
    USE_LIBS += [
        'rlz',
    ]

SOURCES += [
    'GMPAudioDecoderChild.cpp',
    'GMPAudioDecoderParent.cpp',
    'GMPAudioHost.cpp',
    'GMPChild.cpp',
    'GMPContentChild.cpp',
    'GMPContentParent.cpp',
    'GMPDecryptorChild.cpp',
    'GMPDecryptorParent.cpp',
    'GMPDiskStorage.cpp',
    'GMPEncryptedBufferDataImpl.cpp',
    'GMPMemoryStorage.cpp',
    'GMPParent.cpp',
    'GMPPlatform.cpp',
    'GMPProcessChild.cpp',
    'GMPProcessParent.cpp',
    'GMPService.cpp',
    'GMPServiceChild.cpp',
    'GMPServiceParent.cpp',
    'GMPSharedMemManager.cpp',
    'GMPStorageChild.cpp',
    'GMPStorageParent.cpp',
    'GMPTimerChild.cpp',
    'GMPTimerParent.cpp',
    'GMPUtils.cpp',
    'GMPVideoDecoderChild.cpp',
    'GMPVideoDecoderParent.cpp',
    'GMPVideoEncodedFrameImpl.cpp',
    'GMPVideoEncoderChild.cpp',
    'GMPVideoEncoderParent.cpp',
    'GMPVideoHost.cpp',
    'GMPVideoi420FrameImpl.cpp',
    'GMPVideoPlaneImpl.cpp',
]

if CONFIG['MOZ_EME']:
    SOURCES += [
        'GMPCDMCallbackProxy.cpp',
        'GMPCDMProxy.cpp',
    ]

DIRS += ['rlz']

if CONFIG['MOZ_EME']:
    DIRS += ['widevine-adapter']

IPDL_SOURCES += [
  'GMPTypes.ipdlh',
  'PGMP.ipdl',
  'PGMPAudioDecoder.ipdl',
  'PGMPContent.ipdl',
  'PGMPDecryptor.ipdl',
  'PGMPService.ipdl',
  'PGMPStorage.ipdl',
  'PGMPTimer.ipdl',
  'PGMPVideoDecoder.ipdl',
  'PGMPVideoEncoder.ipdl',
]

# comment this out to use Unsafe Shmem for more performance
DEFINES['GMP_SAFE_SHMEM'] = True

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'
# media/mtransport so we work with --disable-webrtc
LOCAL_INCLUDES += [
    '/media/mtransport',
    '/xpcom/base',
    '/xpcom/build',
    '/xpcom/threads',
]

if CONFIG['GNU_CXX']:
    CXXFLAGS += ['-Wno-error=shadow']