blob: 1f8532308696b34f19fb0ba54f1170154d8c9a4d [file] [log] [blame]
# 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("//chromecast/chromecast.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
declare_args() {
# Defines bounds for the output buffer size (in frames)
minimum_output_buffer_size_in_frames = 512
maximum_output_buffer_size_in_frames = 8192
default_output_buffer_size_in_frames = 2048
}
cast_source_set("audio") {
sources = [
"cast_audio_input_stream.cc",
"cast_audio_input_stream.h",
"cast_audio_manager.cc",
"cast_audio_manager.h",
"cast_audio_mixer.cc",
"cast_audio_mixer.h",
"cast_audio_output_stream.cc",
"cast_audio_output_stream.h",
]
deps = [
":audio_buildflags",
"//base",
"//chromecast/base",
"//chromecast/common/mojom",
"//chromecast/media/audio/capture_service:receiver",
"//chromecast/media/audio/mixer_service:connection",
"//chromecast/media/audio/mixer_service:proto",
"//chromecast/media/base",
"//chromecast/media/base:monotonic_clock",
"//chromecast/media/cma/backend",
"//chromecast/media/cma/base",
"//chromecast/public/media",
"//media",
"//media:shared_memory_support",
"//services/service_manager/public/cpp",
]
if (use_alsa) {
sources += [
"cast_audio_manager_alsa.cc",
"cast_audio_manager_alsa.h",
]
deps += [
":audio_buildflags",
"//content/public/browser",
]
}
configs += [ "//media/audio:platform_config" ]
}
if (is_android) {
cast_source_set("cast_audio_device_factory") {
sources = [
"cast_audio_device_factory.cc",
"cast_audio_device_factory.h",
]
deps = [
"//base",
"//content/renderer:renderer",
"//media",
]
}
}
cast_shared_library("libcast_external_audio_pipeline_1.0") {
sources = [
"external_audio_pipeline_dummy.cc",
]
public_deps = [
"//chromecast/public/media",
]
}
source_set("fake_external_audio_pipeline") {
sources = [
"fake_external_audio_pipeline.cc",
"fake_external_audio_pipeline_support.h",
]
deps = [
"//base",
"//chromecast/public",
"//chromecast/public/media",
]
}
buildflag_header("audio_buildflags") {
header = "audio_buildflags.h"
flags = [
"MINIMUM_OUTPUT_BUFFER_SIZE_IN_FRAMES=$minimum_output_buffer_size_in_frames",
"MAXIMUM_OUTPUT_BUFFER_SIZE_IN_FRAMES=$maximum_output_buffer_size_in_frames",
"DEFAULT_OUTPUT_BUFFER_SIZE_IN_FRAMES=$default_output_buffer_size_in_frames",
"ENABLE_AUDIO_CAPTURE_SERVICE=$enable_audio_capture_service",
"USE_UNIX_SOCKETS=$use_unix_sockets",
]
if (use_alsa) {
# Currently, this flag will only be used in cast_audio_manager_alsa.cc
flags += [ "AUDIO_INPUT_SAMPLE_RATE=$audio_input_sample_rate" ]
}
}
cast_source_set("test_support") {
testonly = true
sources = [
"mock_audio_input_callback.h",
]
public_deps = [
"//testing/gmock",
]
deps = [
"//media",
]
}