# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chromecast/chromecast.gni")
import("//testing/test.gni")
# Targets may depend on this to bring in every CMA component.
group("cma") {
public_deps = [
"//chromecast/media/cma/backend",
"//chromecast/media/cma/base",
"//chromecast/media/cma/pipeline",
]
}
cast_source_set("test_support") {
testonly = true
sources = [
"test/frame_generator_for_test.cc",
"test/frame_generator_for_test.h",
"test/frame_segmenter_for_test.cc",
"test/frame_segmenter_for_test.h",
"test/mock_frame_consumer.cc",
"test/mock_frame_consumer.h",
"test/mock_frame_provider.cc",
"test/mock_frame_provider.h",
]
deps = [
"//base",
"//chromecast/common/mojom",
"//chromecast/media/api",
"//chromecast/media/cma/backend",
"//chromecast/media/cma/base",
"//media:test_support",
"//testing/gmock",
"//testing/gtest",
"//ui/gfx/geometry",
]
if (is_cast_audio_only) {
deps += [ "//chromecast/media/cma/backend:null_video" ]
}
}
cast_source_set("unittests") {
testonly = true
sources = [
"backend/audio_video_pipeline_device_unittest.cc",
"backend/multizone_backend_unittest.cc",
"base/balanced_media_task_runner_unittest.cc",
"base/buffering_controller_unittest.cc",
"base/buffering_frame_provider_unittest.cc",
"base/decoder_buffer_adapter_unittest.cc",
"base/decoder_config_adapter_unittest.cc",
"base/demuxer_stream_adapter_unittest.cc",
"base/demuxer_stream_for_test.cc",
"base/demuxer_stream_for_test.h",
"base/multi_demuxer_stream_adapter_unittest.cc",
"pipeline/audio_video_pipeline_impl_unittest.cc",
]
deps = [
":test_support",
"//base",
"//base/test:test_support",
"//chromecast/base",
"//chromecast/media",
"//chromecast/media:libcast_media",
"//chromecast/media/api",
"//chromecast/media/api:test_support",
"//media",
"//testing/gmock",
"//testing/gtest",
]
# Building the required proto files here cause a linker issue on
# Android because both protobuf_full and protobuf_lite get included.
if (!is_android) {
sources += [
"backend/proxy/audio_decoder_pipeline_node_unittest.cc",
"backend/proxy/buffer_id_manager_unittest.cc",
"backend/proxy/cma_backend_proxy_unittest.cc",
"backend/proxy/media_pipeline_buffer_extension_unittest.cc",
"backend/proxy/proxy_call_translator_unittest.cc",
"backend/proxy/push_buffer_pending_handler_unittest.cc",
"backend/proxy/push_buffer_queue_unittest.cc",
]
deps += [
"//chromecast/media/cma/backend/proxy",
"//third_party/cast_core/public/src/proto/runtime:media_service_proto",
# TODO(b/174874712): Remove the explicit gRPC dependency.
"//third_party/grpc:grpc++",
]
}
if (enable_video_with_mixed_audio) {
defines = [ "ENABLE_VIDEO_WITH_MIXED_AUDIO" ]
}
data = [ "//media/test/data/" ]
}