1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
9 # Android doesn't use ffmpeg.
11 }, { # 'OS != "android"'
15 # Set |use_fake_video_decoder| to 1 to ignore input frames in |clearkeycdm|,
16 # and produce video frames filled with a solid color instead.
17 'use_fake_video_decoder%': 0,
18 # Set |use_libvpx| to 1 to use libvpx for VP8 decoding in |clearkeycdm|.
23 'target_name': 'clearkeycdm',
25 # TODO(tomfinegan): Simplify this by unconditionally including all the
26 # decoders, and changing clearkeycdm to select which decoder to use
27 # based on environment variables.
29 ['use_fake_video_decoder == 1' , {
30 'defines': ['CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER'],
32 'cdm/ppapi/fake_cdm_video_decoder.cc',
33 'cdm/ppapi/fake_cdm_video_decoder.h',
36 ['use_ffmpeg == 1' , {
37 'defines': ['CLEAR_KEY_CDM_USE_FFMPEG_DECODER'],
39 '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
42 'cdm/ppapi/ffmpeg_cdm_audio_decoder.cc',
43 'cdm/ppapi/ffmpeg_cdm_audio_decoder.h',
46 ['use_ffmpeg == 1 and use_fake_video_decoder == 0' , {
48 'cdm/ppapi/ffmpeg_cdm_video_decoder.cc',
49 'cdm/ppapi/ffmpeg_cdm_video_decoder.h',
52 ['use_libvpx == 1 and use_fake_video_decoder == 0' , {
53 'defines': ['CLEAR_KEY_CDM_USE_LIBVPX_DECODER'],
55 '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
58 'cdm/ppapi/libvpx_cdm_video_decoder.cc',
59 'cdm/ppapi/libvpx_cdm_video_decoder.h',
62 ['os_posix == 1 and OS != "mac" and enable_pepper_cdms==1', {
63 'type': 'loadable_module', # Must be in PRODUCT_DIR for ASAN bots.
65 ['(OS == "mac" or OS == "win") and enable_pepper_cdms==1', {
66 'type': 'shared_library',
70 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
74 'defines': ['CDM_IMPLEMENTATION'],
77 # Include the following for media::AudioBus.
78 'shared_memory_support',
79 '<(DEPTH)/base/base.gyp:base',
82 'cdm/ppapi/cdm_video_decoder.cc',
83 'cdm/ppapi/cdm_video_decoder.h',
84 'cdm/ppapi/clear_key_cdm.cc',
85 'cdm/ppapi/clear_key_cdm.h',
87 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
88 'msvs_disabled_warnings': [ 4267, ],
91 'target_name': 'clearkeycdmadapter',
93 # Check whether the plugin's origin URL is valid.
94 'defines': ['CHECK_DOCUMENT_URL'],
96 '<(DEPTH)/ppapi/ppapi.gyp:ppapi_cpp',
100 'cdm/ppapi/api/content_decryption_module.h',
101 'cdm/ppapi/cdm_wrapper.cc',
102 'cdm/ppapi/linked_ptr.h',
105 ['os_posix == 1 and OS != "mac" and enable_pepper_cdms==1', {
106 'cflags': ['-fvisibility=hidden'],
107 'type': 'loadable_module',
108 # Allow the plugin wrapper to find the CDM in the same directory.
109 'ldflags': ['-Wl,-rpath=\$$ORIGIN'],
111 # Built by clearkeycdm.
112 '<(PRODUCT_DIR)/libclearkeycdm.so',
115 ['OS == "win" and enable_pepper_cdms==1', {
116 'type': 'shared_library',
117 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
118 'msvs_disabled_warnings': [ 4267, ],
120 ['OS == "mac" and enable_pepper_cdms==1', {
121 'type': 'loadable_module',
122 'product_extension': 'plugin',
125 # Not to strip important symbols by -Wl,-dead_strip.
126 '-Wl,-exported_symbol,_PPP_GetInterface',
127 '-Wl,-exported_symbol,_PPP_InitializeModule',
128 '-Wl,-exported_symbol,_PPP_ShutdownModule'
130 'DYLIB_INSTALL_NAME_BASE': '@loader_path',