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
media / cdm / library_cdm / clear_key_cdm / BUILD.gn [blame]
# Copyright 2014 The Chromium Authors
# 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("//media/cdm/library_cdm/cdm_paths.gni")
import("//media/media_options.gni")
assert(enable_library_cdms)
loadable_module("clear_key_cdm_bin") {
testonly = true
output_dir = "$root_out_dir/$clearkey_cdm_path"
output_name = "clearkeycdm"
sources = [
"cdm_file_adapter.cc",
"cdm_file_adapter.h",
"cdm_file_io_test.cc",
"cdm_file_io_test.h",
"cdm_video_decoder.cc",
"cdm_video_decoder.h",
"clear_key_cdm.cc",
"clear_key_cdm.h",
"clear_key_persistent_session_cdm.cc",
"clear_key_persistent_session_cdm.h",
]
defines = [ "CDM_IMPLEMENTATION" ]
deps = [
"//base",
"//media",
"//media:media_buildflags",
"//media:shared_memory_support", # For media::AudioBus.
"//media/cdm:cdm_api", # For content_decryption_module.h
"//media/cdm/library_cdm:cdm_host_proxy",
"//third_party/libyuv",
"//url",
]
# TODO(crbug.com/40298390): Convert this to use media::FFmpegAudioDecoder.
if (media_use_ffmpeg) {
sources += [
"ffmpeg_cdm_audio_decoder.cc",
"ffmpeg_cdm_audio_decoder.h",
]
defines += [ "CLEAR_KEY_CDM_USE_FFMPEG_DECODER" ]
deps += [ "//third_party/ffmpeg" ]
}
}
group("clear_key_cdm") {
testonly = true
deps = [ ":clear_key_cdm_bin" ]
if (is_fuchsia) {
# Tests that need the CDM binary must include this target in their
# `data_deps`. Due to the unique path of CDMs, the Fuchsia SDK will include
# the unstripped binary (see fxbug.dev/105910). Therefore, targets that
# depend on this one must add the unstripped library path to
# `excluded_files` when `is_fuchsia` to prevent the unstripped binary from
# being added to the package.
data = [ "$root_out_dir/$clearkey_cdm_path/libclearkeycdm.so" ]
}
}