blob: 5d754d9974b7ce3a1116090518be36dd7366c1da [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",
17 "include/rtp_header_parser.h",
18 "include/rtp_payload_registry.h",
19 "include/rtp_receiver.h",
20 "include/rtp_rtcp.h",
21 "include/rtp_rtcp_defines.h",
brandtrd55c3f62016-10-31 04:51:33 -070022 "include/ulpfec_receiver.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000023 "source/byte_io.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020024 "source/dtmf_queue.cc",
25 "source/dtmf_queue.h",
26 "source/fec_private_tables_bursty.h",
27 "source/fec_private_tables_random.h",
brandtr0496de22016-10-03 00:43:25 -070028 "source/flexfec_header_reader_writer.cc",
29 "source/flexfec_header_reader_writer.h",
brandtr0a4c1612016-11-03 08:18:27 -070030 "source/flexfec_receiver.cc",
brandtrc295e002016-11-03 09:22:33 -070031 "source/flexfec_sender.cc",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +020032 "source/forward_error_correction.cc",
33 "source/forward_error_correction.h",
34 "source/forward_error_correction_internal.cc",
35 "source/forward_error_correction_internal.h",
bcornell30409b42015-07-10 18:10:05 -070036 "source/packet_loss_stats.cc",
37 "source/packet_loss_stats.h",
isheriff6b4b5f32016-06-08 00:24:21 -070038 "source/playout_delay_oracle.cc",
39 "source/playout_delay_oracle.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000040 "source/receive_statistics_impl.cc",
41 "source/receive_statistics_impl.h",
42 "source/remote_ntp_time_estimator.cc",
danilchap84432382017-02-09 05:21:42 -080043 "source/rtcp_nack_stats.cc",
44 "source/rtcp_nack_stats.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000045 "source/rtcp_packet.cc",
46 "source/rtcp_packet.h",
danilchap0219c9b2015-11-18 05:56:53 -080047 "source/rtcp_packet/app.cc",
48 "source/rtcp_packet/app.h",
danilchap50c51362015-11-22 09:03:11 -080049 "source/rtcp_packet/bye.cc",
50 "source/rtcp_packet/bye.h",
Danil Chapovalov7021b922016-03-15 17:39:32 +010051 "source/rtcp_packet/common_header.cc",
52 "source/rtcp_packet/common_header.h",
danilchap2f7dea12016-01-13 02:03:04 -080053 "source/rtcp_packet/compound_packet.cc",
54 "source/rtcp_packet/compound_packet.h",
danilchap54999d42015-12-16 01:56:20 -080055 "source/rtcp_packet/dlrr.cc",
56 "source/rtcp_packet/dlrr.h",
danilchapf8506cb2015-11-13 07:33:20 -080057 "source/rtcp_packet/extended_jitter_report.cc",
58 "source/rtcp_packet/extended_jitter_report.h",
Danil Chapovalov256e5b22016-01-15 14:16:24 +010059 "source/rtcp_packet/extended_reports.cc",
60 "source/rtcp_packet/extended_reports.h",
Danil Chapovalov5679da12016-01-15 13:19:53 +010061 "source/rtcp_packet/fir.cc",
62 "source/rtcp_packet/fir.h",
danilchapa8890a52015-12-22 03:43:04 -080063 "source/rtcp_packet/nack.cc",
64 "source/rtcp_packet/nack.h",
danilchapf8385ad2015-11-27 05:36:09 -080065 "source/rtcp_packet/pli.cc",
66 "source/rtcp_packet/pli.h",
67 "source/rtcp_packet/psfb.cc",
68 "source/rtcp_packet/psfb.h",
danilchap09fef9e2016-02-09 05:57:51 -080069 "source/rtcp_packet/rapid_resync_request.cc",
70 "source/rtcp_packet/rapid_resync_request.h",
Danil Chapovalov97f7e132015-12-04 16:13:30 +010071 "source/rtcp_packet/receiver_report.cc",
72 "source/rtcp_packet/receiver_report.h",
Danil Chapovalova5eba6c2016-01-15 12:40:15 +010073 "source/rtcp_packet/remb.cc",
74 "source/rtcp_packet/remb.h",
danilchapdf948f02015-11-13 03:03:13 -080075 "source/rtcp_packet/report_block.cc",
76 "source/rtcp_packet/report_block.h",
Danil Chapovalovfc47ed62015-12-07 14:46:35 +010077 "source/rtcp_packet/rrtr.cc",
78 "source/rtcp_packet/rrtr.h",
danilchapa8890a52015-12-22 03:43:04 -080079 "source/rtcp_packet/rtpfb.cc",
80 "source/rtcp_packet/rtpfb.h",
Danil Chapovalov1567d0b2016-01-15 17:34:27 +010081 "source/rtcp_packet/sdes.cc",
82 "source/rtcp_packet/sdes.h",
danilchap34ed2b92016-01-18 02:43:32 -080083 "source/rtcp_packet/sender_report.cc",
84 "source/rtcp_packet/sender_report.h",
sprangb84ad632016-11-01 02:50:12 -070085 "source/rtcp_packet/target_bitrate.cc",
86 "source/rtcp_packet/target_bitrate.h",
danilchapa92d6be2016-02-04 07:33:39 -080087 "source/rtcp_packet/tmmb_item.cc",
88 "source/rtcp_packet/tmmb_item.h",
danilchapef3d8052016-01-11 03:31:08 -080089 "source/rtcp_packet/tmmbn.cc",
90 "source/rtcp_packet/tmmbn.h",
danilchap7e8145f2016-01-11 11:49:19 -080091 "source/rtcp_packet/tmmbr.cc",
92 "source/rtcp_packet/tmmbr.h",
Erik Språnga3b87692015-07-29 10:46:54 +020093 "source/rtcp_packet/transport_feedback.cc",
94 "source/rtcp_packet/transport_feedback.h",
danilchap91941ae2015-12-15 07:06:36 -080095 "source/rtcp_packet/voip_metric.cc",
96 "source/rtcp_packet/voip_metric.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000097 "source/rtcp_receiver.cc",
98 "source/rtcp_receiver.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000099 "source/rtcp_sender.cc",
100 "source/rtcp_sender.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200101 "source/rtp_format.cc",
102 "source/rtp_format.h",
103 "source/rtp_format_h264.cc",
104 "source/rtp_format_h264.h",
105 "source/rtp_format_video_generic.cc",
106 "source/rtp_format_video_generic.h",
107 "source/rtp_format_vp8.cc",
108 "source/rtp_format_vp8.h",
asaperssonf38ea3c2015-07-28 04:02:54 -0700109 "source/rtp_format_vp9.cc",
110 "source/rtp_format_vp9.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000111 "source/rtp_header_extension.cc",
112 "source/rtp_header_extension.h",
danilchap1edb7ab2016-04-20 05:25:10 -0700113 "source/rtp_header_extensions.cc",
114 "source/rtp_header_extensions.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200115 "source/rtp_header_parser.cc",
danilchap1edb7ab2016-04-20 05:25:10 -0700116 "source/rtp_packet.cc",
117 "source/rtp_packet.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200118 "source/rtp_packet_history.cc",
119 "source/rtp_packet_history.h",
danilchap1edb7ab2016-04-20 05:25:10 -0700120 "source/rtp_packet_received.h",
121 "source/rtp_packet_to_send.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200122 "source/rtp_payload_registry.cc",
123 "source/rtp_receiver_audio.cc",
124 "source/rtp_receiver_audio.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000125 "source/rtp_receiver_impl.cc",
126 "source/rtp_receiver_impl.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200127 "source/rtp_receiver_strategy.cc",
128 "source/rtp_receiver_strategy.h",
129 "source/rtp_receiver_video.cc",
130 "source/rtp_receiver_video.h",
131 "source/rtp_rtcp_config.h",
132 "source/rtp_rtcp_impl.cc",
133 "source/rtp_rtcp_impl.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000134 "source/rtp_sender.cc",
135 "source/rtp_sender.h",
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200136 "source/rtp_sender_audio.cc",
137 "source/rtp_sender_audio.h",
138 "source/rtp_sender_video.cc",
139 "source/rtp_sender_video.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000140 "source/rtp_utility.cc",
141 "source/rtp_utility.h",
Danil Chapovalovc1e55c72016-03-09 15:14:35 +0100142 "source/time_util.cc",
143 "source/time_util.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000144 "source/tmmbr_help.cc",
145 "source/tmmbr_help.h",
brandtr869e7cd2016-10-31 05:27:07 -0700146 "source/ulpfec_generator.cc",
147 "source/ulpfec_generator.h",
Rasmus Brandt78db1582016-09-21 09:19:34 +0200148 "source/ulpfec_header_reader_writer.cc",
149 "source/ulpfec_header_reader_writer.h",
brandtrd55c3f62016-10-31 04:51:33 -0700150 "source/ulpfec_receiver_impl.cc",
151 "source/ulpfec_receiver_impl.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000152 "source/video_codec_information.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000153 "source/vp8_partition_aggregator.cc",
154 "source/vp8_partition_aggregator.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",
177 "../../call:call_interfaces",
sprang52033d62016-06-02 02:43:32 -0700178 "../../common_video",
mbonadeiebafdc82016-12-22 07:35:39 -0800179 "../../logging:rtc_event_log_api",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000180 "../../system_wrappers",
kwiberg1c07c702017-03-27 07:15:49 -0700181 "../audio_coding:audio_format_conversion",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000182 "../remote_bitrate_estimator",
183 ]
184
kjellander8f4419b2016-06-02 02:09:52 -0700185 # TODO(jschuh): Bug 1348: fix this warning.
186 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
187
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000188 if (is_win) {
189 cflags = [
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000190 # TODO(kjellander): Bug 261: fix this warning.
191 "/wd4373", # virtual function override.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000192 ]
193 }
194}
brandtr03bc3cf2016-08-08 08:08:53 -0700195
kjellandere0629c02017-04-25 04:04:50 -0700196rtc_source_set("fec_test_helper") {
197 testonly = true
198 sources = [
199 "source/fec_test_helper.cc",
200 "source/fec_test_helper.h",
201 ]
202 deps = [
203 ":rtp_rtcp",
mbonadei1140f972017-04-26 03:38:35 -0700204 "..:module_api",
kjellandere0629c02017-04-25 04:04:50 -0700205 "../../base:rtc_base_approved",
206 ]
207
208 # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
209 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
210 if (!build_with_chromium && is_clang) {
211 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
212 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
213 }
214}
215
brandtr03bc3cf2016-08-08 08:08:53 -0700216if (rtc_include_tests) {
ehmaldonado38a21322016-09-02 04:10:34 -0700217 rtc_executable("test_packet_masks_metrics") {
brandtr03bc3cf2016-08-08 08:08:53 -0700218 testonly = true
219
220 sources = [
221 "test/testFec/average_residual_loss_xor_codes.h",
222 "test/testFec/test_packet_masks_metrics.cc",
223 ]
224
225 deps = [
226 ":rtp_rtcp",
227 "//testing/gtest",
ehmaldonado26bddb92016-11-30 06:12:01 -0800228 "//webrtc/test:test_main",
brandtr03bc3cf2016-08-08 08:08:53 -0700229 ]
230 } # test_packet_masks_metrics
ehmaldonado36268652017-01-19 08:27:11 -0800231
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800232 rtc_source_set("rtp_rtcp_modules_tests") {
233 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700234
235 # Skip restricting visibility on mobile platforms since the tests on those
236 # gets additional generated targets which would require many lines here to
237 # cover (which would be confusing to read and hard to maintain).
238 if (!is_android && !is_ios) {
239 visibility = [ "//webrtc/modules:modules_tests" ]
240 }
ehmaldonado9cbb0a12017-01-30 03:07:03 -0800241 sources = [
242 "test/testFec/test_fec.cc",
243 ]
244 deps = [
245 ":rtp_rtcp",
246 "../../base:rtc_base_approved",
247 "../../test:test_support",
248 ]
249 if (!build_with_chromium && is_clang) {
250 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
251 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
252 }
253 }
254
kjellandere0629c02017-04-25 04:04:50 -0700255 rtc_source_set("mock_rtp_rtcp") {
ehmaldonado36268652017-01-19 08:27:11 -0800256 testonly = true
257 sources = [
258 "mocks/mock_rtp_rtcp.h",
kjellandere0629c02017-04-25 04:04:50 -0700259 ]
260 deps = [
261 ":rtp_rtcp",
mbonadei1140f972017-04-26 03:38:35 -0700262 "..:module_api",
kjellandere0629c02017-04-25 04:04:50 -0700263 "../../base:rtc_base_approved",
264 "../../test:test_support",
265 ]
266 }
267
268 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",
315 "source/rtp_format_vp8_test_helper.cc",
316 "source/rtp_format_vp8_test_helper.h",
317 "source/rtp_format_vp8_unittest.cc",
318 "source/rtp_format_vp9_unittest.cc",
319 "source/rtp_header_extension_unittest.cc",
320 "source/rtp_packet_history_unittest.cc",
321 "source/rtp_packet_unittest.cc",
322 "source/rtp_payload_registry_unittest.cc",
hbos8d609f62017-04-10 07:39:05 -0700323 "source/rtp_receiver_unittest.cc",
ehmaldonado36268652017-01-19 08:27:11 -0800324 "source/rtp_rtcp_impl_unittest.cc",
325 "source/rtp_sender_unittest.cc",
326 "source/rtp_utility_unittest.cc",
327 "source/time_util_unittest.cc",
328 "source/ulpfec_generator_unittest.cc",
329 "source/ulpfec_header_reader_writer_unittest.cc",
330 "source/ulpfec_receiver_unittest.cc",
331 "source/vp8_partition_aggregator_unittest.cc",
332 "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}