[SyncFS] Initialize SyncWorker when sync is enabled.
[chromium-blink-merge.git] / media / cast / BUILD.gn
blobe7a78e3c942c41d6039ebc6d4d61f675eb95e322
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 component("cast") {
6   deps = [
7     ":sender",
8     ":receiver",
9   ]
12 # Common code shared by all cast components.
13 source_set("common") {
14   sources = [
15     "cast_config.cc",
16     "cast_config.h",
17     "cast_defines.h",
18     "cast_environment.cc",
19     "cast_environment.h",
20     "common/clock_drift_smoother.cc",
21     "common/clock_drift_smoother.h",
22     "common/transport_encryption_handler.cc",
23     "common/transport_encryption_handler.h",
24     "logging/encoding_event_subscriber.cc",
25     "logging/encoding_event_subscriber.h",
26     "logging/log_deserializer.cc",
27     "logging/log_deserializer.h",
28     "logging/log_serializer.cc",
29     "logging/log_serializer.h",
30     "logging/logging_defines.cc",
31     "logging/logging_defines.h",
32     "logging/logging_impl.cc",
33     "logging/logging_impl.h",
34     "logging/logging_raw.cc",
35     "logging/logging_raw.h",
36     "logging/raw_event_subscriber.h",
37     "logging/raw_event_subscriber_bundle.cc",
38     "logging/raw_event_subscriber_bundle.h",
39     "logging/receiver_time_offset_estimator.h",
40     "logging/receiver_time_offset_estimator_impl.cc",
41     "logging/receiver_time_offset_estimator_impl.h",
42     "logging/simple_event_subscriber.cc",
43     "logging/simple_event_subscriber.h",
44     "logging/stats_event_subscriber.cc",
45     "logging/stats_event_subscriber.h",
46   ]
48   deps = [
49     "//base",
50     "//crypto",
51     "//media/cast/logging/proto",
52     "//net",
53   ]
55   forward_dependent_configs_from = [
56     "//media/cast/logging/proto",
57   ]
60 source_set("net") {
61   sources = [
62     "net/cast_transport_config.cc",
63     "net/cast_transport_config.h",
64     "net/cast_transport_defines.h",
65     "net/cast_transport_sender.h",
66     "net/cast_transport_sender_impl.cc",
67     "net/cast_transport_sender_impl.h",
68     "net/pacing/paced_sender.cc",
69     "net/pacing/paced_sender.h",
70     "net/rtcp/receiver_rtcp_event_subscriber.cc",
71     "net/rtcp/rtcp_defines.cc",
72     "net/rtcp/rtcp_defines.h",
73     "net/rtcp/rtcp.h",
74     "net/rtcp/rtcp.cc",
75     "net/rtcp/rtcp_sender.cc",
76     "net/rtcp/rtcp_sender.h",
77     "net/rtcp/rtcp_utility.cc",
78     "net/rtcp/rtcp_utility.h",
79     "net/rtp/packet_storage.cc",
80     "net/rtp/packet_storage.h",
81     "net/rtp/rtp_packetizer.cc",
82     "net/rtp/rtp_packetizer.h",
83     "net/rtp/rtp_sender.cc",
84     "net/rtp/rtp_sender.h",
85     "net/udp_transport.cc",
86     "net/udp_transport.h",
87     "net/rtp/cast_message_builder.cc",
88     "net/rtp/cast_message_builder.h",
89     "net/rtp/frame_buffer.cc",
90     "net/rtp/frame_buffer.h",
91     "net/rtp/frame_id_map.cc",
92     "net/rtp/frame_id_map.h",
93     "net/rtp/framer.cc",
94     "net/rtp/framer.h",
95     "net/rtp/receiver_stats.cc",
96     "net/rtp/receiver_stats.h",
97     "net/rtp/rtp_parser.cc",
98     "net/rtp/rtp_parser.h",
99     "net/rtp/rtp_receiver_defines.cc",
100     "net/rtp/rtp_receiver_defines.h",
101   ]
103   deps = [
104     ":common",
105   ]
108 source_set("sender") {
109   sources = [
110     "cast_sender.h",
111     "cast_sender_impl.cc",
112     "cast_sender_impl.h",
113     "sender/audio_encoder.h",
114     "sender/audio_encoder.cc",
115     "sender/audio_sender.h",
116     "sender/audio_sender.cc",
117     "sender/congestion_control.h",
118     "sender/congestion_control.cc",
119     "sender/external_video_encoder.h",
120     "sender/external_video_encoder.cc",
121     "sender/fake_software_video_encoder.h",
122     "sender/fake_software_video_encoder.cc",
123     "sender/frame_sender.cc",
124     "sender/frame_sender.h",
125     "sender/software_video_encoder.h",
126     "sender/video_encoder.h",
127     "sender/video_encoder_impl.h",
128     "sender/video_encoder_impl.cc",
129     "sender/video_sender.h",
130     "sender/video_sender.cc",
131 #    "sender/vp8_encoder.cc",
132 #    "sender/vp8_encoder.h",
133   ]
135   deps = [
136     ":common",
137     ":net",
138     "//media",
139     "//media:shared_memory_support",
140     "//third_party/opus",
141 # TODO(hclam): libvpx support.
142 #    "//third_party/libvpx",
143   ]
146 source_set("receiver") {
147   sources = [
148     "cast_receiver.h",
149     "receiver/audio_decoder.cc",
150     "receiver/audio_decoder.h",
151 # TODO(hclam): Libvpx support.
152 #    "receiver/cast_receiver_impl.cc",
153 #    "receiver/cast_receiver_impl.h",
154     "receiver/frame_receiver.cc",
155     "receiver/frame_receiver.h",
156 # TODO(hclam): Need libvpx support.
157 #    "receiver/video_decoder.cc",
158 #    "receiver/video_decoder.h",
159   ]
161   deps = [
162     ":common",
163     ":net",
164     "//media",
165     "//media:shared_memory_support",
166     "//third_party/opus",
167 # TODO(hclam): libvpx support.
168 #    "//third_party/libvpx",
169     "//ui/gfx",
170   ]
173 source_set("test_support") {
174   sources = [
175 # TODO(hclam): FFmpeg.
176 #    "test/fake_media_source.cc",
177 #    "test/fake_media_source.h",
178     "test/fake_single_thread_task_runner.cc",
179     "test/fake_single_thread_task_runner.h",
180     "test/skewed_single_thread_task_runner.cc",
181     "test/skewed_single_thread_task_runner.h",
182     "test/skewed_tick_clock.cc",
183     "test/skewed_tick_clock.h",
184     "test/loopback_transport.cc",
185     "test/loopback_transport.h",
186     "test/utility/audio_utility.cc",
187     "test/utility/audio_utility.h",
188     "test/utility/barcode.cc",
189     "test/utility/barcode.h",
190     "test/utility/default_config.cc",
191     "test/utility/default_config.h",
192 # TODO(hclam): libvpx support.
193 #    "test/utility/in_process_receiver.cc",
194 #    "test/utility/in_process_receiver.h",
195     "test/utility/input_builder.cc",
196     "test/utility/input_builder.h",
197     "test/utility/net_utility.cc",
198     "test/utility/net_utility.h",
199     "test/utility/standalone_cast_environment.cc",
200     "test/utility/standalone_cast_environment.h",
201     "test/utility/video_utility.cc",
202     "test/utility/video_utility.h",
203     "test/utility/udp_proxy.cc",
204     "test/utility/udp_proxy.h",
205   ]
207   deps = [
208     ":net",
209     ":receiver",
210     "//base/test:test_support",
211     "//testing/gtest",
212 # TODO(hclam): Does not build on ARM yet.
213 #    "//third_party/ffmpeg",
214     "//third_party/libyuv",
215     "//third_party/mt19937ar",
216     "//ui/gfx",
217     "//ui/gfx/geometry",
218   ]
221 test("cast_unittests") {
222   sources = [
223     "logging/encoding_event_subscriber_unittest.cc",
224     "logging/serialize_deserialize_test.cc",
225     "logging/logging_impl_unittest.cc",
226     "logging/logging_raw_unittest.cc",
227     "logging/receiver_time_offset_estimator_impl_unittest.cc",
228     "logging/simple_event_subscriber_unittest.cc",
229     "logging/stats_event_subscriber_unittest.cc",
230     "net/cast_transport_sender_impl_unittest.cc",
231     "net/pacing/mock_paced_packet_sender.cc",
232     "net/pacing/mock_paced_packet_sender.h",
233     "net/pacing/paced_sender_unittest.cc",
234     "net/rtcp/rtcp_sender_unittest.cc",
235     "net/rtcp/rtcp_unittest.cc",
236     "net/rtcp/rtcp_utility_unittest.cc",
237     "net/rtcp/receiver_rtcp_event_subscriber_unittest.cc",
238 # TODO(miu): The following two are test utility modules.  Rename/move the files.
239     "net/rtcp/test_rtcp_packet_builder.cc",
240     "net/rtcp/test_rtcp_packet_builder.h",
241     "net/rtp/cast_message_builder_unittest.cc",
242     "net/rtp/frame_buffer_unittest.cc",
243     "net/rtp/framer_unittest.cc",
244     "net/rtp/mock_rtp_payload_feedback.cc",
245     "net/rtp/mock_rtp_payload_feedback.h",
246     "net/rtp/packet_storage_unittest.cc",
247     "net/rtp/receiver_stats_unittest.cc",
248     "net/rtp/rtp_header_parser.cc",
249     "net/rtp/rtp_header_parser.h",
250     "net/rtp/rtp_packet_builder.cc",
251     "net/rtp/rtp_parser_unittest.cc",
252     "net/rtp/rtp_packetizer_unittest.cc",
253     "net/rtp/rtp_receiver_defines.h",
254     "net/udp_transport_unittest.cc",
255     "receiver/audio_decoder_unittest.cc",
256     "receiver/frame_receiver_unittest.cc",
257 # TODO(hclam): libvpx support.
258 #    "receiver/video_decoder_unittest.cc",
259     "sender/audio_encoder_unittest.cc",
260     "sender/audio_sender_unittest.cc",
261     "sender/congestion_control_unittest.cc",
262     "sender/external_video_encoder_unittest.cc",
263 # TODO(hclam): libvpx support.
264 #    "sender/video_encoder_impl_unittest.cc",
265 #    "sender/video_sender_unittest.cc",
266 #    "test/end2end_unittest.cc",
267     "test/fake_receiver_time_offset_estimator.cc",
268     "test/fake_receiver_time_offset_estimator.h",
269     "test/fake_video_encode_accelerator.cc",
270     "test/fake_video_encode_accelerator.h",
271     "test/utility/audio_utility_unittest.cc",
272     "test/utility/barcode_unittest.cc",
273   ]
275   deps = [
276     ":common",
277     ":receiver",
278     ":sender",
279     ":test_support",
280     "//base/test:run_all_unittests",
281     "//base/test:test_support",
282     "//testing/gmock",
283     "//testing/gtest",
284   ]
287 executable("generate_barcode_video") {
288   sources = [
289     "test/utility/generate_barcode_video.cc",
290   ]
292   deps = [
293     ":test_support",
294     "//base",
295     "//media",
296   ]
299 executable("generate_timecode_audio") {
300   sources = [
301     "test/utility/generate_timecode_audio.cc",
302   ]
304   deps = [
305     ":test_support",
306     "//base",
307     "//media",
308   ]
311 executable("udp_proxy") {
312   sources = [
313     "test/utility/udp_proxy_main.cc",
314   ]
316   deps = [
317     ":test_support",
318     "//base",
319     "//net",
320   ]