diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 15:28:34 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:54:51 +0000 |
commit | 2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch) | |
tree | eb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/chromecast | |
parent | b014812705fc80bff0a5c120dfcef88f349816dc (diff) | |
download | qtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz |
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chromecast')
23 files changed, 282 insertions, 85 deletions
diff --git a/chromium/chromecast/BUILD.gn b/chromium/chromecast/BUILD.gn index 6700b48bd98..c4364a0d8d2 100644 --- a/chromium/chromecast/BUILD.gn +++ b/chromium/chromecast/BUILD.gn @@ -133,11 +133,6 @@ cast_test_group("cast_tests") { "--enable-local-file-accesses", "--test-launcher-jobs=1", ] - if (is_cast_audio_only) { - args += [ "--ozone-platform=headless" ] - } else { - args += [ "--ozone-platform=cast" ] - } if (!is_cast_desktop_build) { args += [ "--use-gpu-in-tests" ] @@ -205,10 +200,10 @@ cast_test_group("cast_tests") { gtest_excludes = [] if (target_os == "linux") { if (is_cast_desktop_build) { - # Disable PartitionAllocReturnNullTest.RepeatedReturnNullDirect (b/67975693) + # Disable PartitionAllocDeathTest.Repeated*ReturnNullDirect (b/67975693) gtest_excludes += [ - "PartitionAllocReturnNullTest.RepeatedReturnNullDirect", - "PartitionReallocReturnNullTest.RepeatedReturnNullDirect", + "PartitionAllocDeathTest.RepeatedAllocReturnNullDirect", + "PartitionAllocDeathTest.RepeatedReallocReturnNullDirect", ] } else { # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509) @@ -455,15 +450,15 @@ cast_executable("cast_shell") { deps = [ ":cast_shell_lib", ":chromecast_locales_pak", - "//build/config:exe_and_shlib_deps", "//chromecast/app", "//content/public/app:both", ] } if (is_fuchsia) { - fuchsia_executable_runner("cast_shell_fuchsia") { - exe_target = ":cast_shell" + fuchsia_package("cast_shell_pkg") { + binary = ":cast_shell" + package_name_override = "cast_shell" if (chromecast_branding != "public") { deps = [ @@ -471,6 +466,11 @@ if (is_fuchsia) { ] } } + + fuchsia_package_runner("cast_shell_fuchsia") { + package = ":cast_shell_pkg" + package_name_override = "cast_shell" + } } repack("cast_shell_pak") { diff --git a/chromium/chromecast/app/BUILD.gn b/chromium/chromecast/app/BUILD.gn index a1660b36bef..d172b5a85f2 100644 --- a/chromium/chromecast/app/BUILD.gn +++ b/chromium/chromecast/app/BUILD.gn @@ -81,7 +81,7 @@ cast_source_set("test_support") { "//chromecast/base", "//content/test:test_support", "//ipc", - "//mojo/edk", + "//mojo/core/embedder", ] } diff --git a/chromium/chromecast/base/BUILD.gn b/chromium/chromecast/base/BUILD.gn index 0e96a5d7b4c..0c123cdf45b 100644 --- a/chromium/chromecast/base/BUILD.gn +++ b/chromium/chromecast/base/BUILD.gn @@ -178,13 +178,26 @@ test("cast_base_unittests") { cast_source_set("cast_sys_info") { sources = [ - "cast_sys_info_android.cc", - "cast_sys_info_android.h", "cast_sys_info_dummy.cc", "cast_sys_info_dummy.h", "cast_sys_info_util.h", ] + if (is_android) { + sources += [ + "cast_sys_info_android.cc", + "cast_sys_info_android.h", + "cast_sys_info_android_factory.cc", + ] + + if (is_android_things) { + sources += [ + "cast_sys_info_android_things.cc", + "cast_sys_info_android_things.h", + ] + } + } + deps = [ "//base", "//chromecast/public", diff --git a/chromium/chromecast/browser/BUILD.gn b/chromium/chromecast/browser/BUILD.gn index 827dea346c2..d3e3eda810f 100644 --- a/chromium/chromecast/browser/BUILD.gn +++ b/chromium/chromecast/browser/BUILD.gn @@ -17,10 +17,10 @@ cast_source_set("browser") { sources = [ "application_media_capabilities.cc", "application_media_capabilities.h", + "application_session_id_manager.cc", + "application_session_id_manager.h", "bluetooth/cast_bluetooth_chooser.cc", "bluetooth/cast_bluetooth_chooser.h", - "cast_back_gesture_dispatcher.cc", - "cast_back_gesture_dispatcher.h", "cast_browser_context.cc", "cast_browser_context.h", "cast_browser_main_parts.cc", @@ -31,6 +31,8 @@ cast_source_set("browser") { "cast_content_browser_client.h", "cast_download_manager_delegate.cc", "cast_download_manager_delegate.h", + "cast_gesture_dispatcher.cc", + "cast_gesture_dispatcher.h", "cast_http_user_agent_settings.cc", "cast_http_user_agent_settings.h", "cast_media_blocker.cc", @@ -84,11 +86,10 @@ cast_source_set("browser") { "tts/tts_controller.h", "tts/tts_controller_impl.cc", "tts/tts_controller_impl.h", - "tts/tts_message_filter.cc", - "tts/tts_message_filter.h", "tts/tts_platform.cc", "tts/tts_platform.h", "tts/tts_platform_stub.cc", + "tts/tts_platform_stub.h", "url_request_context_factory.cc", "url_request_context_factory.h", ] @@ -148,7 +149,6 @@ cast_source_set("browser") { "//content/public/common:service_names", "//content/public/utility", "//device/bluetooth", - "//device/geolocation", "//gpu", "//ipc", "//media", @@ -167,12 +167,11 @@ cast_source_set("browser") { "android/cast_content_window_android.cc", "android/cast_content_window_android.h", "android/cast_metrics_helper_android.cc", - "android/cast_web_contents_surface_helper.cc", - "android/cast_web_contents_surface_helper.h", ] deps += [ ":jni_headers", "//components/cdm/browser", + "//components/embedder_support/android:view", ] } else { sources += [ @@ -260,10 +259,10 @@ cast_source_set("browser") { "extensions/api/module/module.h", "extensions/api/notifications/notifications_api.cc", "extensions/api/notifications/notifications_api.h", - "extensions/api/tts/tts_engine_extension_api.cc", - "extensions/api/tts/tts_engine_extension_api.h", - "extensions/api/tts/tts_engine_extension_observer.cc", - "extensions/api/tts/tts_engine_extension_observer.h", + "extensions/api/tabs/tabs_api.cc", + "extensions/api/tabs/tabs_api.h", + "extensions/api/tabs/tabs_constants.cc", + "extensions/api/tabs/tabs_constants.h", "extensions/api/tts/tts_extension_api.cc", "extensions/api/tts/tts_extension_api.h", "extensions/api/tts/tts_extension_api_constants.cc", @@ -288,6 +287,12 @@ cast_source_set("browser") { ] if (use_aura) { sources += [ + "accessibility/accessibility_manager.cc", + "accessibility/accessibility_manager.h", + "accessibility/touch_exploration_controller.cc", + "accessibility/touch_exploration_controller.h", + "accessibility/touch_exploration_manager.cc", + "accessibility/touch_exploration_manager.h", "cast_web_view_extension.h", "cast_web_view_extension.h", "ui/aura/accessibility/automation_manager_aura.cc", @@ -308,11 +313,14 @@ cast_source_set("browser") { "//components/storage_monitor", "//components/user_prefs:user_prefs", "//components/version_info", + "//components/zoom", "//extensions/browser", "//extensions/common", "//extensions/common/api", "//google_apis:google_apis", + "//ui/events:gesture_detection", "//ui/views:views", + "//ui/wm/public:public", ] } @@ -434,7 +442,7 @@ cast_source_set("test_support") { cast_source_set("browsertests") { testonly = true sources = [ - "cast_back_gesture_dispatcher_test.cc", + "cast_gesture_dispatcher_test.cc", "cast_media_blocker_browsertest.cc", "renderer_prelauncher_test.cc", "test/cast_features_browsertest.cc", @@ -452,6 +460,10 @@ cast_source_set("browsertests") { "//components/prefs", "//media:test_support", ] + + data = [ + "//media/test/data/", + ] } cast_source_set("unittests") { @@ -479,6 +491,14 @@ cast_source_set("unittests") { "//ui/events/devices:devices", "//ui/gl:test_support", ] + + if (enable_chromecast_extensions && use_aura) { + sources += [ "accessibility/touch_exploration_controller_unittest.cc" ] + deps += [ + "//ui/aura:test_support", + "//ui/events:test_support", + ] + } } if (is_android) { @@ -488,7 +508,6 @@ if (is_android) { "android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java", "android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java", "android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java", - "android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java", ] if (is_android_things_non_public) { diff --git a/chromium/chromecast/browser/android/BUILD.gn b/chromium/chromecast/browser/android/BUILD.gn index 1c532e0c08c..fdb3a704ed2 100644 --- a/chromium/chromecast/browser/android/BUILD.gn +++ b/chromium/chromecast/browser/android/BUILD.gn @@ -101,6 +101,7 @@ android_library("cast_shell_java") { "$java_src_dir/org/chromium/chromecast/shell/CastApplication.java", "$java_src_dir/org/chromium/chromecast/shell/CastBrowserHelper.java", "$java_src_dir/org/chromium/chromecast/shell/CastContentWindowAndroid.java", + "$java_src_dir/org/chromium/chromecast/shell/CastCommandLineHelper.java", "$java_src_dir/org/chromium/chromecast/shell/CastCrashHandler.java", "$java_src_dir/org/chromium/chromecast/shell/CastCrashUploader.java", "$java_src_dir/org/chromium/chromecast/shell/CastCrashUploaderFactory.java", @@ -132,10 +133,10 @@ android_library("cast_shell_java") { ":reactive_android_java", "//base:base_java", "//chromecast/base:base_java", - "//components/content_view:content_view_java", "//components/crash/android:java", + "//components/embedder_support/android:content_view_java", + "//components/embedder_support/android:view_java", "//content/public/android:content_java", - "//device/geolocation:geolocation_java", "//media/base/android:media_java", "//net/android:net_java", @@ -161,6 +162,7 @@ junit_binary("cast_shell_junit_tests") { java_files = [ "junit/src/org/chromium/chromecast/shell/AsyncTaskRunnerTest.java", "junit/src/org/chromium/chromecast/shell/CastAudioManagerTest.java", + "junit/src/org/chromium/chromecast/shell/CastCommandLineHelperTest.java", "junit/src/org/chromium/chromecast/shell/CastWebContentsActivityTest.java", "junit/src/org/chromium/chromecast/shell/CastWebContentsComponentTest.java", "junit/src/org/chromium/chromecast/shell/CastWebContentsIntentUtilsTest.java", diff --git a/chromium/chromecast/chromecast.gni b/chromium/chromecast/chromecast.gni index 1907fb611c0..69116c6b5e7 100644 --- a/chromium/chromecast/chromecast.gni +++ b/chromium/chromecast/chromecast.gni @@ -79,6 +79,9 @@ declare_args() { # Set to true to enable a CMA media backend that allows mixed audio to be # output with sync'd video. enable_video_with_mixed_audio = false + + # unified flag to pick monotonic_clock OR monotonic_clock_raw + media_clock_monotonic_raw = !is_android && !is_cast_desktop_build } declare_args() { @@ -110,8 +113,6 @@ cast_locales = locales enable_chromecast_extensions = enable_extensions -# These templates are a temporary fix fo link libc++ into shared libraries and -# executables. These should be removed as soon as crbug.com/746091 is resolved. foreach(target_type, [ "executable", @@ -124,14 +125,6 @@ foreach(target_type, forward_variables_from(invoker, "*") configs += [ "//chromecast:cast_config" ] - - if (!defined(deps)) { - deps = [] - } - - if (target_type != "source_set") { - deps += [ "//build/config:exe_and_shlib_deps" ] - } } } } diff --git a/chromium/chromecast/common/BUILD.gn b/chromium/chromecast/common/BUILD.gn index e949919f69b..c2e4faad272 100644 --- a/chromium/chromecast/common/BUILD.gn +++ b/chromium/chromecast/common/BUILD.gn @@ -11,12 +11,7 @@ cast_source_set("common") { "cast_content_client.h", "cast_resource_delegate.cc", "cast_resource_delegate.h", - "common_message_generator.cc", - "common_message_generator.h", "global_descriptors.h", - "tts_messages.h", - "tts_utterance_request.cc", - "tts_utterance_request.h", ] deps = [ @@ -35,14 +30,14 @@ cast_source_set("common") { sources += [ "cast_extensions_client.cc", "cast_extensions_client.h", + "cast_redirect_manifest_handler.cc", + "cast_redirect_manifest_handler.h", "extensions_api/cast_aliases.cc", "extensions_api/cast_aliases.h", "extensions_api/cast_api_permissions.cc", "extensions_api/cast_api_permissions.h", "extensions_api/cast_extension_messages.cc", "extensions_api/cast_extension_messages.h", - "extensions_api/tts/tts_engine_manifest_handler.cc", - "extensions_api/tts/tts_engine_manifest_handler.h", ] deps += [ diff --git a/chromium/chromecast/common/extensions_api/BUILD.gn b/chromium/chromecast/common/extensions_api/BUILD.gn index d04a721838b..75b3855522e 100644 --- a/chromium/chromecast/common/extensions_api/BUILD.gn +++ b/chromium/chromecast/common/extensions_api/BUILD.gn @@ -9,6 +9,9 @@ import("//tools/json_schema_compiler/json_schema_api.gni") assert(enable_extensions, "Cannot depend on extensions because enable_extensions=false.") +extensions_api_schema_include_rules = + "extensions/common/api:extensions::api::%(namespace)s" + schema_sources = [ # TODO(crbug/837773) De-dupe Automation later. "accessibility_private.json", @@ -20,6 +23,8 @@ schema_sources = [ "identity.idl", "i18n.json", "notifications.idl", + "tabs.json", + "windows.json", ] root_namespace = "extensions::cast::api::%(namespace)s" @@ -32,9 +37,11 @@ json_schema_api("api") { schemas = true bundle = true bundle_name = "Cast" - uncompiled_bundle_schema_sources = [ - "tts.json", - "tts_engine.json", + uncompiled_bundle_schema_sources = [ "tts.json" ] + schema_include_rules = extensions_api_schema_include_rules + + deps = [ + "//extensions/common/api", ] } @@ -47,49 +54,39 @@ json_schema_api("api_registration") { deps = [ ":api", "//extensions/common", + "//extensions/common/api", ] } json_features("cast_api_features") { feature_type = "APIFeature" - provider_class = "CastAPIFeatureProvider" + method_name = "AddCastAPIFeatures" sources = [ - "../../../extensions/common/api/_api_features.json", "_api_features.json", ] } json_features("cast_permission_features") { feature_type = "PermissionFeature" - provider_class = "CastPermissionFeatureProvider" + method_name = "AddCastPermissionFeatures" sources = [ - "../../../extensions/common/api/_permission_features.json", "_permission_features.json", ] } json_features("cast_manifest_features") { feature_type = "ManifestFeature" - provider_class = "CastManifestFeatureProvider" + method_name = "AddCastManifestFeatures" sources = [ - "../../../extensions/common/api/_manifest_features.json", "_manifest_features.json", ] } -json_features("cast_behavior_features") { - feature_type = "BehaviorFeature" - provider_class = "CastBehaviorFeatureProvider" - sources = [ - "../../../extensions/common/api/_behavior_features.json", - ] -} - group("extensions_features") { public_deps = [ ":cast_api_features", - ":cast_behavior_features", ":cast_manifest_features", ":cast_permission_features", + "//extensions/common/api:extensions_features", ] } diff --git a/chromium/chromecast/common/mojom/BUILD.gn b/chromium/chromecast/common/mojom/BUILD.gn index 5f27b462f8f..20ed2c97bbb 100644 --- a/chromium/chromecast/common/mojom/BUILD.gn +++ b/chromium/chromecast/common/mojom/BUILD.gn @@ -10,5 +10,10 @@ mojom("mojom") { "media_caps.mojom", "media_load_deferrer.mojom", "memory_pressure.mojom", + "multiroom.mojom", + ] + + public_deps = [ + "//mojo/public/mojom/base", ] } diff --git a/chromium/chromecast/common/mojom/multiroom.mojom b/chromium/chromecast/common/mojom/multiroom.mojom new file mode 100644 index 00000000000..a997134346c --- /dev/null +++ b/chromium/chromecast/common/mojom/multiroom.mojom @@ -0,0 +1,28 @@ +// Copyright 2018 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. + +module chromecast.mojom; + +import "mojo/public/mojom/base/time.mojom"; + +enum AudioChannel { + kAll, + kLeft, + kRight, +}; + +struct MultiroomInfo { + // True if casting to multiple devices, or false otherwise. + bool multiroom = false; + + // Audio channel this device is playing. + AudioChannel audio_channel; + + // Intrinsic output delay of this device. + mojo_base.mojom.TimeDelta output_delay; +}; + +interface MultiroomManager { + GetMultiroomInfo(string session_id) => (MultiroomInfo multiroom_info); +}; diff --git a/chromium/chromecast/common/mojom/multiroom.typemap b/chromium/chromecast/common/mojom/multiroom.typemap new file mode 100644 index 00000000000..82fee656803 --- /dev/null +++ b/chromium/chromecast/common/mojom/multiroom.typemap @@ -0,0 +1,20 @@ +# Copyright 2018 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. + +mojom = "//chromecast/common/mojom/multiroom.mojom" + +public_headers = [ "//chromecast/public/media/media_pipeline_device_params.h" ] + +traits_headers = [ "//chromecast/common/mojom/multiroom_struct_traits.h" ] + +sources = [ + "//chromecast/common/mojom/multiroom_struct_traits.h", +] + +public_deps = [ + "//chromecast/public/media", +] + +type_mappings = + [ "chromecast.mojom.AudioChannel=chromecast::media::AudioChannel" ] diff --git a/chromium/chromecast/common/mojom/typemaps.gni b/chromium/chromecast/common/mojom/typemaps.gni new file mode 100644 index 00000000000..75d50bf095e --- /dev/null +++ b/chromium/chromecast/common/mojom/typemaps.gni @@ -0,0 +1,5 @@ +# Copyright 2018 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. + +typemaps = [ "//chromecast/common/mojom/multiroom.typemap" ] diff --git a/chromium/chromecast/device/bluetooth/le/BUILD.gn b/chromium/chromecast/device/bluetooth/le/BUILD.gn index 4ceb8fff49f..8e2fc00a847 100644 --- a/chromium/chromecast/device/bluetooth/le/BUILD.gn +++ b/chromium/chromecast/device/bluetooth/le/BUILD.gn @@ -64,6 +64,7 @@ cast_source_set("test_support") { ] deps = [ ":le", + "//base", "//chromecast/public", "//testing/gmock", ] diff --git a/chromium/chromecast/graphics/BUILD.gn b/chromium/chromecast/graphics/BUILD.gn index 405a322238f..75ad4faab33 100644 --- a/chromium/chromecast/graphics/BUILD.gn +++ b/chromium/chromecast/graphics/BUILD.gn @@ -8,8 +8,8 @@ import("//testing/test.gni") cast_source_set("graphics") { sources = [ - "cast_side_swipe_gesture_handler.cc", - "cast_side_swipe_gesture_handler.h", + "cast_gesture_handler.cc", + "cast_gesture_handler.h", "cast_window_manager.h", ] @@ -20,16 +20,39 @@ cast_source_set("graphics") { if (use_aura) { sources += [ + "accessibility/accessibility_cursor_ring_layer.cc", + "accessibility/accessibility_cursor_ring_layer.h", + "accessibility/accessibility_focus_ring.cc", + "accessibility/accessibility_focus_ring.h", + "accessibility/accessibility_focus_ring_controller.cc", + "accessibility/accessibility_focus_ring_controller.h", + "accessibility/accessibility_focus_ring_layer.cc", + "accessibility/accessibility_focus_ring_layer.h", + "accessibility/accessibility_highlight_layer.cc", + "accessibility/accessibility_highlight_layer.h", + "accessibility/accessibility_layer.cc", + "accessibility/accessibility_layer.h", + "accessibility/accessibility_observer.h", + "accessibility/focus_ring_controller.cc", + "accessibility/focus_ring_controller.h", + "accessibility/focus_ring_layer.cc", + "accessibility/focus_ring_layer.h", + "accessibility/magnification_controller.h", + "accessibility/partial_magnification_controller.cc", + "accessibility/partial_magnification_controller.h", "cast_focus_client_aura.cc", "cast_focus_client_aura.h", "cast_system_gesture_event_handler.cc", "cast_system_gesture_event_handler.h", "cast_window_manager_aura.cc", "cast_window_manager_aura.h", + "triple_tap_detector.cc", + "triple_tap_detector.h", ] deps += [ "//ui/base/ime", + "//ui/events:gesture_detection", "//ui/views", "//ui/wm", "//ui/wm/public", @@ -51,9 +74,12 @@ cast_source_set("graphics") { ":libcast_graphics_1.0", "//chromecast/base", "//chromecast/public", + "//skia", "//ui/aura", + "//ui/compositor", "//ui/display", "//ui/gfx/geometry", + "//ui/platform_window", ] } } @@ -79,23 +105,29 @@ cast_shared_library("libcast_graphics_1.0") { if (use_aura && !is_cast_audio_only) { test("cast_graphics_unittests") { sources = [ + "accessibility/accessibility_focus_ring_controller_unittest.cc", + "accessibility/partial_magnification_controller_unittest.cc", "cast_focus_client_aura_test.cc", "cast_system_gesture_event_handler_test.cc", "cast_views_test.cc", "cast_window_manager_aura_test.cc", "run_all_unittests.cc", + "triple_tap_detector_test.cc", ] deps = [ ":graphics", "//base/test:test_support", - "//mojo/edk", + "//mojo/core/embedder", + "//testing/gmock", "//testing/gtest", "//ui/aura", "//ui/aura:test_support", "//ui/base:test_support", + "//ui/display/manager:manager", "//ui/events:test_support", "//ui/gfx", "//ui/gl:test_support", + "//ui/platform_window", "//ui/views", "//ui/wm", ] diff --git a/chromium/chromecast/media/cma/BUILD.gn b/chromium/chromecast/media/cma/BUILD.gn index 51e253a8f03..4463d48684d 100644 --- a/chromium/chromecast/media/cma/BUILD.gn +++ b/chromium/chromecast/media/cma/BUILD.gn @@ -70,6 +70,10 @@ cast_source_set("unittests") { "//testing/gtest", ] + if (enable_video_with_mixed_audio) { + defines = [ "ENABLE_VIDEO_WITH_MIXED_AUDIO" ] + } + data = [ "//media/test/data/", ] diff --git a/chromium/chromecast/media/cma/backend/BUILD.gn b/chromium/chromecast/media/cma/backend/BUILD.gn index 764a1fbff97..638be08dea8 100644 --- a/chromium/chromecast/media/cma/backend/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/BUILD.gn @@ -8,10 +8,6 @@ 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" } @@ -92,7 +88,7 @@ buildflag_header("audio_buildflags") { header = "audio_buildflags.h" flags = [ - "ALSA_MONOTONIC_RAW_TSTAMPS=$use_alsa_monotonic_raw_tstamps", + "MEDIA_CLOCK_MONOTONIC_RAW=$media_clock_monotonic_raw", "SYSTEM_OWNS_VOLUME=$system_owns_volume", ] } @@ -156,14 +152,38 @@ cast_source_set("audio_codec_support") { ] } +cast_source_set("cast_audio_json") { + sources = [ + "cast_audio_json.cc", + "cast_audio_json.h", + ] + + deps = [ + "//base", + ] +} + +cast_source_set("post_processor_factory") { + sources = [ + "post_processor_factory.cc", + "post_processor_factory.h", + ] + + deps = [ + "//base", + "//chromecast/media/cma/backend/post_processors:post_processor_wrapper", + "//chromecast/public/media", + ] +} + cast_source_set("for_mixer_audio") { sources = [ "audio_decoder_for_mixer.cc", "audio_decoder_for_mixer.h", + "audio_output_redirector.cc", + "audio_output_redirector.h", "buffering_mixer_source.cc", "buffering_mixer_source.h", - "cast_audio_json.cc", - "cast_audio_json.h", "direct_mixer_source.cc", "direct_mixer_source.h", "filter_group.cc", @@ -177,8 +197,6 @@ cast_source_set("for_mixer_audio") { "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", "volume_control.cc", @@ -189,12 +207,13 @@ cast_source_set("for_mixer_audio") { deps = [ ":audio_buildflags", ":audio_helpers", + ":cast_audio_json", + ":post_processor_factory", ":public", "//base", "//chromecast/base", "//chromecast/media/audio:libcast_external_audio_pipeline_1.0", "//chromecast/media/base", - "//chromecast/media/cma/backend/post_processors:post_processor_wrapper", "//chromecast/media/cma/base", "//chromecast/media/cma/decoder", "//chromecast/public", @@ -208,7 +227,11 @@ cast_source_set("for_mixer_audio") { } else if (is_fuchsia) { deps += [ "fuchsia:cma_backend_support" ] } else { - sources += [ "mixer_output_stream_dummy.cc" ] + # If enable_video_with_mixed_audio && !use_alsa, the platform needs to + # provide its own mixer output. + if (!enable_video_with_mixed_audio) { + sources += [ "mixer_output_stream_dummy.cc" ] + } } } @@ -219,6 +242,8 @@ test("cast_audio_backend_unittests") { "filter_group_unittest.cc", "mock_mixer_source.cc", "mock_mixer_source.h", + "mock_redirected_audio_output.cc", + "mock_redirected_audio_output.h", "stream_mixer_unittest.cc", ] diff --git a/chromium/chromecast/media/cma/backend/desktop/BUILD.gn b/chromium/chromecast/media/cma/backend/desktop/BUILD.gn index 2762f8307d1..81c05b4d9f2 100644 --- a/chromium/chromecast/media/cma/backend/desktop/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/desktop/BUILD.gn @@ -16,6 +16,7 @@ cast_source_set("desktop") { "media_sink_desktop.h", "video_decoder_desktop.cc", "video_decoder_desktop.h", + "volume_control_desktop.cc", ] deps = [ diff --git a/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn b/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn index 866d5d605ab..5d2af30b73d 100644 --- a/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn @@ -40,9 +40,8 @@ cast_source_set("cma_backend_support") { "//chromecast/public", "//chromecast/public/media", "//media", + "//third_party/fuchsia-sdk:media", ] - - libs = [ "media_client" ] } cast_source_set("unit_tests") { @@ -55,6 +54,8 @@ cast_source_set("unit_tests") { deps = [ ":cma_backend_support", + "//base", "//testing/gtest", + "//third_party/fuchsia-sdk:media", ] } diff --git a/chromium/chromecast/media/cma/backend/post_processors/BUILD.gn b/chromium/chromecast/media/cma/backend/post_processors/BUILD.gn index d7f274e452c..b6eab39a343 100644 --- a/chromium/chromecast/media/cma/backend/post_processors/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/post_processors/BUILD.gn @@ -17,8 +17,17 @@ cast_source_set("post_processor_wrapper") { } cast_shared_library("libcast_governor_2.0") { + sources = [ + "post_processor_name.cc", + ] + defines = [ + "DEFINED_POSTPROCESSOR_NAME=chromecast::media::Governor", + "DEFINED_POSTPROCESSOR_HEADER=chromecast/media/cma/backend/post_processors/governor.h", + ] deps = [ ":governor", + "//chromecast/public", + "//chromecast/public/media", ] if (is_fuchsia) { ldflags = [ "-Wl,-Bsymbolic" ] @@ -40,8 +49,17 @@ cast_source_set("governor") { } cast_shared_library("libcast_saturated_gain_2.0") { + sources = [ + "post_processor_name.cc", + ] + defines = [ + "DEFINED_POSTPROCESSOR_NAME=chromecast::media::SaturatedGain", + "DEFINED_POSTPROCESSOR_HEADER=chromecast/media/cma/backend/post_processors/saturated_gain.h", + ] deps = [ ":saturated_gain", + "//chromecast/public", + "//chromecast/public/media", ] if (is_fuchsia) { ldflags = [ "-Wl,-Bsymbolic" ] diff --git a/chromium/chromecast/media/cma/backend/video/BUILD.gn b/chromium/chromecast/media/cma/backend/video/BUILD.gn index 0654f9e4a1d..762bcb8f427 100644 --- a/chromium/chromecast/media/cma/backend/video/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/video/BUILD.gn @@ -20,18 +20,56 @@ cast_source_set("av_sync_video") { ] } -cast_shared_library("libcast_media_1.0_avsync") { +cast_source_set("task_runner_lifetime_handler") { sources = [ - "cast_media_shlib.cc", + "task_runner_lifetime_handler.cc", + "task_runner_lifetime_handler.h", ] + deps = [ + "//base", + "//chromecast/base", + "//chromecast/public", + ] +} +cast_source_set("cast_media_shlib_common") { + sources = [ + "cast_media_shlib_common.cc", + ] + deps = [ + "//chromecast/media/cma/backend:for_mixer_audio", + "//chromecast/public", + "//chromecast/public/media", + ] +} + +cast_source_set("cast_media_shlib_default") { + sources = [ + "cast_media_shlib_default.cc", + ] + deps = [ + ":cast_media_shlib_common", + ":task_runner_lifetime_handler", + "//base", + "//chromecast/base", + "//chromecast/media/cma/backend:for_mixer_audio", + "//chromecast/public", + ] +} + +cast_shared_library("libcast_media_1.0_avsync") { deps = [ ":av_sync_video", + ":cast_media_shlib_default", + ":task_runner_lifetime_handler", "//chromecast/base:base", "//chromecast/media/cma/backend:for_mixer_audio", "//chromecast/public/media", "//media", ] - libs = [ "videodecoderformixer" ] + if (use_alsa) { + deps += [ "//chromecast/media/cma/backend/alsa:cma_backend_support" ] + libs = [ "videodecoderformixer" ] + } } diff --git a/chromium/chromecast/media/service/BUILD.gn b/chromium/chromecast/media/service/BUILD.gn index 319ba496423..2e6519a2cb3 100644 --- a/chromium/chromecast/media/service/BUILD.gn +++ b/chromium/chromecast/media/service/BUILD.gn @@ -21,6 +21,7 @@ cast_source_set("service") { deps = [ "//base", "//chromecast/base", + "//chromecast/common/mojom", "//chromecast/media", "//media", "//ui/gfx/geometry", diff --git a/chromium/chromecast/public/media/BUILD.gn b/chromium/chromecast/public/media/BUILD.gn index ab916708a06..c2768aed069 100644 --- a/chromium/chromecast/public/media/BUILD.gn +++ b/chromium/chromecast/public/media/BUILD.gn @@ -16,6 +16,7 @@ cast_source_set("media") { "external_audio_pipeline_shlib.h", "media_pipeline_backend.h", "media_pipeline_device_params.h", + "redirected_audio_output.h", "stream_id.h", ] diff --git a/chromium/chromecast/renderer/BUILD.gn b/chromium/chromecast/renderer/BUILD.gn index 1575559df7a..a698c3d206f 100644 --- a/chromium/chromecast/renderer/BUILD.gn +++ b/chromium/chromecast/renderer/BUILD.gn @@ -30,8 +30,6 @@ cast_source_set("renderer") { "cast_content_renderer_client.h", "cast_media_load_deferrer.cc", "cast_media_load_deferrer.h", - "tts_dispatcher.cc", - "tts_dispatcher.h", ] public_deps = [ |