blob: 5b8339b588e60c9ba2a6ed39b0dd684d1ad339be [file] [log] [blame]
# Copyright 2014 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.
import("//build/config/features.gni")
import("//chrome/version.gni") # TODO layering violation!
import("//media/cdm/ppapi/cdm_adapter.gni")
# Android doesn't use ffmpeg.
use_ffmpeg = !is_android
# The GYP version supports build flags "use_fake_video_decoder" and
# "use_vpx". These should be added here if necessary but its not clear if
# they are required any more.
shared_library("clearkeycdm") {
sources = [
"cdm_file_io_test.cc",
"cdm_file_io_test.h",
"external_clear_key/cdm_video_decoder.cc",
"external_clear_key/cdm_video_decoder.h",
"external_clear_key/clear_key_cdm.cc",
"external_clear_key/clear_key_cdm.h",
"external_clear_key/clear_key_cdm_common.h",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
defines = [ "CDM_IMPLEMENTATION" ]
deps = [
"//base",
"//media", # For media::AudioTimestampHelper
"//media:shared_memory_support", # For media::AudioBus.
"//url",
]
if (use_ffmpeg) {
sources += [
"external_clear_key/ffmpeg_cdm_audio_decoder.cc",
"external_clear_key/ffmpeg_cdm_audio_decoder.h",
"external_clear_key/ffmpeg_cdm_video_decoder.cc",
"external_clear_key/ffmpeg_cdm_video_decoder.h",
]
defines += [ "CLEAR_KEY_CDM_USE_FFMPEG_DECODER" ]
deps += [ "//third_party/ffmpeg" ]
}
# TODO(GYP) on Mac: 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
}
clearkeycdmadapter_rc_file = "$target_gen_dir/clearkeycdmadapter_version.rc"
process_version("clearkeycdmadapter_resources") {
visibility = [ ":*" ]
sources = [
"//media/clearkeycdmadapter.ver",
"external_clear_key/BRANDING",
]
output = clearkeycdmadapter_rc_file
}
cdm_adapter("clearkeycdmadapter") {
sources = [
clearkeycdmadapter_rc_file,
]
# Check whether the plugin's origin URL is valid.
defines = [ "CHECK_DOCUMENT_URL" ]
deps = [
":clearkeycdm",
":clearkeycdmadapter_resources",
"//ppapi/cpp",
]
if (is_posix && !is_mac && enable_pepper_cdms) {
# Because clearkeycdm has type 'loadable_module', we must explicitly
# specify this dependency.
ldflags = [ rebase_path("$root_out_dir/libclearkeycdm.so", root_build_dir) ]
libs = [ "rt" ]
}
}