blob: 1048c2391477ad754d36b2887c6261dbf88e3662 [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",
Danil Chapovalov07633bd2017-06-01 17:10:51 +020018 "include/rtp_header_extension_map.h",
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010019 "include/rtp_header_parser.h",
20 "include/rtp_payload_registry.h",
21 "include/rtp_receiver.h",
22 "include/rtp_rtcp.h",
23 "include/rtp_rtcp_defines.h",
brandtrd55c3f62016-10-31 04:51:33 -070024 "include/ulpfec_receiver.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000025 "source/byte_io.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020026 "source/dtmf_queue.cc",
27 "source/dtmf_queue.h",
28 "source/fec_private_tables_bursty.h",
29 "source/fec_private_tables_random.h",
brandtr0496de22016-10-03 00:43:25 -070030 "source/flexfec_header_reader_writer.cc",
31 "source/flexfec_header_reader_writer.h",
brandtr0a4c1612016-11-03 08:18:27 -070032 "source/flexfec_receiver.cc",
brandtrc295e002016-11-03 09:22:33 -070033 "source/flexfec_sender.cc",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020034 "source/forward_error_correction.cc",
35 "source/forward_error_correction.h",
36 "source/forward_error_correction_internal.cc",
37 "source/forward_error_correction_internal.h",
bcornell30409b42015-07-10 18:10:05 -070038 "source/packet_loss_stats.cc",
39 "source/packet_loss_stats.h",
isheriff6b4b5f32016-06-08 00:24:21 -070040 "source/playout_delay_oracle.cc",
41 "source/playout_delay_oracle.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000042 "source/receive_statistics_impl.cc",
43 "source/receive_statistics_impl.h",
44 "source/remote_ntp_time_estimator.cc",
danilchap84432382017-02-09 05:21:42 -080045 "source/rtcp_nack_stats.cc",
46 "source/rtcp_nack_stats.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000047 "source/rtcp_packet.cc",
48 "source/rtcp_packet.h",
danilchap0219c9b2015-11-18 05:56:53 -080049 "source/rtcp_packet/app.cc",
50 "source/rtcp_packet/app.h",
danilchap50c51362015-11-22 09:03:11 -080051 "source/rtcp_packet/bye.cc",
52 "source/rtcp_packet/bye.h",
Danil Chapovalov7021b922016-03-15 17:39:32 +010053 "source/rtcp_packet/common_header.cc",
54 "source/rtcp_packet/common_header.h",
danilchap2f7dea12016-01-13 02:03:04 -080055 "source/rtcp_packet/compound_packet.cc",
56 "source/rtcp_packet/compound_packet.h",
danilchap54999d42015-12-16 01:56:20 -080057 "source/rtcp_packet/dlrr.cc",
58 "source/rtcp_packet/dlrr.h",
danilchapf8506cb2015-11-13 07:33:20 -080059 "source/rtcp_packet/extended_jitter_report.cc",
60 "source/rtcp_packet/extended_jitter_report.h",
Danil Chapovalov256e5b22016-01-15 14:16:24 +010061 "source/rtcp_packet/extended_reports.cc",
62 "source/rtcp_packet/extended_reports.h",
Danil Chapovalov5679da12016-01-15 13:19:53 +010063 "source/rtcp_packet/fir.cc",
64 "source/rtcp_packet/fir.h",
danilchapa8890a52015-12-22 03:43:04 -080065 "source/rtcp_packet/nack.cc",
66 "source/rtcp_packet/nack.h",
danilchapf8385ad2015-11-27 05:36:09 -080067 "source/rtcp_packet/pli.cc",
68 "source/rtcp_packet/pli.h",
69 "source/rtcp_packet/psfb.cc",
70 "source/rtcp_packet/psfb.h",
danilchap09fef9e2016-02-09 05:57:51 -080071 "source/rtcp_packet/rapid_resync_request.cc",
72 "source/rtcp_packet/rapid_resync_request.h",
Danil Chapovalov97f7e132015-12-04 16:13:30 +010073 "source/rtcp_packet/receiver_report.cc",
74 "source/rtcp_packet/receiver_report.h",
Danil Chapovalova5eba6c2016-01-15 12:40:15 +010075 "source/rtcp_packet/remb.cc",
76 "source/rtcp_packet/remb.h",
danilchapdf948f02015-11-13 03:03:13 -080077 "source/rtcp_packet/report_block.cc",
78 "source/rtcp_packet/report_block.h",
Danil Chapovalovfc47ed62015-12-07 14:46:35 +010079 "source/rtcp_packet/rrtr.cc",
80 "source/rtcp_packet/rrtr.h",
danilchapa8890a52015-12-22 03:43:04 -080081 "source/rtcp_packet/rtpfb.cc",
82 "source/rtcp_packet/rtpfb.h",
Danil Chapovalov1567d0b2016-01-15 17:34:27 +010083 "source/rtcp_packet/sdes.cc",
84 "source/rtcp_packet/sdes.h",
danilchap34ed2b92016-01-18 02:43:32 -080085 "source/rtcp_packet/sender_report.cc",
86 "source/rtcp_packet/sender_report.h",
sprangb84ad632016-11-01 02:50:12 -070087 "source/rtcp_packet/target_bitrate.cc",
88 "source/rtcp_packet/target_bitrate.h",
danilchapa92d6be2016-02-04 07:33:39 -080089 "source/rtcp_packet/tmmb_item.cc",
90 "source/rtcp_packet/tmmb_item.h",
danilchapef3d8052016-01-11 03:31:08 -080091 "source/rtcp_packet/tmmbn.cc",
92 "source/rtcp_packet/tmmbn.h",
danilchap7e8145f2016-01-11 11:49:19 -080093 "source/rtcp_packet/tmmbr.cc",
94 "source/rtcp_packet/tmmbr.h",
Erik Språnga3b87692015-07-29 10:46:54 +020095 "source/rtcp_packet/transport_feedback.cc",
96 "source/rtcp_packet/transport_feedback.h",
danilchap91941ae2015-12-15 07:06:36 -080097 "source/rtcp_packet/voip_metric.cc",
98 "source/rtcp_packet/voip_metric.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000099 "source/rtcp_receiver.cc",
100 "source/rtcp_receiver.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000101 "source/rtcp_sender.cc",
102 "source/rtcp_sender.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200103 "source/rtp_format.cc",
104 "source/rtp_format.h",
105 "source/rtp_format_h264.cc",
106 "source/rtp_format_h264.h",
107 "source/rtp_format_video_generic.cc",
108 "source/rtp_format_video_generic.h",
109 "source/rtp_format_vp8.cc",
110 "source/rtp_format_vp8.h",
asaperssonf38ea3c2015-07-28 04:02:54 -0700111 "source/rtp_format_vp9.cc",
112 "source/rtp_format_vp9.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000113 "source/rtp_header_extension.h",
Danil Chapovalov07633bd2017-06-01 17:10:51 +0200114 "source/rtp_header_extension_map.cc",
danilchap1edb7ab2016-04-20 05:25:10 -0700115 "source/rtp_header_extensions.cc",
116 "source/rtp_header_extensions.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200117 "source/rtp_header_parser.cc",
danilchap1edb7ab2016-04-20 05:25:10 -0700118 "source/rtp_packet.cc",
119 "source/rtp_packet.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200120 "source/rtp_packet_history.cc",
121 "source/rtp_packet_history.h",
danilchap1edb7ab2016-04-20 05:25:10 -0700122 "source/rtp_packet_received.h",
123 "source/rtp_packet_to_send.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200124 "source/rtp_payload_registry.cc",
125 "source/rtp_receiver_audio.cc",
126 "source/rtp_receiver_audio.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000127 "source/rtp_receiver_impl.cc",
128 "source/rtp_receiver_impl.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200129 "source/rtp_receiver_strategy.cc",
130 "source/rtp_receiver_strategy.h",
131 "source/rtp_receiver_video.cc",
132 "source/rtp_receiver_video.h",
133 "source/rtp_rtcp_config.h",
134 "source/rtp_rtcp_impl.cc",
135 "source/rtp_rtcp_impl.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000136 "source/rtp_sender.cc",
137 "source/rtp_sender.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200138 "source/rtp_sender_audio.cc",
139 "source/rtp_sender_audio.h",
140 "source/rtp_sender_video.cc",
141 "source/rtp_sender_video.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000142 "source/rtp_utility.cc",
143 "source/rtp_utility.h",
Danil Chapovalovc1e55c72016-03-09 15:14:35 +0100144 "source/time_util.cc",
145 "source/time_util.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000146 "source/tmmbr_help.cc",
147 "source/tmmbr_help.h",
brandtr869e7cd2016-10-31 05:27:07 -0700148 "source/ulpfec_generator.cc",
149 "source/ulpfec_generator.h",
Rasmus Brandt78db1582016-09-21 09:19:34 +0200150 "source/ulpfec_header_reader_writer.cc",
151 "source/ulpfec_header_reader_writer.h",
brandtrd55c3f62016-10-31 04:51:33 -0700152 "source/ulpfec_receiver_impl.cc",
153 "source/ulpfec_receiver_impl.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000154 "source/video_codec_information.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000155 ]
156
gaetano.carlucci52a57032016-09-14 05:04:36 -0700157 if (rtc_enable_bwe_test_logging) {
158 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
159 } else {
160 defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]
161 }
162
kjellandere40a7ee2016-10-16 23:56:12 -0700163 if (!build_with_chromium && is_clang) {
164 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700165 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000166 }
167
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000168 deps = [
mbonadei1140f972017-04-26 03:38:35 -0700169 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000170 "../..:webrtc_common",
hbos8d609f62017-04-10 07:39:05 -0700171 "../../api:libjingle_peerconnection_api",
aleloia8eb7562016-11-28 07:02:13 -0800172 "../../api:transport_api",
kwiberg1c07c702017-03-27 07:15:49 -0700173 "../../api/audio_codecs:audio_codecs_api",
mbonadeiebafdc82016-12-22 07:35:39 -0800174 "../../base:gtest_prod",
175 "../../base:rtc_base_approved",
176 "../../base:rtc_task_queue",
sprang52033d62016-06-02 02:43:32 -0700177 "../../common_video",
mbonadeiebafdc82016-12-22 07:35:39 -0800178 "../../logging:rtc_event_log_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000179 "../../system_wrappers",
kwiberg1c07c702017-03-27 07:15:49 -0700180 "../audio_coding:audio_format_conversion",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000181 "../remote_bitrate_estimator",
182 ]
183
kjellander8f4419b2016-06-02 02:09:52 -0700184 # TODO(jschuh): Bug 1348: fix this warning.
185 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
186
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000187 if (is_win) {
188 cflags = [
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000189 # TODO(kjellander): Bug 261: fix this warning.
190 "/wd4373", # virtual function override.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000191 ]
192 }
193}
brandtr03bc3cf2016-08-08 08:08:53 -0700194
kjellandere0629c02017-04-25 04:04:50 -0700195rtc_source_set("fec_test_helper") {
196 testonly = true
197 sources = [
198 "source/fec_test_helper.cc",
199 "source/fec_test_helper.h",
200 ]
201 deps = [
202 ":rtp_rtcp",
mbonadei1140f972017-04-26 03:38:35 -0700203 "..:module_api",
kjellandere0629c02017-04-25 04:04:50 -0700204 "../../base:rtc_base_approved",
205 ]
206
207 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
208 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
209 if (!build_with_chromium && is_clang) {
210 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
211 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
212 }
213}
214
mbonadei3edccb92017-06-01 04:47:20 -0700215rtc_source_set("mock_rtp_rtcp") {
216 testonly = true
217 sources = [
218 "mocks/mock_recovered_packet_receiver.h",
219 "mocks/mock_rtcp_rtt_stats.h",
220 "mocks/mock_rtp_rtcp.h",
221 ]
222 deps = [
223 ":rtp_rtcp",
224 "..:module_api",
225 "../../base:rtc_base_approved",
226 "../../test:test_support",
227 ]
228}
229
brandtr03bc3cf2016-08-08 08:08:53 -0700230if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700231 rtc_executable("test_packet_masks_metrics") {
brandtr03bc3cf2016-08-08 08:08:53 -0700232 testonly = true
233
234 sources = [
235 "test/testFec/average_residual_loss_xor_codes.h",
236 "test/testFec/test_packet_masks_metrics.cc",
237 ]
238
239 deps = [
240 ":rtp_rtcp",
241 "//testing/gtest",
ehmaldonado26bddb92016-11-30 06:12:01 -0800242 "//webrtc/test:test_main",
brandtr03bc3cf2016-08-08 08:08:53 -0700243 ]
244 } # test_packet_masks_metrics
ehmaldonado36268652017-01-19 08:27:11 -0800245
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800246 rtc_source_set("rtp_rtcp_modules_tests") {
247 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700248
249 # Skip restricting visibility on mobile platforms since the tests on those
250 # gets additional generated targets which would require many lines here to
251 # cover (which would be confusing to read and hard to maintain).
252 if (!is_android && !is_ios) {
253 visibility = [ "//webrtc/modules:modules_tests" ]
254 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800255 sources = [
256 "test/testFec/test_fec.cc",
257 ]
258 deps = [
259 ":rtp_rtcp",
260 "../../base:rtc_base_approved",
261 "../../test:test_support",
262 ]
263 if (!build_with_chromium && is_clang) {
264 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
265 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
266 }
267 }
268
kjellandere0629c02017-04-25 04:04:50 -0700269 rtc_source_set("rtp_rtcp_unittests") {
270 testonly = true
271
272 # Skip restricting visibility on mobile platforms since the tests on those
273 # gets additional generated targets which would require many lines here to
274 # cover (which would be confusing to read and hard to maintain).
275 if (!is_android && !is_ios) {
276 visibility = [ "//webrtc/modules:modules_unittests" ]
277 }
278 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800279 "source/byte_io_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800280 "source/flexfec_header_reader_writer_unittest.cc",
281 "source/flexfec_receiver_unittest.cc",
282 "source/flexfec_sender_unittest.cc",
283 "source/nack_rtx_unittest.cc",
284 "source/packet_loss_stats_unittest.cc",
285 "source/playout_delay_oracle_unittest.cc",
286 "source/receive_statistics_unittest.cc",
287 "source/remote_ntp_time_estimator_unittest.cc",
danilchap84432382017-02-09 05:21:42 -0800288 "source/rtcp_nack_stats_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800289 "source/rtcp_packet/app_unittest.cc",
290 "source/rtcp_packet/bye_unittest.cc",
291 "source/rtcp_packet/common_header_unittest.cc",
292 "source/rtcp_packet/compound_packet_unittest.cc",
293 "source/rtcp_packet/dlrr_unittest.cc",
294 "source/rtcp_packet/extended_jitter_report_unittest.cc",
295 "source/rtcp_packet/extended_reports_unittest.cc",
296 "source/rtcp_packet/fir_unittest.cc",
297 "source/rtcp_packet/nack_unittest.cc",
298 "source/rtcp_packet/pli_unittest.cc",
299 "source/rtcp_packet/rapid_resync_request_unittest.cc",
300 "source/rtcp_packet/receiver_report_unittest.cc",
301 "source/rtcp_packet/remb_unittest.cc",
302 "source/rtcp_packet/report_block_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800303 "source/rtcp_packet/rrtr_unittest.cc",
304 "source/rtcp_packet/sdes_unittest.cc",
305 "source/rtcp_packet/sender_report_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800306 "source/rtcp_packet/target_bitrate_unittest.cc",
307 "source/rtcp_packet/tmmbn_unittest.cc",
308 "source/rtcp_packet/tmmbr_unittest.cc",
309 "source/rtcp_packet/transport_feedback_unittest.cc",
310 "source/rtcp_packet/voip_metric_unittest.cc",
311 "source/rtcp_packet_unittest.cc",
312 "source/rtcp_receiver_unittest.cc",
313 "source/rtcp_sender_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800314 "source/rtp_fec_unittest.cc",
315 "source/rtp_format_h264_unittest.cc",
ilnik7a3006b2017-05-23 09:34:21 -0700316 "source/rtp_format_video_generic_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800317 "source/rtp_format_vp8_test_helper.cc",
318 "source/rtp_format_vp8_test_helper.h",
319 "source/rtp_format_vp8_unittest.cc",
320 "source/rtp_format_vp9_unittest.cc",
Danil Chapovalov07633bd2017-06-01 17:10:51 +0200321 "source/rtp_header_extension_map_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800322 "source/rtp_packet_history_unittest.cc",
323 "source/rtp_packet_unittest.cc",
324 "source/rtp_payload_registry_unittest.cc",
hbos8d609f62017-04-10 07:39:05 -0700325 "source/rtp_receiver_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800326 "source/rtp_rtcp_impl_unittest.cc",
327 "source/rtp_sender_unittest.cc",
328 "source/rtp_utility_unittest.cc",
329 "source/time_util_unittest.cc",
330 "source/ulpfec_generator_unittest.cc",
331 "source/ulpfec_header_reader_writer_unittest.cc",
332 "source/ulpfec_receiver_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800333 "test/testAPI/test_api.cc",
334 "test/testAPI/test_api.h",
335 "test/testAPI/test_api_audio.cc",
336 "test/testAPI/test_api_rtcp.cc",
337 "test/testAPI/test_api_video.cc",
338 ]
339 deps = [
kjellandere0629c02017-04-25 04:04:50 -0700340 ":fec_test_helper",
341 ":mock_rtp_rtcp",
ehmaldonado36268652017-01-19 08:27:11 -0800342 ":rtp_rtcp",
mbonadei1140f972017-04-26 03:38:35 -0700343 "..:module_api",
ehmaldonado36268652017-01-19 08:27:11 -0800344 "../..:webrtc_common",
345 "../../api:transport_api",
346 "../../base:rtc_base_approved",
347 "../../common_video:common_video",
348 "../../system_wrappers:system_wrappers",
349 "../../test:field_trial",
350 "../../test:rtp_test_utils",
351 "../../test:test_common",
352 "../../test:test_support",
353 "//testing/gmock",
354 ]
355
356 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
357 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
358 if (!build_with_chromium && is_clang) {
359 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
360 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
361 }
362 }
brandtr03bc3cf2016-08-08 08:08:53 -0700363}