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",
72 "net/rtcp/rtcp_defines.cc",
73 "net/rtcp/rtcp_defines.h",
76 "net/rtcp/rtcp_builder.cc",
77 "net/rtcp/rtcp_builder.h",
78 "net/rtcp/rtcp_utility.cc",
79 "net/rtcp/rtcp_utility.h",
80 "net/rtp/packet_storage.cc",
81 "net/rtp/packet_storage.h",
82 "net/rtp/rtp_packetizer.cc",
83 "net/rtp/rtp_packetizer.h",
84 "net/rtp/rtp_sender.cc",
85 "net/rtp/rtp_sender.h",
86 "net/udp_transport.cc",
87 "net/udp_transport.h",
88 "net/rtp/cast_message_builder.cc",
89 "net/rtp/cast_message_builder.h",
90 "net/rtp/frame_buffer.cc",
91 "net/rtp/frame_buffer.h",
94 "net/rtp/receiver_stats.cc",
95 "net/rtp/receiver_stats.h",
96 "net/rtp/rtp_parser.cc",
97 "net/rtp/rtp_parser.h",
98 "net/rtp/rtp_receiver_defines.cc",
99 "net/rtp/rtp_receiver_defines.h",
107 source_set("sender") {
110 "cast_sender_impl.cc",
111 "cast_sender_impl.h",
112 "sender/audio_encoder.h",
113 "sender/audio_encoder.cc",
114 "sender/audio_sender.h",
115 "sender/audio_sender.cc",
116 "sender/congestion_control.h",
117 "sender/congestion_control.cc",
118 "sender/external_video_encoder.h",
119 "sender/external_video_encoder.cc",
120 "sender/fake_software_video_encoder.h",
121 "sender/fake_software_video_encoder.cc",
122 "sender/frame_sender.cc",
123 "sender/frame_sender.h",
124 "sender/software_video_encoder.h",
125 "sender/video_encoder.h",
126 "sender/video_encoder.cc",
127 "sender/video_encoder_impl.h",
128 "sender/video_encoder_impl.cc",
129 "sender/video_frame_factory.h",
130 "sender/video_sender.h",
131 "sender/video_sender.cc",
132 "sender/vp8_encoder.cc",
133 "sender/vp8_encoder.h",
140 "//media:shared_memory_support",
141 "//third_party/libvpx",
142 "//third_party/opus",
146 # use a restricted subset of media and no software codecs on iOS
148 deps += [ "//media:media_for_cast_ios" ]
151 "//third_party/libvpx",
152 "//third_party/opus",
155 "sender/external_video_encoder.h",
156 "sender/external_video_encoder.cc",
157 "sender/video_encoder_impl.h",
158 "sender/video_encoder_impl.cc",
159 "sender/vp8_encoder.cc",
160 "sender/vp8_encoder.h",
164 # iOS and OS X encoders
165 if (is_ios || is_mac) {
167 "sender/h264_vt_encoder.cc",
168 "sender/h264_vt_encoder.h",
173 source_set("receiver") {
176 "receiver/audio_decoder.cc",
177 "receiver/audio_decoder.h",
178 "receiver/cast_receiver_impl.cc",
179 "receiver/cast_receiver_impl.h",
180 "receiver/frame_receiver.cc",
181 "receiver/frame_receiver.h",
182 "receiver/video_decoder.cc",
183 "receiver/video_decoder.h",
190 "//media:shared_memory_support",
191 "//third_party/libvpx",
192 "//third_party/opus",
196 # use a restricted subset of media and no software codecs on iOS
198 deps += [ "//media:media_for_cast_ios" ]
201 "//third_party/libvpx",
202 "//third_party/opus",
207 static_library("test_support") {
210 # TODO(hclam): FFmpeg.
211 # "test/fake_media_source.cc",
212 # "test/fake_media_source.h",
213 "test/fake_single_thread_task_runner.cc",
214 "test/fake_single_thread_task_runner.h",
215 "test/skewed_single_thread_task_runner.cc",
216 "test/skewed_single_thread_task_runner.h",
217 "test/skewed_tick_clock.cc",
218 "test/skewed_tick_clock.h",
219 "test/loopback_transport.cc",
220 "test/loopback_transport.h",
221 "test/utility/audio_utility.cc",
222 "test/utility/audio_utility.h",
223 "test/utility/barcode.cc",
224 "test/utility/barcode.h",
225 "test/utility/default_config.cc",
226 "test/utility/default_config.h",
227 "test/utility/in_process_receiver.cc",
228 "test/utility/in_process_receiver.h",
229 "test/utility/input_builder.cc",
230 "test/utility/input_builder.h",
231 "test/utility/net_utility.cc",
232 "test/utility/net_utility.h",
233 "test/utility/standalone_cast_environment.cc",
234 "test/utility/standalone_cast_environment.h",
235 "test/utility/video_utility.cc",
236 "test/utility/video_utility.h",
237 "test/utility/udp_proxy.cc",
238 "test/utility/udp_proxy.h",
244 "//base/test:test_support",
247 # TODO(hclam): Does not build on ARM yet.
248 # "//third_party/ffmpeg",
249 "//third_party/libyuv",
250 "//third_party/mt19937ar",
256 test("cast_unittests") {
258 "logging/encoding_event_subscriber_unittest.cc",
259 "logging/serialize_deserialize_test.cc",
260 "logging/logging_impl_unittest.cc",
261 "logging/logging_raw_unittest.cc",
262 "logging/receiver_time_offset_estimator_impl_unittest.cc",
263 "logging/simple_event_subscriber_unittest.cc",
264 "logging/stats_event_subscriber_unittest.cc",
265 "net/cast_transport_sender_impl_unittest.cc",
266 "net/mock_cast_transport_sender.cc",
267 "net/mock_cast_transport_sender.h",
268 "net/pacing/mock_paced_packet_sender.cc",
269 "net/pacing/mock_paced_packet_sender.h",
270 "net/pacing/paced_sender_unittest.cc",
271 "net/rtcp/rtcp_builder_unittest.cc",
272 "net/rtcp/rtcp_unittest.cc",
273 "net/rtcp/rtcp_utility_unittest.cc",
274 "net/rtcp/receiver_rtcp_event_subscriber_unittest.cc",
276 # TODO(miu): The following two are test utility modules. Rename/move the files.
277 "net/rtcp/test_rtcp_packet_builder.cc",
278 "net/rtcp/test_rtcp_packet_builder.h",
279 "net/rtp/cast_message_builder_unittest.cc",
280 "net/rtp/frame_buffer_unittest.cc",
281 "net/rtp/framer_unittest.cc",
282 "net/rtp/mock_rtp_payload_feedback.cc",
283 "net/rtp/mock_rtp_payload_feedback.h",
284 "net/rtp/packet_storage_unittest.cc",
285 "net/rtp/receiver_stats_unittest.cc",
286 "net/rtp/rtp_header_parser.cc",
287 "net/rtp/rtp_header_parser.h",
288 "net/rtp/rtp_packet_builder.cc",
289 "net/rtp/rtp_parser_unittest.cc",
290 "net/rtp/rtp_packetizer_unittest.cc",
291 "net/rtp/rtp_receiver_defines.h",
292 "net/udp_transport_unittest.cc",
293 "receiver/audio_decoder_unittest.cc",
294 "receiver/frame_receiver_unittest.cc",
295 "receiver/video_decoder_unittest.cc",
296 "sender/audio_encoder_unittest.cc",
297 "sender/audio_sender_unittest.cc",
298 "sender/congestion_control_unittest.cc",
299 "sender/external_video_encoder_unittest.cc",
300 "sender/fake_video_encode_accelerator_factory.cc",
301 "sender/fake_video_encode_accelerator_factory.h",
302 "sender/video_encoder_impl_unittest.cc",
303 "sender/video_sender_unittest.cc",
304 "test/end2end_unittest.cc",
305 "test/fake_receiver_time_offset_estimator.cc",
306 "test/fake_receiver_time_offset_estimator.h",
307 "test/utility/audio_utility_unittest.cc",
308 "test/utility/barcode_unittest.cc",
316 "//base/test:run_all_unittests",
317 "//base/test:test_support",
323 if (is_ios || is_mac) {
324 test("cast_h264_vt_encoder_unittests") {
326 "sender/h264_vt_encoder_unittest.cc",
332 "//base/test:test_support",
335 "//third_party/ffmpeg",
340 executable("generate_barcode_video") {
343 "test/utility/generate_barcode_video.cc",
353 executable("generate_timecode_audio") {
356 "test/utility/generate_timecode_audio.cc",
366 executable("udp_proxy") {
369 "test/utility/udp_proxy_main.cc",