blob: a9e257ef6aa2c0ffabde264134266059ddbb2017 [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("rtp_rtcp") {
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000012 sources = [
brandtra8b38552016-10-10 16:44:57 -070013 "include/flexfec_receiver.h",
brandtrc295e002016-11-03 09:22:33 -070014 "include/flexfec_sender.h",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010015 "include/receive_statistics.h",
16 "include/remote_ntp_time_estimator.h",
danilchap2d9d21f2017-05-10 08:41:13 -070017 "include/rtp_cvo.h",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010018 "include/rtp_header_parser.h",
19 "include/rtp_payload_registry.h",
20 "include/rtp_receiver.h",
21 "include/rtp_rtcp.h",
22 "include/rtp_rtcp_defines.h",
brandtrd55c3f62016-10-31 04:51:33 -070023 "include/ulpfec_receiver.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000024 "source/byte_io.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020025 "source/dtmf_queue.cc",
26 "source/dtmf_queue.h",
27 "source/fec_private_tables_bursty.h",
28 "source/fec_private_tables_random.h",
brandtr0496de22016-10-03 00:43:25 -070029 "source/flexfec_header_reader_writer.cc",
30 "source/flexfec_header_reader_writer.h",
brandtr0a4c1612016-11-03 08:18:27 -070031 "source/flexfec_receiver.cc",
brandtrc295e002016-11-03 09:22:33 -070032 "source/flexfec_sender.cc",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020033 "source/forward_error_correction.cc",
34 "source/forward_error_correction.h",
35 "source/forward_error_correction_internal.cc",
36 "source/forward_error_correction_internal.h",
bcornell30409b42015-07-10 18:10:05 -070037 "source/packet_loss_stats.cc",
38 "source/packet_loss_stats.h",
isheriff6b4b5f32016-06-08 00:24:21 -070039 "source/playout_delay_oracle.cc",
40 "source/playout_delay_oracle.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000041 "source/receive_statistics_impl.cc",
42 "source/receive_statistics_impl.h",
43 "source/remote_ntp_time_estimator.cc",
danilchap84432382017-02-09 05:21:42 -080044 "source/rtcp_nack_stats.cc",
45 "source/rtcp_nack_stats.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000046 "source/rtcp_packet.cc",
47 "source/rtcp_packet.h",
danilchap0219c9b2015-11-18 05:56:53 -080048 "source/rtcp_packet/app.cc",
49 "source/rtcp_packet/app.h",
danilchap50c51362015-11-22 09:03:11 -080050 "source/rtcp_packet/bye.cc",
51 "source/rtcp_packet/bye.h",
Danil Chapovalov7021b922016-03-15 17:39:32 +010052 "source/rtcp_packet/common_header.cc",
53 "source/rtcp_packet/common_header.h",
danilchap2f7dea12016-01-13 02:03:04 -080054 "source/rtcp_packet/compound_packet.cc",
55 "source/rtcp_packet/compound_packet.h",
danilchap54999d42015-12-16 01:56:20 -080056 "source/rtcp_packet/dlrr.cc",
57 "source/rtcp_packet/dlrr.h",
danilchapf8506cb2015-11-13 07:33:20 -080058 "source/rtcp_packet/extended_jitter_report.cc",
59 "source/rtcp_packet/extended_jitter_report.h",
Danil Chapovalov256e5b22016-01-15 14:16:24 +010060 "source/rtcp_packet/extended_reports.cc",
61 "source/rtcp_packet/extended_reports.h",
Danil Chapovalov5679da12016-01-15 13:19:53 +010062 "source/rtcp_packet/fir.cc",
63 "source/rtcp_packet/fir.h",
danilchapa8890a52015-12-22 03:43:04 -080064 "source/rtcp_packet/nack.cc",
65 "source/rtcp_packet/nack.h",
danilchapf8385ad2015-11-27 05:36:09 -080066 "source/rtcp_packet/pli.cc",
67 "source/rtcp_packet/pli.h",
68 "source/rtcp_packet/psfb.cc",
69 "source/rtcp_packet/psfb.h",
danilchap09fef9e2016-02-09 05:57:51 -080070 "source/rtcp_packet/rapid_resync_request.cc",
71 "source/rtcp_packet/rapid_resync_request.h",
Danil Chapovalov97f7e132015-12-04 16:13:30 +010072 "source/rtcp_packet/receiver_report.cc",
73 "source/rtcp_packet/receiver_report.h",
Danil Chapovalova5eba6c2016-01-15 12:40:15 +010074 "source/rtcp_packet/remb.cc",
75 "source/rtcp_packet/remb.h",
danilchapdf948f02015-11-13 03:03:13 -080076 "source/rtcp_packet/report_block.cc",
77 "source/rtcp_packet/report_block.h",
Danil Chapovalovfc47ed62015-12-07 14:46:35 +010078 "source/rtcp_packet/rrtr.cc",
79 "source/rtcp_packet/rrtr.h",
danilchapa8890a52015-12-22 03:43:04 -080080 "source/rtcp_packet/rtpfb.cc",
81 "source/rtcp_packet/rtpfb.h",
Danil Chapovalov1567d0b2016-01-15 17:34:27 +010082 "source/rtcp_packet/sdes.cc",
83 "source/rtcp_packet/sdes.h",
danilchap34ed2b92016-01-18 02:43:32 -080084 "source/rtcp_packet/sender_report.cc",
85 "source/rtcp_packet/sender_report.h",
sprangb84ad632016-11-01 02:50:12 -070086 "source/rtcp_packet/target_bitrate.cc",
87 "source/rtcp_packet/target_bitrate.h",
danilchapa92d6be2016-02-04 07:33:39 -080088 "source/rtcp_packet/tmmb_item.cc",
89 "source/rtcp_packet/tmmb_item.h",
danilchapef3d8052016-01-11 03:31:08 -080090 "source/rtcp_packet/tmmbn.cc",
91 "source/rtcp_packet/tmmbn.h",
danilchap7e8145f2016-01-11 11:49:19 -080092 "source/rtcp_packet/tmmbr.cc",
93 "source/rtcp_packet/tmmbr.h",
Erik Språnga3b87692015-07-29 10:46:54 +020094 "source/rtcp_packet/transport_feedback.cc",
95 "source/rtcp_packet/transport_feedback.h",
danilchap91941ae2015-12-15 07:06:36 -080096 "source/rtcp_packet/voip_metric.cc",
97 "source/rtcp_packet/voip_metric.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000098 "source/rtcp_receiver.cc",
99 "source/rtcp_receiver.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000100 "source/rtcp_sender.cc",
101 "source/rtcp_sender.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200102 "source/rtp_format.cc",
103 "source/rtp_format.h",
104 "source/rtp_format_h264.cc",
105 "source/rtp_format_h264.h",
106 "source/rtp_format_video_generic.cc",
107 "source/rtp_format_video_generic.h",
108 "source/rtp_format_vp8.cc",
109 "source/rtp_format_vp8.h",
asaperssonf38ea3c2015-07-28 04:02:54 -0700110 "source/rtp_format_vp9.cc",
111 "source/rtp_format_vp9.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000112 "source/rtp_header_extension.cc",
113 "source/rtp_header_extension.h",
danilchap1edb7ab2016-04-20 05:25:10 -0700114 "source/rtp_header_extensions.cc",
115 "source/rtp_header_extensions.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200116 "source/rtp_header_parser.cc",
danilchap1edb7ab2016-04-20 05:25:10 -0700117 "source/rtp_packet.cc",
118 "source/rtp_packet.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200119 "source/rtp_packet_history.cc",
120 "source/rtp_packet_history.h",
danilchap1edb7ab2016-04-20 05:25:10 -0700121 "source/rtp_packet_received.h",
122 "source/rtp_packet_to_send.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200123 "source/rtp_payload_registry.cc",
124 "source/rtp_receiver_audio.cc",
125 "source/rtp_receiver_audio.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000126 "source/rtp_receiver_impl.cc",
127 "source/rtp_receiver_impl.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200128 "source/rtp_receiver_strategy.cc",
129 "source/rtp_receiver_strategy.h",
130 "source/rtp_receiver_video.cc",
131 "source/rtp_receiver_video.h",
132 "source/rtp_rtcp_config.h",
133 "source/rtp_rtcp_impl.cc",
134 "source/rtp_rtcp_impl.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000135 "source/rtp_sender.cc",
136 "source/rtp_sender.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200137 "source/rtp_sender_audio.cc",
138 "source/rtp_sender_audio.h",
139 "source/rtp_sender_video.cc",
140 "source/rtp_sender_video.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000141 "source/rtp_utility.cc",
142 "source/rtp_utility.h",
Danil Chapovalovc1e55c72016-03-09 15:14:35 +0100143 "source/time_util.cc",
144 "source/time_util.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000145 "source/tmmbr_help.cc",
146 "source/tmmbr_help.h",
brandtr869e7cd2016-10-31 05:27:07 -0700147 "source/ulpfec_generator.cc",
148 "source/ulpfec_generator.h",
Rasmus Brandt78db1582016-09-21 09:19:34 +0200149 "source/ulpfec_header_reader_writer.cc",
150 "source/ulpfec_header_reader_writer.h",
brandtrd55c3f62016-10-31 04:51:33 -0700151 "source/ulpfec_receiver_impl.cc",
152 "source/ulpfec_receiver_impl.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000153 "source/video_codec_information.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000154 ]
155
gaetano.carlucci52a57032016-09-14 05:04:36 -0700156 if (rtc_enable_bwe_test_logging) {
157 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
158 } else {
159 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
160 }
161
kjellandere40a7ee2016-10-16 23:56:12 -0700162 if (!build_with_chromium && is_clang) {
163 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700164 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000165 }
166
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000167 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700168 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000169 "../..:webrtc_common",
hbos8d609f62017-04-10 07:39:05 -0700170 "../../api:libjingle_peerconnection_api",
aleloia8eb7562016-11-28 07:02:13 -0800171 "../../api:transport_api",
kwiberg1c07c702017-03-27 07:15:49 -0700172 "../../api/audio_codecs:audio_codecs_api",
mbonadeiebafdc82016-12-22 07:35:39 -0800173 "../../base:gtest_prod",
174 "../../base:rtc_base_approved",
175 "../../base:rtc_task_queue",
sprang52033d62016-06-02 02:43:32 -0700176 "../../common_video",
mbonadeiebafdc82016-12-22 07:35:39 -0800177 "../../logging:rtc_event_log_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000178 "../../system_wrappers",
kwiberg1c07c702017-03-27 07:15:49 -0700179 "../audio_coding:audio_format_conversion",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000180 "../remote_bitrate_estimator",
181 ]
182
kjellander8f4419b2016-06-02 02:09:52 -0700183 # TODO(jschuh): Bug 1348: fix this warning.
184 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
185
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000186 if (is_win) {
187 cflags = [
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000188 # TODO(kjellander): Bug 261: fix this warning.
189 "/wd4373", # virtual function override.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000190 ]
191 }
192}
brandtr03bc3cf2016-08-08 08:08:53 -0700193
kjellandere0629c02017-04-25 04:04:50 -0700194rtc_source_set("fec_test_helper") {
195 testonly = true
196 sources = [
197 "source/fec_test_helper.cc",
198 "source/fec_test_helper.h",
199 ]
200 deps = [
201 ":rtp_rtcp",
mbonadei1140f972017-04-26 03:38:35 -0700202 "..:module_api",
kjellandere0629c02017-04-25 04:04:50 -0700203 "../../base:rtc_base_approved",
204 ]
205
206 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
207 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
208 if (!build_with_chromium && is_clang) {
209 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
210 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
211 }
212}
213
mbonadei3edccb92017-06-01 04:47:20 -0700214rtc_source_set("mock_rtp_rtcp") {
215 testonly = true
216 sources = [
217 "mocks/mock_recovered_packet_receiver.h",
218 "mocks/mock_rtcp_rtt_stats.h",
219 "mocks/mock_rtp_rtcp.h",
220 ]
221 deps = [
222 ":rtp_rtcp",
223 "..:module_api",
224 "../../base:rtc_base_approved",
225 "../../test:test_support",
226 ]
227}
228
brandtr03bc3cf2016-08-08 08:08:53 -0700229if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700230 rtc_executable("test_packet_masks_metrics") {
brandtr03bc3cf2016-08-08 08:08:53 -0700231 testonly = true
232
233 sources = [
234 "test/testFec/average_residual_loss_xor_codes.h",
235 "test/testFec/test_packet_masks_metrics.cc",
236 ]
237
238 deps = [
239 ":rtp_rtcp",
240 "//testing/gtest",
ehmaldonado26bddb92016-11-30 06:12:01 -0800241 "//webrtc/test:test_main",
brandtr03bc3cf2016-08-08 08:08:53 -0700242 ]
243 } # test_packet_masks_metrics
ehmaldonado36268652017-01-19 08:27:11 -0800244
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800245 rtc_source_set("rtp_rtcp_modules_tests") {
246 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700247
248 # Skip restricting visibility on mobile platforms since the tests on those
249 # gets additional generated targets which would require many lines here to
250 # cover (which would be confusing to read and hard to maintain).
251 if (!is_android && !is_ios) {
252 visibility = [ "//webrtc/modules:modules_tests" ]
253 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800254 sources = [
255 "test/testFec/test_fec.cc",
256 ]
257 deps = [
258 ":rtp_rtcp",
259 "../../base:rtc_base_approved",
260 "../../test:test_support",
261 ]
262 if (!build_with_chromium && is_clang) {
263 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
264 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
265 }
266 }
267
kjellandere0629c02017-04-25 04:04:50 -0700268 rtc_source_set("rtp_rtcp_unittests") {
269 testonly = true
270
271 # Skip restricting visibility on mobile platforms since the tests on those
272 # gets additional generated targets which would require many lines here to
273 # cover (which would be confusing to read and hard to maintain).
274 if (!is_android && !is_ios) {
275 visibility = [ "//webrtc/modules:modules_unittests" ]
276 }
277 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800278 "source/byte_io_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800279 "source/flexfec_header_reader_writer_unittest.cc",
280 "source/flexfec_receiver_unittest.cc",
281 "source/flexfec_sender_unittest.cc",
282 "source/nack_rtx_unittest.cc",
283 "source/packet_loss_stats_unittest.cc",
284 "source/playout_delay_oracle_unittest.cc",
285 "source/receive_statistics_unittest.cc",
286 "source/remote_ntp_time_estimator_unittest.cc",
danilchap84432382017-02-09 05:21:42 -0800287 "source/rtcp_nack_stats_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800288 "source/rtcp_packet/app_unittest.cc",
289 "source/rtcp_packet/bye_unittest.cc",
290 "source/rtcp_packet/common_header_unittest.cc",
291 "source/rtcp_packet/compound_packet_unittest.cc",
292 "source/rtcp_packet/dlrr_unittest.cc",
293 "source/rtcp_packet/extended_jitter_report_unittest.cc",
294 "source/rtcp_packet/extended_reports_unittest.cc",
295 "source/rtcp_packet/fir_unittest.cc",
296 "source/rtcp_packet/nack_unittest.cc",
297 "source/rtcp_packet/pli_unittest.cc",
298 "source/rtcp_packet/rapid_resync_request_unittest.cc",
299 "source/rtcp_packet/receiver_report_unittest.cc",
300 "source/rtcp_packet/remb_unittest.cc",
301 "source/rtcp_packet/report_block_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800302 "source/rtcp_packet/rrtr_unittest.cc",
303 "source/rtcp_packet/sdes_unittest.cc",
304 "source/rtcp_packet/sender_report_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800305 "source/rtcp_packet/target_bitrate_unittest.cc",
306 "source/rtcp_packet/tmmbn_unittest.cc",
307 "source/rtcp_packet/tmmbr_unittest.cc",
308 "source/rtcp_packet/transport_feedback_unittest.cc",
309 "source/rtcp_packet/voip_metric_unittest.cc",
310 "source/rtcp_packet_unittest.cc",
311 "source/rtcp_receiver_unittest.cc",
312 "source/rtcp_sender_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800313 "source/rtp_fec_unittest.cc",
314 "source/rtp_format_h264_unittest.cc",
ilnik7a3006b2017-05-23 09:34:21 -0700315 "source/rtp_format_video_generic_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800316 "source/rtp_format_vp8_test_helper.cc",
317 "source/rtp_format_vp8_test_helper.h",
318 "source/rtp_format_vp8_unittest.cc",
319 "source/rtp_format_vp9_unittest.cc",
320 "source/rtp_header_extension_unittest.cc",
321 "source/rtp_packet_history_unittest.cc",
322 "source/rtp_packet_unittest.cc",
323 "source/rtp_payload_registry_unittest.cc",
hbos8d609f62017-04-10 07:39:05 -0700324 "source/rtp_receiver_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800325 "source/rtp_rtcp_impl_unittest.cc",
326 "source/rtp_sender_unittest.cc",
327 "source/rtp_utility_unittest.cc",
328 "source/time_util_unittest.cc",
329 "source/ulpfec_generator_unittest.cc",
330 "source/ulpfec_header_reader_writer_unittest.cc",
331 "source/ulpfec_receiver_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800332 "test/testAPI/test_api.cc",
333 "test/testAPI/test_api.h",
334 "test/testAPI/test_api_audio.cc",
335 "test/testAPI/test_api_rtcp.cc",
336 "test/testAPI/test_api_video.cc",
337 ]
338 deps = [
kjellandere0629c02017-04-25 04:04:50 -0700339 ":fec_test_helper",
340 ":mock_rtp_rtcp",
ehmaldonado36268652017-01-19 08:27:11 -0800341 ":rtp_rtcp",
mbonadei1140f972017-04-26 03:38:35 -0700342 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800343 "../..:webrtc_common",
344 "../../api:transport_api",
345 "../../base:rtc_base_approved",
346 "../../common_video:common_video",
347 "../../system_wrappers:system_wrappers",
348 "../../test:field_trial",
349 "../../test:rtp_test_utils",
350 "../../test:test_common",
351 "../../test:test_support",
352 "//testing/gmock",
353 ]
354
355 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
356 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
357 if (!build_with_chromium && is_clang) {
358 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
359 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
360 }
361 }
brandtr03bc3cf2016-08-08 08:08:53 -0700362}