Commit 33aa4027 authored by Suchit Agrawal's avatar Suchit Agrawal Committed by Commit Bot

Create BUILD.gn files for //media/cdm.

Create new BUILD.gn file for media/cdm and moved respective
media component changes from media/BUILD.gn file to new BUILD.gn
file.

BUG=613033,739673
Signed-off-by: default avatarSuchit Agrawal <a.suchit@samsung.com>
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I944b712791833edf6417db308225295c6cb3bdbf
Reviewed-on: https://chromium-review.googlesource.com/561265Reviewed-by: default avatarAlexander Potapenko <glider@chromium.org>
Reviewed-by: default avatarNick Carter <nick@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: SUCHIT AGRAWAL <a.suchit@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485843}
parent d99cd2ff
......@@ -4560,7 +4560,7 @@ static_library("test_support") {
"media/pepper_cdm_test_helper.cc",
"media/pepper_cdm_test_helper.h",
]
deps += [ "//media:cdm_paths" ]
deps += [ "//media/cdm:cdm_paths" ]
}
}
......
......@@ -559,8 +559,8 @@ static_library("constants") {
"//components/bookmarks/common",
"//components/nacl/common:switches",
"//components/offline_pages/features",
"//media:cdm_paths", # Needed by chrome_paths.cc.
"//media:media_features",
"//media/cdm:cdm_paths", # Needed by chrome_paths.cc.
"//ppapi/features",
"//third_party/widevine/cdm:headers",
]
......
......@@ -2890,7 +2890,7 @@ if (!is_android) {
]
if (enable_pepper_cdms) {
deps += [ "//media:cdm_paths" ]
deps += [ "//media/cdm:cdm_paths" ]
data_deps = [
"//media/cdm/ppapi:clearkeycdmadapter",
"//third_party/widevine/cdm:widevinecdmadapter",
......
......@@ -562,7 +562,7 @@ source_set("common") {
"media/cdm_host_files.h",
]
deps += [
"//media:cdm_paths",
"//media/cdm:cdm_paths",
# Needed for finding CDM path from CDM adapter path.
# TODO(xhwang): Remove this dependency when CDM adapter is deprecated.
......
......@@ -85,12 +85,6 @@ config("media_dependent_config") {
}
}
source_set("cdm_api") {
sources = [
"cdm/api/content_decryption_module.h",
]
}
# TODO(jrummell): Each subdirectory should have it's own BUILD.gn, and then
# this component can depend on them. http://crbug.com/613033
component("media") {
......@@ -130,7 +124,6 @@ component("media") {
libs = []
defines = []
deps = [
":cdm_api",
"//base",
"//base:i18n",
"//base/third_party/dynamic_annotations",
......@@ -183,56 +176,6 @@ component("media") {
"device_monitors/device_monitor_udev.h",
]
}
# TODO(xhwang): Move other library CDM related files to this block as well.
if (enable_pepper_cdms) {
deps += [
":cdm_paths",
# TODO(xhwang): Remove this after Widevine specific logic is removed in
# CdmAdapterFactory. See http://crbug.com/510604
"//third_party/widevine/cdm:headers",
]
sources += [
"cdm/cdm_adapter_factory.cc",
"cdm/cdm_adapter_factory.h",
]
}
}
config("cdm_manager_implementation") {
defines = [ "CDM_MANAGER_IMPLEMENTATION" ]
}
# cdm_manager must not be a source_set() because CdmManager exposes a static
# singleton, shared by multiple component()s.
#
# TODO(xhwang): Remove this component once AVDA no longer depends on it.
component("cdm_manager") {
visibility = [
"//media/gpu",
"//media/mojo/services:lib",
]
sources = [
"cdm/cdm_manager.cc",
"cdm/cdm_manager.h",
"cdm/cdm_manager_export.h",
]
configs += [ ":cdm_manager_implementation" ]
deps = [
":media",
"//base",
]
}
static_library("cdm_paths") {
sources = [
"cdm/cdm_paths.cc",
"cdm/cdm_paths.h",
]
deps = [
"//base",
]
}
# TODO(xhwang): Move these into source_sets in respective subfolders.
......@@ -312,8 +255,6 @@ source_set("unit_tests") {
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":cdm_api",
":cdm_paths",
":media",
":test_support",
"//base/test:test_support",
......@@ -322,6 +263,8 @@ source_set("unit_tests") {
"//gpu/command_buffer/common",
"//media/audio:test_support",
"//media/base:test_support",
"//media/cdm:cdm_api",
"//media/cdm:cdm_paths",
"//ppapi/features",
"//skia", # Direct dependency required to inherit config.
"//testing/gmock",
......
......@@ -34,7 +34,7 @@ target(link_target_type, "base") {
# This should only be depended on by "media" target. Other targets should
# depend on "media" target directly.
visibility = [
"//media",
"//media/cdm",
"//media/formats",
# TODO(xhwang): Clean up the dependency graph within "media" target.
......
# 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") {
visibility = [ "//media/*" ]
sources = [
"aes_decryptor.cc",
"aes_decryptor.h",
"cdm_adapter.cc",
"cdm_adapter.h",
"cdm_allocator.cc",
"cdm_allocator.h",
"cdm_file_adapter.cc",
"cdm_file_adapter.h",
"cdm_file_io.cc",
"cdm_file_io.h",
"cdm_helpers.cc",
"cdm_helpers.h",
"cdm_wrapper.h",
"default_cdm_factory.cc",
"default_cdm_factory.h",
"json_web_key.cc",
"json_web_key.h",
"player_tracker_impl.cc",
"player_tracker_impl.h",
"supported_cdm_versions.cc",
"supported_cdm_versions.h",
]
# TODO(wolenetz): Fix size_t to int truncation in win64.
# See http://crbug.com/171009
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":cdm_api",
"//crypto",
"//media:media_features",
"//media:shared_memory_support",
"//ui/gfx/geometry",
"//url",
]
public_deps = [
"//media/formats",
]
configs += [ "//media:media_implementation" ]
all_dependent_configs = [ "//media:media_dependent_config" ]
if (proprietary_codecs) {
sources += [
"cenc_utils.cc",
"cenc_utils.h",
]
}
# TODO(xhwang): Move other library CDM related files to this block as well.
if (enable_pepper_cdms) {
deps += [
":cdm_paths",
# TODO(xhwang): Remove this after Widevine specific logic is removed in
# CdmAdapterFactory. See http://crbug.com/510604
"//third_party/widevine/cdm:headers",
]
sources += [
"cdm_adapter_factory.cc",
"cdm_adapter_factory.h",
]
}
}
config("cdm_manager_implementation") {
defines = [ "CDM_MANAGER_IMPLEMENTATION" ]
}
# cdm_manager must not be a source_set() because CdmManager exposes a static
# singleton, shared by multiple component()s.
#
# TODO(xhwang): Remove this component once AVDA no longer depends on it.
component("cdm_manager") {
visibility = [
"//media/gpu",
"//media/mojo/services:lib",
]
sources = [
"cdm_manager.cc",
"cdm_manager.h",
"cdm_manager_export.h",
]
configs += [ ":cdm_manager_implementation" ]
deps = [
"//base",
"//media",
]
}
static_library("cdm_paths") {
sources = [
"cdm_paths.cc",
"cdm_paths.h",
]
deps = [
"//base",
]
}
......@@ -31,8 +31,8 @@ shared_library("clearkeycdm") {
"//base",
"//build/config:exe_and_shlib_deps",
"//media", # For media::AudioTimestampHelper
"//media:cdm_api", # For content_decryption_module.h
"//media:shared_memory_support", # For media::AudioBus.
"//media/cdm:cdm_api", # For content_decryption_module.h
"//url",
]
......
......@@ -23,7 +23,7 @@ template("ppapi_cdm_adapter") {
defines += [ "USE_PPAPI_CDM_ADAPTER" ]
deps += [
"//build/config:exe_and_shlib_deps",
"//media:cdm_api",
"//media/cdm:cdm_api",
"//ppapi/cpp",
]
sources += [
......
......@@ -90,31 +90,6 @@ source_set("filters") {
"//media/muxers/webm_muxer.h",
]
# TODO(a.suchit): Needs to create separate BUILD.gn file for cdm.
sources += [
"//media/cdm/aes_decryptor.cc",
"//media/cdm/aes_decryptor.h",
"//media/cdm/cdm_adapter.cc",
"//media/cdm/cdm_adapter.h",
"//media/cdm/cdm_allocator.cc",
"//media/cdm/cdm_allocator.h",
"//media/cdm/cdm_file_adapter.cc",
"//media/cdm/cdm_file_adapter.h",
"//media/cdm/cdm_file_io.cc",
"//media/cdm/cdm_file_io.h",
"//media/cdm/cdm_helpers.cc",
"//media/cdm/cdm_helpers.h",
"//media/cdm/cdm_wrapper.h",
"//media/cdm/default_cdm_factory.cc",
"//media/cdm/default_cdm_factory.h",
"//media/cdm/json_web_key.cc",
"//media/cdm/json_web_key.h",
"//media/cdm/player_tracker_impl.cc",
"//media/cdm/player_tracker_impl.h",
"//media/cdm/supported_cdm_versions.cc",
"//media/cdm/supported_cdm_versions.h",
]
# TODO(a.suchit): Needs to create separate BUILD.gn file for video.
sources += [
"//media/video/fake_video_encode_accelerator.cc",
......@@ -142,7 +117,6 @@ source_set("filters") {
all_dependent_configs = [ "//media:media_dependent_config" ]
deps = [
"//media/formats",
"//skia",
"//third_party/libyuv",
]
......@@ -152,12 +126,10 @@ source_set("filters") {
# //media/muxers dependencies
deps += [ "//third_party/libwebm" ]
# //media/cdm dependencies
deps += [ "//crypto" ]
public_deps = [
"//media:media_features",
"//media/audio",
"//media/cdm",
]
if (proprietary_codecs) {
......@@ -167,14 +139,6 @@ source_set("filters") {
]
}
# TODO(a.suchit): Needs to create separate BUILD.gn file for cdm.
if (proprietary_codecs) {
sources += [
"//media/cdm/cenc_utils.cc",
"//media/cdm/cenc_utils.h",
]
}
if (media_use_ffmpeg) {
public_deps += [ "//media/ffmpeg" ]
deps += [
......
......@@ -245,7 +245,7 @@ component("gpu") {
# Remove this dependency after VDAs are also running as part of the mojo
# media service. See http://crbug.com/522298
if (mojo_media_host == "gpu") {
deps += [ "//media:cdm_manager" ]
deps += [ "//media/cdm:cdm_manager" ]
}
}
......
......@@ -90,8 +90,8 @@ source_set("unit_tests") {
"//base",
"//base/test:test_support",
"//media",
"//media:cdm_api",
"//media/base:test_support",
"//media/cdm:cdm_api",
"//media/mojo/clients",
"//media/mojo/common",
"//media/mojo/common:mojo_shared_buffer_video_frame",
......
......@@ -84,9 +84,9 @@ source_set("lib") {
]
deps = [
"//media:cdm_api",
"//media:cdm_manager",
"//media:shared_memory_support",
"//media/cdm:cdm_api",
"//media/cdm:cdm_manager",
"//media/mojo/common",
"//media/mojo/common:mojo_shared_buffer_video_frame",
"//mojo/common",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment