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",
145 # use a restricted subset of media and no software codecs on iOS
147 deps += [ "//media:media_for_cast_ios" ]
150 "//third_party/libvpx",
151 "//third_party/opus",
154 "sender/external_video_encoder.h",
155 "sender/external_video_encoder.cc",
156 "sender/video_encoder_impl.h",
157 "sender/video_encoder_impl.cc",
158 "sender/vp8_encoder.cc",
159 "sender/vp8_encoder.h",
163 # iOS and OS X encoders
164 if (is_ios || is_mac) {
166 "sender/h264_vt_encoder.cc",
167 "sender/h264_vt_encoder.h",
172 source_set("receiver") {
175 "receiver/audio_decoder.cc",
176 "receiver/audio_decoder.h",
177 "receiver/cast_receiver_impl.cc",
178 "receiver/cast_receiver_impl.h",
179 "receiver/frame_receiver.cc",
180 "receiver/frame_receiver.h",
181 "receiver/video_decoder.cc",
182 "receiver/video_decoder.h",
189 "//media:shared_memory_support",
190 "//third_party/libvpx",
191 "//third_party/opus",
195 # use a restricted subset of media and no software codecs on iOS
197 deps += [ "//media:media_for_cast_ios" ]
200 "//third_party/libvpx",
201 "//third_party/opus",
206 static_library("test_support") {
209 # TODO(hclam): FFmpeg.
210 # "test/fake_media_source.cc",
211 # "test/fake_media_source.h",
212 "test/fake_single_thread_task_runner.cc",
213 "test/fake_single_thread_task_runner.h",
214 "test/skewed_single_thread_task_runner.cc",
215 "test/skewed_single_thread_task_runner.h",
216 "test/skewed_tick_clock.cc",
217 "test/skewed_tick_clock.h",
218 "test/loopback_transport.cc",
219 "test/loopback_transport.h",
220 "test/utility/audio_utility.cc",
221 "test/utility/audio_utility.h",
222 "test/utility/barcode.cc",
223 "test/utility/barcode.h",
224 "test/utility/default_config.cc",
225 "test/utility/default_config.h",
226 "test/utility/in_process_receiver.cc",
227 "test/utility/in_process_receiver.h",
228 "test/utility/input_builder.cc",
229 "test/utility/input_builder.h",
230 "test/utility/net_utility.cc",
231 "test/utility/net_utility.h",
232 "test/utility/standalone_cast_environment.cc",
233 "test/utility/standalone_cast_environment.h",
234 "test/utility/video_utility.cc",
235 "test/utility/video_utility.h",
236 "test/utility/udp_proxy.cc",
237 "test/utility/udp_proxy.h",
243 "//base/test:test_support",
246 # TODO(hclam): Does not build on ARM yet.
247 # "//third_party/ffmpeg",
248 "//third_party/libyuv",
249 "//third_party/mt19937ar",
255 test("cast_unittests") {
257 "logging/encoding_event_subscriber_unittest.cc",
258 "logging/serialize_deserialize_test.cc",
259 "logging/logging_impl_unittest.cc",
260 "logging/logging_raw_unittest.cc",
261 "logging/receiver_time_offset_estimator_impl_unittest.cc",
262 "logging/simple_event_subscriber_unittest.cc",
263 "logging/stats_event_subscriber_unittest.cc",
264 "net/cast_transport_sender_impl_unittest.cc",
265 "net/mock_cast_transport_sender.cc",
266 "net/mock_cast_transport_sender.h",
267 "net/pacing/mock_paced_packet_sender.cc",
268 "net/pacing/mock_paced_packet_sender.h",
269 "net/pacing/paced_sender_unittest.cc",
270 "net/rtcp/rtcp_builder_unittest.cc",
271 "net/rtcp/rtcp_unittest.cc",
272 "net/rtcp/rtcp_utility_unittest.cc",
273 "net/rtcp/receiver_rtcp_event_subscriber_unittest.cc",
275 # TODO(miu): The following two are test utility modules. Rename/move the files.
276 "net/rtcp/test_rtcp_packet_builder.cc",
277 "net/rtcp/test_rtcp_packet_builder.h",
278 "net/rtp/cast_message_builder_unittest.cc",
279 "net/rtp/frame_buffer_unittest.cc",
280 "net/rtp/framer_unittest.cc",
281 "net/rtp/mock_rtp_payload_feedback.cc",
282 "net/rtp/mock_rtp_payload_feedback.h",
283 "net/rtp/packet_storage_unittest.cc",
284 "net/rtp/receiver_stats_unittest.cc",
285 "net/rtp/rtp_header_parser.cc",
286 "net/rtp/rtp_header_parser.h",
287 "net/rtp/rtp_packet_builder.cc",
288 "net/rtp/rtp_parser_unittest.cc",
289 "net/rtp/rtp_packetizer_unittest.cc",
290 "net/rtp/rtp_receiver_defines.h",
291 "net/udp_transport_unittest.cc",
292 "receiver/audio_decoder_unittest.cc",
293 "receiver/frame_receiver_unittest.cc",
294 "receiver/video_decoder_unittest.cc",
295 "sender/audio_encoder_unittest.cc",
296 "sender/audio_sender_unittest.cc",
297 "sender/congestion_control_unittest.cc",
298 "sender/external_video_encoder_unittest.cc",
299 "sender/video_encoder_impl_unittest.cc",
300 "sender/video_sender_unittest.cc",
301 "test/end2end_unittest.cc",
302 "test/fake_receiver_time_offset_estimator.cc",
303 "test/fake_receiver_time_offset_estimator.h",
304 "test/fake_video_encode_accelerator.cc",
305 "test/fake_video_encode_accelerator.h",
306 "test/utility/audio_utility_unittest.cc",
307 "test/utility/barcode_unittest.cc",
315 "//base/test:run_all_unittests",
316 "//base/test:test_support",
322 if (is_ios || is_mac) {
323 test("cast_h264_vt_encoder_unittests") {
325 "sender/h264_vt_encoder_unittest.cc",
331 "//base/test:test_support",
334 "//third_party/ffmpeg",
339 executable("generate_barcode_video") {
342 "test/utility/generate_barcode_video.cc",
352 executable("generate_timecode_audio") {
355 "test/utility/generate_timecode_audio.cc",
365 executable("udp_proxy") {
368 "test/utility/udp_proxy_main.cc",