1 # Copyright 2014 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.
5 import("//testing/test.gni")
14 # Common code shared by all cast components.
15 source_set("common") {
20 "cast_environment.cc",
22 "common/clock_drift_smoother.cc",
23 "common/clock_drift_smoother.h",
24 "common/transport_encryption_handler.cc",
25 "common/transport_encryption_handler.h",
26 "logging/encoding_event_subscriber.cc",
27 "logging/encoding_event_subscriber.h",
28 "logging/log_deserializer.cc",
29 "logging/log_deserializer.h",
30 "logging/log_serializer.cc",
31 "logging/log_serializer.h",
32 "logging/logging_defines.cc",
33 "logging/logging_defines.h",
34 "logging/logging_impl.cc",
35 "logging/logging_impl.h",
36 "logging/logging_raw.cc",
37 "logging/logging_raw.h",
38 "logging/raw_event_subscriber.h",
39 "logging/raw_event_subscriber_bundle.cc",
40 "logging/raw_event_subscriber_bundle.h",
41 "logging/receiver_time_offset_estimator.h",
42 "logging/receiver_time_offset_estimator_impl.cc",
43 "logging/receiver_time_offset_estimator_impl.h",
44 "logging/simple_event_subscriber.cc",
45 "logging/simple_event_subscriber.h",
46 "logging/stats_event_subscriber.cc",
47 "logging/stats_event_subscriber.h",
51 "//media/cast/logging/proto",
63 "net/cast_transport_config.cc",
64 "net/cast_transport_config.h",
65 "net/cast_transport_defines.h",
66 "net/cast_transport_sender.h",
67 "net/cast_transport_sender_impl.cc",
68 "net/cast_transport_sender_impl.h",
69 "net/pacing/paced_sender.cc",
70 "net/pacing/paced_sender.h",
71 "net/rtcp/receiver_rtcp_event_subscriber.cc",
74 "net/rtcp/rtcp_builder.cc",
75 "net/rtcp/rtcp_builder.h",
76 "net/rtcp/rtcp_defines.cc",
77 "net/rtcp/rtcp_defines.h",
78 "net/rtcp/rtcp_utility.cc",
79 "net/rtcp/rtcp_utility.h",
80 "net/rtp/cast_message_builder.cc",
81 "net/rtp/cast_message_builder.h",
82 "net/rtp/frame_buffer.cc",
83 "net/rtp/frame_buffer.h",
86 "net/rtp/packet_storage.cc",
87 "net/rtp/packet_storage.h",
88 "net/rtp/receiver_stats.cc",
89 "net/rtp/receiver_stats.h",
90 "net/rtp/rtp_packetizer.cc",
91 "net/rtp/rtp_packetizer.h",
92 "net/rtp/rtp_parser.cc",
93 "net/rtp/rtp_parser.h",
94 "net/rtp/rtp_receiver_defines.cc",
95 "net/rtp/rtp_receiver_defines.h",
96 "net/rtp/rtp_sender.cc",
97 "net/rtp/rtp_sender.h",
98 "net/udp_transport.cc",
99 "net/udp_transport.h",
107 source_set("sender") {
110 "cast_sender_impl.cc",
111 "cast_sender_impl.h",
112 "sender/audio_encoder.cc",
113 "sender/audio_encoder.h",
114 "sender/audio_sender.cc",
115 "sender/audio_sender.h",
116 "sender/congestion_control.cc",
117 "sender/congestion_control.h",
118 "sender/external_video_encoder.cc",
119 "sender/external_video_encoder.h",
120 "sender/fake_software_video_encoder.cc",
121 "sender/fake_software_video_encoder.h",
122 "sender/frame_sender.cc",
123 "sender/frame_sender.h",
124 "sender/size_adaptable_video_encoder_base.cc",
125 "sender/size_adaptable_video_encoder_base.h",
126 "sender/software_video_encoder.h",
127 "sender/video_encoder.cc",
128 "sender/video_encoder.h",
129 "sender/video_encoder_impl.cc",
130 "sender/video_encoder_impl.h",
131 "sender/video_frame_factory.h",
132 "sender/video_sender.cc",
133 "sender/video_sender.h",
134 "sender/vp8_encoder.cc",
135 "sender/vp8_encoder.h",
142 "//media:shared_memory_support",
143 "//third_party/libvpx",
144 "//third_party/opus",
148 # use a restricted subset of media and no software codecs on iOS
150 deps += [ "//media:media_for_cast_ios" ]
153 "//third_party/libvpx",
154 "//third_party/opus",
157 "sender/external_video_encoder.cc",
158 "sender/external_video_encoder.h",
159 "sender/video_encoder_impl.cc",
160 "sender/video_encoder_impl.h",
161 "sender/vp8_encoder.cc",
162 "sender/vp8_encoder.h",
166 # iOS and OS X encoders
167 if (is_ios || is_mac) {
169 "sender/h264_vt_encoder.cc",
170 "sender/h264_vt_encoder.h",
175 source_set("receiver") {
178 "receiver/audio_decoder.cc",
179 "receiver/audio_decoder.h",
180 "receiver/cast_receiver_impl.cc",
181 "receiver/cast_receiver_impl.h",
182 "receiver/frame_receiver.cc",
183 "receiver/frame_receiver.h",
184 "receiver/video_decoder.cc",
185 "receiver/video_decoder.h",
192 "//media:shared_memory_support",
193 "//third_party/libvpx",
194 "//third_party/opus",
198 # use a restricted subset of media and no software codecs on iOS
200 deps += [ "//media:media_for_cast_ios" ]
203 "//third_party/libvpx",
204 "//third_party/opus",
209 static_library("test_support") {
212 # TODO(hclam): FFmpeg.
213 # "test/fake_media_source.cc",
214 # "test/fake_media_source.h",
215 "test/fake_single_thread_task_runner.cc",
216 "test/fake_single_thread_task_runner.h",
217 "test/loopback_transport.cc",
218 "test/loopback_transport.h",
219 "test/skewed_single_thread_task_runner.cc",
220 "test/skewed_single_thread_task_runner.h",
221 "test/skewed_tick_clock.cc",
222 "test/skewed_tick_clock.h",
223 "test/utility/audio_utility.cc",
224 "test/utility/audio_utility.h",
225 "test/utility/barcode.cc",
226 "test/utility/barcode.h",
227 "test/utility/default_config.cc",
228 "test/utility/default_config.h",
229 "test/utility/in_process_receiver.cc",
230 "test/utility/in_process_receiver.h",
231 "test/utility/input_builder.cc",
232 "test/utility/input_builder.h",
233 "test/utility/net_utility.cc",
234 "test/utility/net_utility.h",
235 "test/utility/standalone_cast_environment.cc",
236 "test/utility/standalone_cast_environment.h",
237 "test/utility/udp_proxy.cc",
238 "test/utility/udp_proxy.h",
239 "test/utility/video_utility.cc",
240 "test/utility/video_utility.h",
246 "//base/test:test_support",
249 # TODO(hclam): Does not build on ARM yet.
250 # "//third_party/ffmpeg",
251 "//third_party/libyuv",
252 "//third_party/mt19937ar",
258 test("cast_unittests") {
260 "logging/encoding_event_subscriber_unittest.cc",
261 "logging/logging_impl_unittest.cc",
262 "logging/logging_raw_unittest.cc",
263 "logging/receiver_time_offset_estimator_impl_unittest.cc",
264 "logging/serialize_deserialize_test.cc",
265 "logging/simple_event_subscriber_unittest.cc",
266 "logging/stats_event_subscriber_unittest.cc",
267 "net/cast_transport_sender_impl_unittest.cc",
268 "net/mock_cast_transport_sender.cc",
269 "net/mock_cast_transport_sender.h",
270 "net/pacing/mock_paced_packet_sender.cc",
271 "net/pacing/mock_paced_packet_sender.h",
272 "net/pacing/paced_sender_unittest.cc",
273 "net/rtcp/receiver_rtcp_event_subscriber_unittest.cc",
274 "net/rtcp/rtcp_builder_unittest.cc",
275 "net/rtcp/rtcp_unittest.cc",
276 "net/rtcp/rtcp_utility_unittest.cc",
278 # TODO(miu): The following two are test utility modules. Rename/move the files.
279 "net/rtcp/test_rtcp_packet_builder.cc",
280 "net/rtcp/test_rtcp_packet_builder.h",
281 "net/rtp/cast_message_builder_unittest.cc",
282 "net/rtp/frame_buffer_unittest.cc",
283 "net/rtp/framer_unittest.cc",
284 "net/rtp/mock_rtp_payload_feedback.cc",
285 "net/rtp/mock_rtp_payload_feedback.h",
286 "net/rtp/packet_storage_unittest.cc",
287 "net/rtp/receiver_stats_unittest.cc",
288 "net/rtp/rtp_header_parser.cc",
289 "net/rtp/rtp_header_parser.h",
290 "net/rtp/rtp_packet_builder.cc",
291 "net/rtp/rtp_packetizer_unittest.cc",
292 "net/rtp/rtp_parser_unittest.cc",
293 "net/rtp/rtp_receiver_defines.h",
294 "net/udp_transport_unittest.cc",
295 "receiver/audio_decoder_unittest.cc",
296 "receiver/frame_receiver_unittest.cc",
297 "receiver/video_decoder_unittest.cc",
298 "sender/audio_encoder_unittest.cc",
299 "sender/audio_sender_unittest.cc",
300 "sender/congestion_control_unittest.cc",
301 "sender/fake_video_encode_accelerator_factory.cc",
302 "sender/fake_video_encode_accelerator_factory.h",
303 "sender/video_encoder_unittest.cc",
304 "sender/video_sender_unittest.cc",
305 "test/end2end_unittest.cc",
306 "test/fake_receiver_time_offset_estimator.cc",
307 "test/fake_receiver_time_offset_estimator.h",
308 "test/utility/audio_utility_unittest.cc",
309 "test/utility/barcode_unittest.cc",
317 "//base/test:run_all_unittests",
318 "//base/test:test_support",
324 if (is_ios || is_mac) {
325 test("cast_h264_vt_encoder_unittests") {
327 "sender/h264_vt_encoder_unittest.cc",
333 "//base/test:test_support",
336 "//third_party/ffmpeg",
341 executable("generate_barcode_video") {
344 "test/utility/generate_barcode_video.cc",
354 executable("generate_timecode_audio") {
357 "test/utility/generate_timecode_audio.cc",
367 executable("udp_proxy") {
370 "test/utility/udp_proxy_main.cc",
380 if (is_linux && !is_chromeos) {
381 # TODO(GYP): Figure out which of these work and are needed on other platforms.
382 test("cast_benchmarks") {
384 "test/cast_benchmarks.cc",
385 "test/fake_single_thread_task_runner.cc",
386 "test/fake_single_thread_task_runner.h",
387 "test/utility/test_util.cc",
388 "test/utility/test_util.h",
397 "//base/test:test_support",
405 "test/utility/tap_proxy.cc",