mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-05 03:36:08 +03:00
238 lines
5.6 KiB
Plaintext
238 lines
5.6 KiB
Plaintext
|
# Copyright 2015 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/buildflag_header.gni")
|
||
|
import("//build/config/chromecast_build.gni")
|
||
|
import("//chromecast/chromecast.gni")
|
||
|
import("//media/media_options.gni")
|
||
|
|
||
|
declare_args() {
|
||
|
# Set true to use raw timestamps on non-desktop cast build.
|
||
|
# ALSA version equal or later than 1.0.29 support this function.
|
||
|
use_alsa_monotonic_raw_tstamps = use_alsa && !is_cast_desktop_build
|
||
|
|
||
|
system_owns_volume =
|
||
|
use_alsa && !enable_assistant && chromecast_branding != "google"
|
||
|
}
|
||
|
|
||
|
cast_source_set("backend") {
|
||
|
sources = [
|
||
|
"audio_decoder_wrapper.cc",
|
||
|
"audio_decoder_wrapper.h",
|
||
|
"media_pipeline_backend_factory.h",
|
||
|
"media_pipeline_backend_factory_impl.cc",
|
||
|
"media_pipeline_backend_factory_impl.h",
|
||
|
"media_pipeline_backend_manager.cc",
|
||
|
"media_pipeline_backend_manager.h",
|
||
|
"media_pipeline_backend_wrapper.cc",
|
||
|
"media_pipeline_backend_wrapper.h",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//chromecast/public",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//chromecast:chromecast_features",
|
||
|
"//chromecast/media:libcast_media",
|
||
|
"//chromecast/media/cma/base",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
cast_source_set("cast_media_android_dummy") {
|
||
|
sources = [
|
||
|
"cast_media_android_dummy.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//chromecast:chromecast_features",
|
||
|
"//chromecast/public",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# Target for OEM partners to override media shared library, i.e.
|
||
|
# libcast_media_1.0.so. This target is only used to build executables
|
||
|
# with correct linkage information.
|
||
|
cast_shared_library("libcast_media_1.0") {
|
||
|
if (is_cast_desktop_build) {
|
||
|
deps = [
|
||
|
"//chromecast/media/cma/backend/desktop",
|
||
|
]
|
||
|
} else {
|
||
|
deps = [
|
||
|
":dummy",
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# Dummy implementation of media backend used on chromecast devices.
|
||
|
# Must not depend on anything outside //chromecast/public.
|
||
|
cast_source_set("dummy") {
|
||
|
sources = [
|
||
|
"cast_media_dummy.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//chromecast/public",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
buildflag_header("audio_features") {
|
||
|
header = "audio_features.h"
|
||
|
|
||
|
flags = [
|
||
|
"ALSA_MONOTONIC_RAW_TSTAMPS=$use_alsa_monotonic_raw_tstamps",
|
||
|
"SYSTEM_OWNS_VOLUME=$system_owns_volume",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
# Implementation of video decoder that discards decoder buffers.
|
||
|
# Used on audio platforms for media streams containing video.
|
||
|
cast_source_set("null") {
|
||
|
sources = [
|
||
|
"video_decoder_null.cc",
|
||
|
"video_decoder_null.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
cast_source_set("audio") {
|
||
|
sources = [
|
||
|
"audio_decoder_for_mixer.cc",
|
||
|
"audio_decoder_for_mixer.h",
|
||
|
"cast_audio_json.cc",
|
||
|
"cast_audio_json.h",
|
||
|
"filter_group.cc",
|
||
|
"filter_group.h",
|
||
|
"media_codec_support_cast_audio.cc",
|
||
|
"media_pipeline_backend_audio.cc",
|
||
|
"media_pipeline_backend_audio.h",
|
||
|
"post_processing_pipeline.h",
|
||
|
"post_processing_pipeline_impl.cc",
|
||
|
"post_processing_pipeline_impl.h",
|
||
|
"post_processing_pipeline_parser.cc",
|
||
|
"post_processing_pipeline_parser.h",
|
||
|
"post_processor_factory.cc",
|
||
|
"post_processor_factory.h",
|
||
|
"stream_mixer.cc",
|
||
|
"stream_mixer.h",
|
||
|
"stream_mixer_input.cc",
|
||
|
"stream_mixer_input.h",
|
||
|
"stream_mixer_input_impl.cc",
|
||
|
"stream_mixer_input_impl.h",
|
||
|
"system_volume_control.h",
|
||
|
"volume_control.cc",
|
||
|
"volume_map.cc",
|
||
|
"volume_map.h",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":audio_features",
|
||
|
":null",
|
||
|
"//base",
|
||
|
"//chromecast/base",
|
||
|
"//chromecast/media/base",
|
||
|
"//chromecast/media/cma/base",
|
||
|
"//chromecast/media/cma/decoder",
|
||
|
"//chromecast/public/media",
|
||
|
"//media",
|
||
|
"//media:shared_memory_support",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
test("cast_audio_backend_unittests") {
|
||
|
testonly = true
|
||
|
sources = [
|
||
|
"filter_group_unittest.cc",
|
||
|
"post_processors/governor_unittest.cc",
|
||
|
"post_processors/saturated_gain_unittest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":audio",
|
||
|
":governor",
|
||
|
":libcast_governor_1.0",
|
||
|
":libcast_saturated_gain_1.0",
|
||
|
":saturated_gain",
|
||
|
"//base",
|
||
|
"//base/test:run_all_unittests",
|
||
|
"//chromecast/media/cma/backend/post_processors:test_support",
|
||
|
"//chromecast/public",
|
||
|
"//chromecast/public/media",
|
||
|
"//media:shared_memory_support",
|
||
|
"//testing/gmock",
|
||
|
"//testing/gtest",
|
||
|
]
|
||
|
|
||
|
if (use_alsa) {
|
||
|
deps += [ "alsa:unit_tests" ]
|
||
|
}
|
||
|
if (is_fuchsia) {
|
||
|
deps += [ "fuchsia:unit_tests" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# This is separate from ":governor" because the associated unittest needs
|
||
|
# to create a Governor directly (to use test functions).
|
||
|
cast_shared_library("libcast_governor_1.0") {
|
||
|
sources = [
|
||
|
"post_processors/governor_create.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":governor",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
if (is_fuchsia) {
|
||
|
ldflags = [ "-Wl,-Bsymbolic" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
cast_source_set("governor") {
|
||
|
sources = [
|
||
|
"post_processors/governor.cc",
|
||
|
"post_processors/governor.h",
|
||
|
]
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//chromecast/base",
|
||
|
"//chromecast/media/base",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
public_configs = [ "//chromecast/public:public_config" ]
|
||
|
}
|
||
|
|
||
|
cast_shared_library("libcast_saturated_gain_1.0") {
|
||
|
sources = [
|
||
|
"post_processors/saturated_gain_create.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":saturated_gain",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
if (is_fuchsia) {
|
||
|
ldflags = [ "-Wl,-Bsymbolic" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
cast_source_set("saturated_gain") {
|
||
|
sources = [
|
||
|
"post_processors/saturated_gain.cc",
|
||
|
"post_processors/saturated_gain.h",
|
||
|
]
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//chromecast/base",
|
||
|
"//chromecast/media/base",
|
||
|
"//chromecast/public/media",
|
||
|
]
|
||
|
public_configs = [ "//chromecast/public:public_config" ]
|
||
|
}
|