123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- # Copyright 2017 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("//media/media_options.gni")
- source_set("cdm_api") {
- sources = [ "api/content_decryption_module.h" ]
- }
- source_set("cdm_type_conversion") {
- if (enable_library_cdms || is_win) {
- # This target is a subcomponent.
- visibility = [
- ":*",
- "//media",
- ]
- configs += [ "//media:subcomponent_config" ]
- } else {
- visibility = [ "//media/cdm/library_cdm/clear_key_cdm:clear_key_cdm" ]
- }
- sources = [
- "cdm_type_conversion.cc",
- "cdm_type_conversion.h",
- ]
- deps = [
- ":cdm_api",
- "//media/base",
- ]
- }
- source_set("cdm") {
- # Do not expand the visibility here without double-checking with OWNERS, this
- # is a roll-up target which is part of the //media component. Most other DEPs
- # should be using //media and not directly DEP this roll-up target.
- visibility = [
- "//media",
- # TODO(crbug.com/583067): These files should not be in //media/base.
- "//media/base/android",
- "//media/filters",
- "//media/fuchsia/cdm",
- ]
- sources = [
- "aes_cbc_crypto.cc",
- "aes_cbc_crypto.h",
- "aes_decryptor.cc",
- "aes_decryptor.h",
- "cbcs_decryptor.cc",
- "cbcs_decryptor.h",
- "cdm_capability.cc",
- "cdm_capability.h",
- "cdm_context_ref_impl.cc",
- "cdm_context_ref_impl.h",
- "cenc_decryptor.cc",
- "cenc_decryptor.h",
- "cenc_utils.cc",
- "cenc_utils.h",
- "default_cdm_factory.cc",
- "default_cdm_factory.h",
- "json_web_key.cc",
- "json_web_key.h",
- "supported_audio_codecs.cc",
- "supported_audio_codecs.h",
- ]
- public_deps = [ ":cdm_type" ]
- deps = [
- "//crypto",
- "//media/base",
- "//media/formats",
- "//third_party/boringssl",
- "//ui/gfx/geometry",
- "//url",
- ]
- configs += [ "//media:subcomponent_config" ]
- if (enable_library_cdms) {
- deps += [
- ":cdm_api",
- ":cdm_paths",
- ]
- sources += [
- "cdm_adapter.cc",
- "cdm_adapter.h",
- "cdm_adapter_factory.cc",
- "cdm_adapter_factory.h",
- "cdm_module.cc",
- "cdm_module.h",
- "cdm_wrapper.h",
- "output_protection.h",
- "supported_cdm_versions.cc",
- "supported_cdm_versions.h",
- ]
- if (enable_cdm_host_verification) {
- sources += [
- "cdm_host_file.cc",
- "cdm_host_file.h",
- "cdm_host_files.cc",
- "cdm_host_files.h",
- ]
- }
- }
- if (is_win || enable_library_cdms) {
- sources += [
- "cdm_allocator.cc",
- "cdm_allocator.h",
- "cdm_auxiliary_helper.cc",
- "cdm_auxiliary_helper.h",
- "cdm_document_service.h",
- "cdm_helpers.cc",
- "cdm_helpers.h",
- ]
- deps += [
- ":cdm_api",
- ":cdm_type_conversion",
- "//components/crash/core/common:crash_key",
- ]
- }
- if (is_win) {
- sources += [
- "media_foundation_cdm_data.cc",
- "media_foundation_cdm_data.h",
- "win/media_foundation_cdm.cc",
- "win/media_foundation_cdm.h",
- "win/media_foundation_cdm_factory.cc",
- "win/media_foundation_cdm_factory.h",
- "win/media_foundation_cdm_module.cc",
- "win/media_foundation_cdm_module.h",
- "win/media_foundation_cdm_session.cc",
- "win/media_foundation_cdm_session.h",
- "win/media_foundation_cdm_util.cc",
- "win/media_foundation_cdm_util.h",
- ]
- libs = [ "Propsys.lib" ]
- deps += [
- ":cdm_paths",
- "//media/base/win:media_foundation_util",
- ]
- }
- }
- if (enable_library_cdms) {
- static_library("cdm_paths") {
- public = [ "cdm_paths.h" ]
- sources = [ "cdm_paths.cc" ]
- public_deps = [ ":cdm_type" ]
- deps = [
- "//base",
- "//media:media_buildflags",
- ]
- }
- }
- source_set("cdm_type") {
- sources = [ "cdm_type.h" ]
- deps = [ "//base" ]
- }
- source_set("unit_tests") {
- testonly = true
- sources = [
- "aes_cbc_crypto_unittest.cc",
- "aes_decryptor_unittest.cc",
- "cbcs_decryptor_unittest.cc",
- "cenc_decryptor_unittest.cc",
- "json_web_key_unittest.cc",
- ]
- deps = [
- "//base/test:test_support",
- "//build:chromeos_buildflags",
- "//crypto",
- "//media:test_support",
- "//testing/gmock",
- "//testing/gtest",
- "//third_party/boringssl",
- "//ui/gfx:test_support",
- "//url",
- ]
- configs += [ "//media:media_config" ]
- data_deps = []
- if (enable_library_cdms) {
- sources += [
- "cdm_adapter_unittest.cc",
- "cdm_paths_unittest.cc",
- "external_clear_key_test_helper.cc",
- "external_clear_key_test_helper.h",
- "mock_helpers.cc",
- "mock_helpers.h",
- "simple_cdm_allocator.cc",
- "simple_cdm_allocator.h",
- "simple_cdm_allocator_unittest.cc",
- "simple_cdm_buffer.cc",
- "simple_cdm_buffer.h",
- ]
- data_deps += [ "//media/cdm/library_cdm/clear_key_cdm" ]
- deps += [
- ":cdm_api",
- ":cdm_paths",
- "//media/cdm/library_cdm:cdm_host_proxy",
- "//media/cdm/library_cdm:test_support",
- ]
- }
- if (proprietary_codecs) {
- sources += [ "cenc_utils_unittest.cc" ]
- }
- if (is_win) {
- sources += [
- "win/media_foundation_cdm_factory_unittest.cc",
- "win/media_foundation_cdm_session_unittest.cc",
- "win/media_foundation_cdm_unittest.cc",
- ]
- deps += [ "//media/base/win:media_foundation_util" ]
- }
- }
|