[go: nahoru, domu]

blob: 6f5637861995dbb2965acc1c7fbb613fb4eb9555 [file] [log] [blame]
prashantv40251292015-04-21 21:54:221# Copyright 2015 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
slan93f59d1d2015-11-13 17:46:495import("//build/config/chromecast_build.gni")
Stephen Lanham3c2131cd2017-04-28 01:13:416import("//build/config/locales.gni")
Scott Violetc8240b02018-03-08 22:03:597import("//extensions/buildflags/buildflags.gni")
Melisa Carranza Zd7998c02018-08-03 20:25:588import("//media/media_options.gni")
slan93f59d1d2015-11-13 17:46:499
slan77bdc2e62015-09-21 17:56:2610# This args block should contain arguments used within the //chromecast
11# directory. Arguments which are used in other Chrome components should
12# be instead declared in //build/config/chromecast_build.gni.
prashantv40251292015-04-21 21:54:2213declare_args() {
slanc7957aae2016-05-09 22:25:5914 # The incremental build number. The Cast automated builders will set this
15 # value to indicate the buildset. Note: The default value should be greater
16 # than any value the builder may assign to prevent attempted automatic updates
17 # when the default value is used.
18 cast_build_incremental = "999999"
bshaya1ba19b62016-08-04 18:50:4219
thoren9540c6d2017-05-22 20:07:0420 if (is_android) {
21 # If true, run receiver apps in an Android service instead of an activity.
22 display_web_contents_in_service = is_cast_audio_only
23 }
24
gfhuang79ceb4f2016-09-07 06:43:0325 # If true, Chromecast WebUI resources are included in a build.
26 # TODO(antz): default to false for audio-only builds, might need further
27 # clean up (b/27119303)
28 enable_chromecast_webui = !is_cast_audio_only && !is_android
kmackay3801f1a2017-03-15 01:24:3229
30 # Set true to enable assistant features.
31 enable_assistant = false
jameswesta0889df2017-06-06 02:53:4632
33 # Set to true on devices that support multizone. Only indicates that the
34 # device supports multizone. The command line flag --enable-multizone must
35 # still be used to enable multizone.
36 supports_multizone = is_cast_audio_only && !is_cast_desktop_build
Bryan Henry35001f812017-06-13 08:17:0737
Ken MacKay67b3d042019-10-03 17:35:4338 # Set to true if there is a full mixer implementation; if not, we create a
39 # shim mixer service receiver that pushes audio to the CMA backend.
40 have_full_mixer = is_cast_audio_only
41
Ken MacKay955c4a02019-03-07 23:17:5542 # Set to true on devices where the VolumeControl implementation is in the
43 # libcast_avsettings_1.0.so instead of in libcast_media_1.0.so.
44 cast_volume_control_in_avsettings = false
45
Yves Arrouyec4785f32017-07-12 02:48:0746 # Set to true for builds targeting ARC.
47 is_android_arc = false
48
Bryan Henry35001f812017-06-13 08:17:0749 # Set true for builds targeting Android Things.
50 is_android_things = false
Aidan Wolter247e39e2017-09-12 19:29:1351
Melisa Carranza Z43ffcb02018-08-24 19:38:1752 # Set true if the platform works as a single volume device, mapping all
53 # volume streams to a single one.
54 is_single_volume = false
55
Aidan Wolter63fb79e2017-11-11 00:56:5756 # Set to true to keep Android activities alive when they are moved to the
57 # background.
58 enable_background_activities = false
Steve Fungdb75c692017-11-21 03:43:0559
Zhiheng Vincent Li7b37d582018-01-24 03:44:5460 # Set to true to use CastWebContentsFragment instead of CastWebContentsActivity
61 # to run cast receiver app.
62 # TODO(thoren) merge this flag with display_web_contents_in_service
63 enable_cast_fragment = false
64
Steve Fungdb75c692017-11-21 03:43:0565 # Set the number of lines for LogcatExtractor to send.
66 logcat_extractor_size = 512
Sandeep Vijayasekar4ddbad72018-01-25 02:20:1167
68 if (is_android) {
69 # Set to true to get logcat from a remote service
70 # If false, will only get the logs of the app.
71 use_remote_service_logcat = false
72
73 # Set the package name and class path for the component which will provide device logs
74 # Values defined in eureka-internal
75 # These values are unused if use_remote_service_logcat is false
76 device_logs_provider_package = ""
77 device_logs_provider_class = ""
78 }
Mina Almasrydc22e80e2018-03-07 19:25:3779
80 # Set to true to enable a CMA media backend that allows mixed audio to be
81 # output with sync'd video.
82 enable_video_with_mixed_audio = false
Sunil Kumar1b9bda42018-07-09 23:22:4283
84 # unified flag to pick monotonic_clock OR monotonic_clock_raw
85 media_clock_monotonic_raw = !is_android && !is_cast_desktop_build
Luke Halliwella6b724742018-08-14 23:11:2286
87 # Include 'Android' in user agent string to avoid being served desktop
88 # versions of websites.
89 # TODO(halliwell): consider making this default for all Cast hardware.
90 use_android_user_agent = false
ziyangchde3eb1822018-09-17 21:01:2891
92 # Contain default command line switches we want to set.
93 # The syntax: "test-flag->
94 # This arg can be overridden but not supports += operator.
95 # TODO(ziyangch): make the parsing logic have ability to quote/escape characters.
96 default_command_line_flags = ""
ziyangch42ac1df2018-09-24 23:41:0597
98 # Set to true to disable secure flac/opus support in EME, when using
99 # cast CMA media backend and supporting Widevine or Playready.
100 disable_secure_flac_and_opus_decoding = false
Shawn Gallea909fe152018-11-06 22:26:45101
102 # Set to true to enable wayland server
103 enable_cast_wayland_server = false
Elvin Leec549dee2018-11-15 16:28:00104
Ken MacKay79b41572018-12-06 19:31:25105 # Set to true to enable mixing in CastAudioManager. Only needed on devices
106 # that do not have a mixer in the CMA backend.
107 enable_cast_audio_manager_mixer =
108 chromecast_branding == "google" && !is_cast_audio_only && !is_android
Kehuang Lia315b5992019-01-17 03:22:13109
110 # Set to true to enable video capture service for video input and output.
111 enable_video_capture_service = false
Ken MacKay14362b22019-03-04 20:58:07112
113 # Set to true to enable external Mojo services to communicate with services
Jiaqi Han4594f8a2019-05-06 18:12:20114 # within cast_shell.
115 enable_external_mojo_services = is_linux
Kehuang Li26194dae2019-04-15 17:29:48116
117 # Recording happens at this sample rate. Must be 16000, 48000 or 96000 Hz.
118 audio_input_sample_rate = 16000
Kehuang Lia7d24332019-07-09 23:10:17119
120 # Whether use unix sockets in Cast input/output stream.
121 use_unix_sockets = is_linux
ziyangch728f6432019-07-12 16:35:08122
123 # Set to true to enable audio capture service for audio input.
124 enable_audio_capture_service = false
slanc7957aae2016-05-09 22:25:59125}
126
sanfin459cccff2016-05-12 22:26:44127declare_args() {
Chris Kuiper23393ec2017-09-23 01:36:29128 enable_volume_tables_access =
129 is_android_things && chromecast_branding != "public"
Aidan Wolterd6c24152018-04-09 18:14:17130 is_android_things_non_public =
131 is_android_things && chromecast_branding != "public"
Nat Jeffries8db55962017-07-21 23:41:22132}
133
134declare_args() {
sanfin459cccff2016-05-12 22:26:44135 # Use Playready CDMs for internal non-desktop builds.
Stephen Lanhamebbe2bf62018-10-16 22:27:42136 enable_playready = !is_cast_desktop_build && chromecast_branding != "public"
sanfin459cccff2016-05-12 22:26:44137}
138
slanc7957aae2016-05-09 22:25:59139# This is the release version, which takes the form <major>.<minor>. Internal
140# builds will read the value from an internal file containing this value as a
141# string. Public builds, lacking this file, will set a dummy value.
142if (chromecast_branding == "public") {
143 cast_build_release = "eng." + getenv("USER")
144} else {
145 cast_build_release =
146 read_file("//chromecast/internal/build/cast_build_release", "trim string")
prashantv40251292015-04-21 21:54:22147}
Stephen Lanham3c2131cd2017-04-28 01:13:41148
149# All locales supported by Cast builds. This provides a single point of
150# reference for all GN files referencing a locales list. |locales| is declared
151# in //build/config/locales.gni.
152cast_locales = locales
Stephen Lanhambd378622017-07-20 14:29:39153
Albert Chaulke9b35dc2018-02-14 23:47:28154enable_chromecast_extensions = enable_extensions
Albert Chaulk3ae73b12018-01-17 18:34:34155
Melisa Carranza Zd7998c02018-08-03 20:25:58156# Use Chromecast CDMs for protected content. Some Android platforms use
157# MediaDrm for CDM support.
158declare_args() {
Simeon Anfinrud08677dd2019-06-30 23:30:47159 use_chromecast_cdms = true
Melisa Carranza Zd7998c02018-08-03 20:25:58160}
161
Stephen Lanham4ad698a82017-07-25 21:24:51162foreach(target_type,
163 [
164 "executable",
165 "shared_library",
166 "loadable_module",
Bailey Forrest635cecc2017-11-01 01:09:40167 "source_set",
Stephen Lanham4ad698a82017-07-25 21:24:51168 ]) {
169 template("cast_${target_type}") {
170 target(target_type, target_name) {
171 forward_variables_from(invoker, "*")
Bailey Forrest635cecc2017-11-01 01:09:40172
173 configs += [ "//chromecast:cast_config" ]
Stephen Lanhambd378622017-07-20 14:29:39174 }
Stephen Lanhambd378622017-07-20 14:29:39175 }
176}
177
Stephen Lanham4ad698a82017-07-25 21:24:51178# Set the defaults for each target. The defaults for these target wrappers
179# should match their unwrapped counterparts in BUILDCONFIG.gn. The variables
180# referenced below are declared in BUILDCONFIG.gn.
181set_defaults("cast_executable") {
182 configs = default_executable_configs
183}
184
185set_defaults("cast_shared_library") {
186 configs = default_shared_library_configs
Doug Horn37635f02017-07-28 03:12:58187 if (is_android) {
188 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
189 }
Stephen Lanham4ad698a82017-07-25 21:24:51190}
191
192set_defaults("cast_loadable_module") {
193 configs = default_shared_library_configs
194 if (is_android) {
195 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
Stephen Lanhambd378622017-07-20 14:29:39196 }
197}
Bailey Forrest635cecc2017-11-01 01:09:40198
199set_defaults("cast_source_set") {
200 configs = default_compiler_configs
201}