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/performance_metrics_overlay.cc",
125 "sender/performance_metrics_overlay.h",
126 "sender/sender_encoded_frame.cc",
127 "sender/sender_encoded_frame.h",
128 "sender/size_adaptable_video_encoder_base.cc",
129 "sender/size_adaptable_video_encoder_base.h",
130 "sender/software_video_encoder.h",
131 "sender/video_encoder.cc",
132 "sender/video_encoder.h",
133 "sender/video_encoder_impl.cc",
134 "sender/video_encoder_impl.h",
135 "sender/video_frame_factory.h",
136 "sender/video_sender.cc",
137 "sender/video_sender.h",
138 "sender/vp8_encoder.cc",
139 "sender/vp8_encoder.h",
146 "//media:shared_memory_support",
147 "//third_party/libvpx",
148 "//third_party/opus",
152 # use a restricted subset of media and no software codecs on iOS
154 deps += [ "//media:media_for_cast_ios" ]
157 "//third_party/libvpx",
158 "//third_party/opus",
161 "sender/external_video_encoder.cc",
162 "sender/external_video_encoder.h",
163 "sender/video_encoder_impl.cc",
164 "sender/video_encoder_impl.h",
165 "sender/vp8_encoder.cc",
166 "sender/vp8_encoder.h",
172 # iOS and OS X encoders
173 if (is_ios || is_mac) {
175 "sender/h264_vt_encoder.cc",
176 "sender/h264_vt_encoder.h",
180 "AudioToolbox.framework",
181 "CoreVideo.framework",
186 source_set("receiver") {
189 "receiver/audio_decoder.cc",
190 "receiver/audio_decoder.h",
191 "receiver/cast_receiver_impl.cc",
192 "receiver/cast_receiver_impl.h",
193 "receiver/frame_receiver.cc",
194 "receiver/frame_receiver.h",
195 "receiver/video_decoder.cc",
196 "receiver/video_decoder.h",
203 "//media:shared_memory_support",
204 "//third_party/libvpx",
205 "//third_party/opus",
209 # use a restricted subset of media and no software codecs on iOS
211 deps += [ "//media:media_for_cast_ios" ]
214 "//third_party/libvpx",
215 "//third_party/opus",
220 static_library("test_support") {
223 # TODO(hclam): FFmpeg.
224 # "test/fake_media_source.cc",
225 # "test/fake_media_source.h",
226 "test/fake_single_thread_task_runner.cc",
227 "test/fake_single_thread_task_runner.h",
228 "test/loopback_transport.cc",
229 "test/loopback_transport.h",
230 "test/skewed_single_thread_task_runner.cc",
231 "test/skewed_single_thread_task_runner.h",
232 "test/skewed_tick_clock.cc",
233 "test/skewed_tick_clock.h",
234 "test/utility/audio_utility.cc",
235 "test/utility/audio_utility.h",
236 "test/utility/barcode.cc",
237 "test/utility/barcode.h",
238 "test/utility/default_config.cc",
239 "test/utility/default_config.h",
240 "test/utility/in_process_receiver.cc",
241 "test/utility/in_process_receiver.h",
242 "test/utility/input_builder.cc",
243 "test/utility/input_builder.h",
244 "test/utility/net_utility.cc",
245 "test/utility/net_utility.h",
246 "test/utility/standalone_cast_environment.cc",
247 "test/utility/standalone_cast_environment.h",
248 "test/utility/udp_proxy.cc",
249 "test/utility/udp_proxy.h",
250 "test/utility/video_utility.cc",
251 "test/utility/video_utility.h",
257 "//base/test:test_support",
260 # TODO(hclam): Does not build on ARM yet.
261 # "//third_party/ffmpeg",
262 "//third_party/libyuv",
263 "//third_party/mt19937ar",
269 # TODO(GYP): Delete this after we've converted everything to GN.
270 # The _run targets exist only for compatibility w/ GYP.
271 group("cast_unittests_run") {
278 test("cast_unittests") {
280 "logging/encoding_event_subscriber_unittest.cc",
281 "logging/logging_impl_unittest.cc",
282 "logging/logging_raw_unittest.cc",
283 "logging/receiver_time_offset_estimator_impl_unittest.cc",
284 "logging/serialize_deserialize_test.cc",
285 "logging/simple_event_subscriber_unittest.cc",
286 "logging/stats_event_subscriber_unittest.cc",
287 "net/cast_transport_sender_impl_unittest.cc",
288 "net/mock_cast_transport_sender.cc",
289 "net/mock_cast_transport_sender.h",
290 "net/pacing/mock_paced_packet_sender.cc",
291 "net/pacing/mock_paced_packet_sender.h",
292 "net/pacing/paced_sender_unittest.cc",
293 "net/rtcp/receiver_rtcp_event_subscriber_unittest.cc",
294 "net/rtcp/rtcp_builder_unittest.cc",
295 "net/rtcp/rtcp_unittest.cc",
296 "net/rtcp/rtcp_utility_unittest.cc",
298 # TODO(miu): The following two are test utility modules. Rename/move the files.
299 "net/rtcp/test_rtcp_packet_builder.cc",
300 "net/rtcp/test_rtcp_packet_builder.h",
301 "net/rtp/cast_message_builder_unittest.cc",
302 "net/rtp/frame_buffer_unittest.cc",
303 "net/rtp/framer_unittest.cc",
304 "net/rtp/mock_rtp_payload_feedback.cc",
305 "net/rtp/mock_rtp_payload_feedback.h",
306 "net/rtp/packet_storage_unittest.cc",
307 "net/rtp/receiver_stats_unittest.cc",
308 "net/rtp/rtp_header_parser.cc",
309 "net/rtp/rtp_header_parser.h",
310 "net/rtp/rtp_packet_builder.cc",
311 "net/rtp/rtp_packetizer_unittest.cc",
312 "net/rtp/rtp_parser_unittest.cc",
313 "net/rtp/rtp_receiver_defines.h",
314 "net/udp_transport_unittest.cc",
315 "receiver/audio_decoder_unittest.cc",
316 "receiver/frame_receiver_unittest.cc",
317 "receiver/video_decoder_unittest.cc",
318 "sender/audio_encoder_unittest.cc",
319 "sender/audio_sender_unittest.cc",
320 "sender/congestion_control_unittest.cc",
321 "sender/fake_video_encode_accelerator_factory.cc",
322 "sender/fake_video_encode_accelerator_factory.h",
323 "sender/video_encoder_unittest.cc",
324 "sender/video_sender_unittest.cc",
325 "test/end2end_unittest.cc",
326 "test/fake_receiver_time_offset_estimator.cc",
327 "test/fake_receiver_time_offset_estimator.h",
328 "test/utility/audio_utility_unittest.cc",
329 "test/utility/barcode_unittest.cc",
337 "//base/test:run_all_unittests",
338 "//base/test:test_support",
344 if (is_ios || is_mac) {
345 test("cast_h264_vt_encoder_unittests") {
347 "sender/h264_vt_encoder_unittest.cc",
353 "//base/test:test_support",
356 "//third_party/ffmpeg",
361 executable("generate_barcode_video") {
364 "test/utility/generate_barcode_video.cc",
374 executable("generate_timecode_audio") {
377 "test/utility/generate_timecode_audio.cc",
387 executable("udp_proxy") {
390 "test/utility/udp_proxy_main.cc",
400 if (is_linux && !is_chromeos) {
401 # TODO(GYP): Figure out which of these work and are needed on other platforms.
402 test("cast_benchmarks") {
404 "test/cast_benchmarks.cc",
405 "test/fake_single_thread_task_runner.cc",
406 "test/fake_single_thread_task_runner.h",
407 "test/utility/test_util.cc",
408 "test/utility/test_util.h",
417 "//base/test:test_support",
425 "test/utility/tap_proxy.cc",