naiveproxy/media/mojo/services/BUILD.gn

228 lines
5.6 KiB
Plaintext
Raw Normal View History

2018-01-28 19:30:36 +03:00
# 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("//media/media_options.gni")
import("//services/catalog/public/tools/catalog.gni")
import("//services/service_manager/public/cpp/service.gni")
import("//services/service_manager/public/service_manifest.gni")
import("//services/service_manager/public/tools/test/service_test.gni")
import("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
proto_library("video_decode_stats_proto") {
sources = [
"video_decode_stats.proto",
]
}
component("services") {
output_name = "media_mojo_services"
sources = [
"gpu_mojo_media_client.cc",
"gpu_mojo_media_client.h",
"interface_factory_impl.cc",
"interface_factory_impl.h",
"media_interface_provider.cc",
"media_interface_provider.h",
"media_mojo_export.h",
"media_resource_shim.cc",
"media_resource_shim.h",
"media_service.cc",
"media_service.h",
"media_service_factory.cc",
"media_service_factory.h",
"mojo_audio_decoder_service.cc",
"mojo_audio_decoder_service.h",
"mojo_audio_output_stream.cc",
"mojo_audio_output_stream.h",
"mojo_audio_output_stream_provider.cc",
"mojo_audio_output_stream_provider.h",
"mojo_cdm_promise.cc",
"mojo_cdm_promise.h",
"mojo_cdm_service.cc",
"mojo_cdm_service.h",
"mojo_cdm_service_context.cc",
"mojo_cdm_service_context.h",
"mojo_decryptor_service.cc",
"mojo_decryptor_service.h",
"mojo_demuxer_stream_adapter.cc",
"mojo_demuxer_stream_adapter.h",
"mojo_media_client.cc",
"mojo_media_client.h",
"mojo_media_log.cc",
"mojo_media_log.h",
"mojo_provision_fetcher.cc",
"mojo_provision_fetcher.h",
"mojo_renderer_service.cc",
"mojo_renderer_service.h",
"mojo_video_decoder_service.cc",
"mojo_video_decoder_service.h",
"mojo_video_encode_accelerator_provider.cc",
"mojo_video_encode_accelerator_provider.h",
"mojo_video_encode_accelerator_service.cc",
"mojo_video_encode_accelerator_service.h",
"test_mojo_media_client.cc",
"test_mojo_media_client.h",
"video_decode_perf_history.cc",
"video_decode_perf_history.h",
"video_decode_stats_db.cc",
"video_decode_stats_db.h",
"video_decode_stats_db_impl.cc",
"video_decode_stats_db_impl.h",
"video_decode_stats_recorder.cc",
"video_decode_stats_recorder.h",
"watch_time_recorder.cc",
"watch_time_recorder.h",
]
defines = [ "MEDIA_MOJO_IMPLEMENTATION" ]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
public_deps = [
"//base",
"//components/leveldb_proto",
"//media",
"//media/gpu",
"//media/gpu/ipc/common",
"//media/mojo:features",
"//media/mojo/interfaces",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/system",
"//services/service_manager/public/cpp",
"//url",
]
deps = [
":video_decode_stats_proto",
"//media:shared_memory_support",
"//media/cdm:cdm_manager",
"//media/gpu",
"//media/gpu:features",
"//media/gpu/ipc/service",
"//media/mojo/common",
"//media/mojo/common:mojo_shared_buffer_video_frame",
"//mojo/common",
"//services/metrics/public/cpp:metrics_cpp",
"//services/metrics/public/cpp:ukm_builders",
"//services/service_manager/public/interfaces",
]
if (is_android) {
sources += [
"android_mojo_media_client.cc",
"android_mojo_media_client.h",
"mojo_media_drm_storage.cc",
"mojo_media_drm_storage.h",
]
}
if (enable_library_cdms) {
sources += [
"mojo_cdm_allocator.cc",
"mojo_cdm_allocator.h",
"mojo_cdm_helper.cc",
"mojo_cdm_helper.h",
]
deps += [ "//media/cdm:cdm_api" ]
# TODO(xhwang): Ideally media should not worry about sandbox. Find a way to
# remove this dependency.
if (is_mac) {
deps += [ "//sandbox" ]
}
}
}
service("media") {
testonly = true
sources = [
"main.cc",
]
public_deps = [
"//base",
"//media",
]
deps = [
":services",
"//mojo/public/c/system",
"//services/service_manager/public/cpp",
]
}
service_test("media_service_unittests") {
testonly = true
sources = [
"media_service_unittest.cc",
]
catalog = ":media_service_unittests_catalog"
deps = [
":services",
"//base",
"//media:test_support",
"//media/mojo/clients",
"//media/mojo/common",
"//media/mojo/interfaces",
"//media/mojo/interfaces:constants",
"//services/service_manager/public/cpp:service_test_support",
"//testing/gmock",
"//testing/gtest",
]
data_deps = [
":media",
]
}
service_manifest("cdm_manifest") {
name = "cdm"
source = "cdm_manifest.json"
}
service_manifest("media_manifest") {
name = "media"
source = "media_manifest.json"
}
service_manifest("test_manifest") {
name = "media_service_unittests"
source = "test_manifest.json"
}
service_test("media_pipeline_integration_unittests") {
testonly = true
catalog = ":media_pipeline_integration_unittests_catalog"
deps = [
"//media/test:mojo_pipeline_integration_tests",
]
data_deps = [
":media",
]
}
service_manifest("pipeline_test_manifest") {
name = "media_pipeline_integration_unittests"
source = "pipeline_test_manifest.json"
}
catalog("media_service_unittests_catalog") {
embedded_services = [ ":test_manifest" ]
standalone_services = [ ":media_manifest" ]
}
catalog("media_pipeline_integration_unittests_catalog") {
embedded_services = [ ":pipeline_test_manifest" ]
standalone_services = [ ":media_manifest" ]
}