blob: d52bc9a58052ee0c16d051cd20f4e092a9ccdaf1 [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("//chromecast/chromecast.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
declare_args() {
if (is_cast_desktop_build) {
# Desktop builds should set cast_static_media_lib_target explicitly if
# desired.
cast_static_media_lib_target = ""
} else if (is_cast_audio_only) {
cast_static_media_lib_target =
"//chromecast/media/cma/backend/alsa:libcast_media_1.0_audio"
} else if (enable_video_with_mixed_audio) {
cast_static_media_lib_target =
"//chromecast/media/cma/backend/video:libcast_media_1.0_avsync"
} else {
cast_static_media_lib_target = ""
}
}
group("media") {
public_deps = [
"//chromecast/media/audio",
"//chromecast/media/base",
"//chromecast/media/base:media_resource_tracker",
"//chromecast/media/cdm",
"//chromecast/media/cma",
]
}
# Any component calling CastMediaShlib:: static functions should depend on this.
# Handles the various differences between (ATV, Things, desktop, device builds).
group("libcast_media") {
if (is_android) {
deps = [ "//chromecast/media/cma/backend/android:cast_media_android" ]
} else if (is_fuchsia) {
deps = [ "//chromecast/media/cma/backend/fuchsia:media_backend" ]
} else if (cast_static_media_lib_target != "") {
deps = [ "$cast_static_media_lib_target" ]
} else if (is_cast_desktop_build) {
deps = [ "//chromecast/media/cma/backend/desktop" ]
} else {
deps = [ "//chromecast/media/cma/backend:libcast_media_1.0" ]
}
if (cast_volume_control_in_avsettings) {
deps += [ "//chromecast/media/avsettings:libcast_avsettings_1.0" ]
}
}
test("cast_media_unittests") {
sources = [
"audio/cast_audio_manager_unittest.cc",
"audio/cast_audio_mixer_unittest.cc",
"audio/cast_audio_output_stream_unittest.cc",
"base/media_resource_tracker_unittest.cc",
"base/slew_volume_unittests.cc",
"base/supported_codec_profile_levels_memo_unittest.cc",
"cma/backend/audio_decoder_software_wrapper_unittest.cc",
"test/run_all_unittests.cc",
]
if (use_alsa && !is_cast_desktop_build) {
sources += [ "audio/cast_audio_manager_alsa_unittest.cc" ]
}
deps = [
":libcast_media",
":media",
"//base",
"//base/test:test_support",
"//chromecast:chromecast_buildflags",
"//chromecast/base",
"//chromecast/base/metrics:test_support",
"//chromecast/common/mojom",
"//chromecast/media/audio:unittests",
"//chromecast/media/audio/capture_service:unittests",
"//chromecast/media/base:monotonic_clock",
"//chromecast/media/base:test_media_resource_tracker",
"//chromecast/media/cma:test_support",
"//chromecast/media/cma:unittests",
"//chromecast/public",
"//content/test:test_support",
"//media:test_support",
"//media/mojo:test_support",
"//mojo/core/embedder",
"//services/service_manager/public/cpp",
"//testing/gmock",
"//testing/gtest",
]
if (is_android) {
deps += [
"//chromecast/media/cma/backend/android:audio_track_java",
"//media/base/android:media_java",
]
shard_timeout = 300
}
}