OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/chromecast_build.gni") | 6 import("//build/config/chromecast_build.gni") |
7 import("//chromecast/chromecast.gni") | 7 import("//chromecast/chromecast.gni") |
8 import("//media/media_options.gni") | 8 import("//media/media_options.gni") |
9 import("//testing/test.gni") | 9 import("//testing/test.gni") |
10 | 10 |
11 declare_args() { | 11 declare_args() { |
12 # Set true to use raw timestamps on non-desktop cast build. | 12 # Set true to use raw timestamps on non-desktop cast build. |
13 # ALSA version equal or later than 1.0.29 support this function. | 13 # ALSA version equal or later than 1.0.29 support this function. |
14 use_alsa_monotonic_raw_tstamps = !is_cast_desktop_build | 14 use_alsa_monotonic_raw_tstamps = !is_cast_desktop_build |
15 } | 15 } |
16 | 16 |
17 # Alsa must be used for these targets to build. | 17 # Alsa must be used for these targets to build. |
18 assert(use_alsa) | 18 assert(use_alsa) |
19 | 19 |
20 shared_library("libcast_media_1.0_audio") { | 20 shared_library("libcast_media_1.0_audio") { |
21 sources = [ | 21 sources = [ |
22 "cast_media_shlib.cc", | 22 "cast_media_shlib.cc", |
23 "media_codec_support_cast_audio.cc", | 23 "media_codec_support_cast_audio.cc", |
24 "post_processing_pipeline_impl.cc", | 24 "post_processing_pipeline_impl.cc", |
25 "post_processing_pipeline_impl.h", | 25 "post_processing_pipeline_impl.h", |
26 ] | 26 ] |
27 | 27 |
28 deps = [ | 28 deps = [ |
29 ":alsa_cma_backend", | 29 ":alsa_cma_backend", |
| 30 ":post_processor_factory", |
30 "//base", | 31 "//base", |
31 "//chromecast/base", | 32 "//chromecast/base", |
32 "//chromecast/public", | 33 "//chromecast/public", |
33 "//chromecast/public/media", | 34 "//chromecast/public/media", |
34 "//media", | 35 "//media", |
35 ] | 36 ] |
36 } | 37 } |
37 | 38 |
38 source_set("alsa_cma_backend") { | 39 source_set("alsa_cma_backend") { |
39 sources = [ | 40 sources = [ |
(...skipping 17 matching lines...) Expand all Loading... |
57 "stream_mixer_alsa_input_impl.cc", | 58 "stream_mixer_alsa_input_impl.cc", |
58 "stream_mixer_alsa_input_impl.h", | 59 "stream_mixer_alsa_input_impl.h", |
59 "volume_control.cc", | 60 "volume_control.cc", |
60 ] | 61 ] |
61 | 62 |
62 libs = [ "asound" ] | 63 libs = [ "asound" ] |
63 | 64 |
64 deps = [ | 65 deps = [ |
65 ":alsa_features", | 66 ":alsa_features", |
66 ":slew_volume", | 67 ":slew_volume", |
| 68 ":volume_map", |
67 "//base", | 69 "//base", |
68 "//chromecast/base", | 70 "//chromecast/base", |
69 "//chromecast/media/base", | 71 "//chromecast/media/base", |
70 "//chromecast/media/cma/backend:null", | 72 "//chromecast/media/cma/backend:null", |
71 "//chromecast/media/cma/base", | 73 "//chromecast/media/cma/base", |
72 "//chromecast/media/cma/decoder", | 74 "//chromecast/media/cma/decoder", |
73 "//chromecast/public/media", | 75 "//chromecast/public/media", |
74 "//media", | 76 "//media", |
75 "//media:shared_memory_support", | 77 "//media:shared_memory_support", |
76 ] | 78 ] |
77 } | 79 } |
78 | 80 |
| 81 source_set("volume_map") { |
| 82 sources = [ |
| 83 "cast_audio_json.cc", |
| 84 "cast_audio_json.h", |
| 85 "volume_map.cc", |
| 86 "volume_map.h", |
| 87 ] |
| 88 deps = [ |
| 89 "//base", |
| 90 "//chromecast/base", |
| 91 ] |
| 92 } |
| 93 |
79 source_set("slew_volume") { | 94 source_set("slew_volume") { |
80 sources = [ | 95 sources = [ |
81 "slew_volume.cc", | 96 "slew_volume.cc", |
82 "slew_volume.h", | 97 "slew_volume.h", |
83 ] | 98 ] |
84 deps = [ | 99 deps = [ |
85 "//base", | 100 "//base", |
86 "//media:shared_memory_support", | 101 "//media:shared_memory_support", |
87 ] | 102 ] |
88 } | 103 } |
89 | 104 |
90 alsa_owns_volume = !enable_assistant | 105 alsa_owns_volume = !enable_assistant |
91 | 106 |
92 buildflag_header("alsa_features") { | 107 buildflag_header("alsa_features") { |
93 header = "alsa_features.h" | 108 header = "alsa_features.h" |
94 | 109 |
95 flags = [ | 110 flags = [ |
96 "ALSA_MONOTONIC_RAW_TSTAMPS=$use_alsa_monotonic_raw_tstamps", | 111 "ALSA_MONOTONIC_RAW_TSTAMPS=$use_alsa_monotonic_raw_tstamps", |
97 "ALSA_OWNS_VOLUME=$alsa_owns_volume", | 112 "ALSA_OWNS_VOLUME=$alsa_owns_volume", |
98 ] | 113 ] |
99 } | 114 } |
100 | 115 |
101 test("cast_alsa_cma_backend_unittests") { | 116 test("cast_alsa_cma_backend_unittests") { |
102 sources = [ | 117 sources = [ |
103 "filter_group_unittest.cc", | 118 "filter_group_unittest.cc", |
| 119 "post_processors/governor_unittest.cc", |
| 120 "post_processors/saturated_gain_unittest.cc", |
| 121 "slew_volume_unittests.cc", |
104 "stream_mixer_alsa_unittest.cc", | 122 "stream_mixer_alsa_unittest.cc", |
105 ] | 123 ] |
106 | 124 |
107 deps = [ | 125 deps = [ |
| 126 ":governor", |
| 127 ":libcast_governor_1.0", |
| 128 ":libcast_saturated_gain_1.0", |
| 129 ":post_processor_factory", |
| 130 ":post_processor_test_support", |
| 131 ":slew_volume", |
108 ":test_support", | 132 ":test_support", |
109 "//base", | 133 "//base", |
110 "//base/test:run_all_unittests", | 134 "//base/test:run_all_unittests", |
111 "//chromecast/media", | 135 "//chromecast/media", |
| 136 "//chromecast/public", |
112 "//media", | 137 "//media", |
113 "//media:shared_memory_support", | 138 "//media:shared_memory_support", |
114 "//testing/gmock", | 139 "//testing/gmock", |
115 "//testing/gtest", | 140 "//testing/gtest", |
116 ] | 141 ] |
117 } | 142 } |
118 | 143 |
119 source_set("test_support") { | 144 source_set("test_support") { |
120 testonly = true | 145 testonly = true |
121 | 146 |
122 sources = [ | 147 sources = [ |
123 "mock_alsa_wrapper.cc", | 148 "mock_alsa_wrapper.cc", |
124 "mock_alsa_wrapper.h", | 149 "mock_alsa_wrapper.h", |
125 ] | 150 ] |
126 | 151 |
127 public_deps = [ | 152 public_deps = [ |
128 ":alsa_cma_backend", | 153 ":alsa_cma_backend", |
129 ] | 154 ] |
130 | 155 |
131 deps = [ | 156 deps = [ |
132 "//base", | 157 "//base", |
133 "//media", | 158 "//media", |
134 "//testing/gmock", | 159 "//testing/gmock", |
135 ] | 160 ] |
136 } | 161 } |
137 | 162 |
138 test("slew_volume_unittests") { | 163 # This is separate from ":governor" because the associated unittest needs |
| 164 # to create a Governor directly (to use test functions). |
| 165 shared_library("libcast_governor_1.0") { |
139 sources = [ | 166 sources = [ |
140 "slew_volume_unittests.cc", | 167 "post_processors/governor_create.cc", |
141 ] | |
142 deps = [ | |
143 ":slew_volume", | |
144 "//base", | |
145 "//base/test:run_all_unittests", | |
146 "//media", | |
147 "//testing/gtest", | |
148 ] | |
149 } | |
150 | |
151 shared_library("libcast_governor_1.0") { | |
152 deps = [ | |
153 ":governor", | |
154 ] | |
155 } | |
156 | |
157 test("libcast_governor_unittests") { | |
158 sources = [ | |
159 "post_processors/governor_unittest.cc", | |
160 ] | 168 ] |
161 deps = [ | 169 deps = [ |
162 ":governor", | 170 ":governor", |
163 ":post_processor_test_support", | 171 "//chromecast/public/media", |
164 "//base", | |
165 "//base/test:run_all_unittests", | |
166 "//media", | |
167 "//testing/gtest", | |
168 ] | 172 ] |
169 } | 173 } |
170 | 174 |
171 source_set("governor") { | 175 source_set("governor") { |
172 sources = [ | 176 sources = [ |
173 "post_processors/governor.cc", | 177 "post_processors/governor.cc", |
174 "post_processors/governor.h", | 178 "post_processors/governor.h", |
175 ] | 179 ] |
176 deps = [ | 180 deps = [ |
177 ":slew_volume", | 181 ":slew_volume", |
178 "//base", | 182 "//base", |
179 "//chromecast/base", | 183 "//chromecast/base", |
180 "//chromecast/public/media", | 184 "//chromecast/public/media", |
181 ] | 185 ] |
182 public_configs = [ "//chromecast/public:public_config" ] | 186 public_configs = [ "//chromecast/public:public_config" ] |
183 } | 187 } |
184 | 188 |
| 189 shared_library("libcast_saturated_gain_1.0") { |
| 190 sources = [ |
| 191 "post_processors/saturated_gain.cc", |
| 192 "post_processors/saturated_gain.h", |
| 193 ] |
| 194 deps = [ |
| 195 ":slew_volume", |
| 196 ":volume_map", |
| 197 "//base", |
| 198 "//chromecast/base", |
| 199 "//chromecast/public/media", |
| 200 ] |
| 201 } |
| 202 |
185 source_set("post_processor_test_support") { | 203 source_set("post_processor_test_support") { |
186 testonly = true | 204 testonly = true |
187 sources = [ | 205 sources = [ |
188 "post_processors/post_processor_unittest.cc", | 206 "post_processors/post_processor_unittest.cc", |
189 "post_processors/post_processor_unittest.h", | 207 "post_processors/post_processor_unittest.h", |
190 ] | 208 ] |
191 deps = [ | 209 deps = [ |
192 "//base", | 210 "//base", |
193 "//chromecast/public/media", | 211 "//chromecast/public/media", |
194 "//testing/gtest", | 212 "//testing/gtest", |
195 ] | 213 ] |
196 } | 214 } |
| 215 |
| 216 source_set("post_processor_factory") { |
| 217 sources = [ |
| 218 "post_processor_factory.cc", |
| 219 "post_processor_factory.h", |
| 220 ] |
| 221 deps = [ |
| 222 "//base", |
| 223 "//chromecast/public/media", |
| 224 ] |
| 225 } |
OLD | NEW |