forked from fraunhoferfokus/open-content-decryption-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmedia_open_cdm.gypi
More file actions
140 lines (137 loc) · 5.49 KB
/
media_open_cdm.gypi
File metadata and controls
140 lines (137 loc) · 5.49 KB
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
#
# Copyright 2014 Fraunhofer FOKUS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Based on file contibuted to the Chromium project
# media/media_cdm.gypi
# License notice of original file:
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'conditions': [
['OS == "android"', {
# Android doesn't use ffmpeg.
'use_ffmpeg%': 0,
}, { # 'OS != "android"'
'use_ffmpeg%': 1,
}],
],
},
'conditions': [
['enable_pepper_cdms==1', {
'targets': [
{
'target_name': 'opencdm',
'type': 'none',
'conditions': [
['use_ffmpeg == 1' , {
'defines': ['OCDM_USE_FFMPEG_DECODER', 'CLEAR_KEY_CDM_USE_FFMPEG_DECODER'],
'dependencies': [
'<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
],
'sources': [
'<(DEPTH)/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.cc',
'<(DEPTH)/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_audio_decoder.h',
],
}],
['use_ffmpeg == 1' , {
'sources': [
'<(DEPTH)/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.cc',
'<(DEPTH)/media/cdm/ppapi/external_clear_key/ffmpeg_cdm_video_decoder.h',
],
}],
['os_posix == 1 and OS != "mac" and enable_pepper_cdms==1', {
'type': 'loadable_module', # Must be in PRODUCT_DIR for ASAN bot.
}],
['(OS == "mac" or OS == "win") and enable_pepper_cdms==1', {
'type': 'shared_library',
}],
['OS == "mac"', {
'xcode_settings': {
'DYLIB_INSTALL_NAME_BASE': '@loader_path',
},
}]
],
'defines': ['CDM_IMPLEMENTATION'],
'dependencies': [
'media',
'../url/url.gyp:url_lib',
# Include the following for media::AudioBus.
'shared_memory_support',
'<(DEPTH)/base/base.gyp:base',
],
'sources': [
'<(DEPTH)/media/cdm/ppapi/cdm_logging.cc',
'<(DEPTH)/media/cdm/ppapi/cdm_logging.h',
'../com/common/rpc/opencdm_xdr.h',
'../com/common/rpc/opencdm_xdr_clnt.c',
'../com/common/rpc/opencdm_xdr_xdr.c',
'../com/common/rpc/opencdm_callback.h',
'../com/common/rpc/opencdm_callback_xdr.c',
'../cdm/open_cdm_platform_common.h',
'../cdm/open_cdm_platform.h',
'../cdm/open_cdm_platform_com.h',
'../cdm/open_cdm_platform_factory.h',
'../cdm/open_cdm_platform_com_callback_receiver.h',
'../cdm/open_cdm_platform_impl.cc',
'../cdm/open_cdm_platform_impl.h',
'../com/cdm/open_cdm_platform_com_handler_factory.h',
'../com/cdm/rpc/rpc_cdm_platform_handler.h',
'../com/cdm/rpc/rpc_cdm_platform_handler.cc',
'../com/common/shmemsem/shmemsem_helper.cc',
'../com/common/shmemsem/shmemsem_helper.h',
'../mediaengine/open_cdm_mediaengine.h',
'../mediaengine/open_cdm_mediaengine_com.h',
'../mediaengine/open_cdm_mediaengine_factory.h',
'../mediaengine/open_cdm_mediaengine_impl.cc',
'../mediaengine/open_cdm_mediaengine_impl.h',
'../com/mediaengine/rpc/rpc_cdm_mediaengine_handler.cc',
'../com/mediaengine/rpc/rpc_cdm_mediaengine_handler.h',
'../browser/chrome/open_cdm.cc',
'../browser/chrome/open_cdm.h',
'../browser/chrome/open_cdm_chrome_common.h',
'../common/open_cdm_common.h',
'<(DEPTH)/media/cdm/ppapi/external_clear_key/cdm_video_decoder.cc',
'<(DEPTH)/media/cdm/ppapi/external_clear_key/cdm_video_decoder.h',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
{
'target_name': 'opencdmadapter',
'type': 'none',
# Check whether the plugin's origin URL is valid.
'defines': ['CHECK_DOCUMENT_URL'],
'dependencies': [
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
'<(DEPTH)/media/media_cdm_adapter.gyp:cdmadapter',
'opencdm',
],
'conditions': [
['os_posix == 1 and OS != "mac" and enable_pepper_cdms==1', {
# Because opencdm has type 'loadable_module' (see comments),
# we must explicitly specify this dependency.
'libraries': [
# Built by opencdm.
'<(PRODUCT_DIR)/libopencdm.so',
],
}],
],
},
],
}],
],
}