kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 1 | # 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 | |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 9 | import("//third_party/protobuf/proto_library.gni") |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 10 | import("../build/webrtc.gni") |
| 11 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 12 | group("tools") { |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 13 | # This target shall build all targets in tools/. |
| 14 | testonly = true |
kjellander | a811968 | 2016-06-06 02:00:18 -0700 | [diff] [blame] | 15 | |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 16 | public_deps = [ |
| 17 | ":command_line_parser", |
| 18 | ":frame_analyzer", |
| 19 | ":frame_editor", |
| 20 | ":psnr_ssim_analyzer", |
| 21 | ":rgba_to_i420_converter", |
| 22 | ] |
| 23 | if (rtc_include_internal_audio_device) { |
| 24 | public_deps += [ ":force_mic_volume_max" ] |
| 25 | } |
| 26 | if (rtc_enable_protobuf) { |
| 27 | public_deps += [ ":chart_proto" ] |
| 28 | } |
| 29 | |
| 30 | if (rtc_include_tests) { |
| 31 | public_deps += [ |
| 32 | ":activity_metric", |
| 33 | ":rtp_analyzer", |
| 34 | ":tools_unittests", |
kjellander | a811968 | 2016-06-06 02:00:18 -0700 | [diff] [blame] | 35 | ] |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 36 | if (rtc_enable_protobuf) { |
| 37 | public_deps += [ ":event_log_visualizer" ] |
| 38 | } |
kjellander | a811968 | 2016-06-06 02:00:18 -0700 | [diff] [blame] | 39 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 40 | } |
| 41 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 42 | rtc_static_library("command_line_parser") { |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 43 | sources = [ |
Henrik Kjellander | fa16dda | 2015-04-01 22:53:56 +0200 | [diff] [blame] | 44 | "simple_command_line_parser.cc", |
Henrik Kjellander | 57e5fd2 | 2015-05-25 12:55:39 +0200 | [diff] [blame] | 45 | "simple_command_line_parser.h", |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 46 | ] |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 47 | deps = [ |
kjellander | 988d31e | 2016-02-05 00:23:50 -0800 | [diff] [blame] | 48 | "../base:gtest_prod", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 49 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 50 | } |
| 51 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 52 | rtc_static_library("video_quality_analysis") { |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 53 | sources = [ |
| 54 | "frame_analyzer/video_quality_analysis.cc", |
| 55 | "frame_analyzer/video_quality_analysis.h", |
| 56 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 57 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 58 | deps = [ |
| 59 | "../common_video", |
| 60 | ] |
| 61 | public_deps = [ |
| 62 | "../common_video", |
| 63 | ] |
| 64 | } |
| 65 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 66 | rtc_executable("frame_analyzer") { |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 67 | sources = [ |
| 68 | "frame_analyzer/frame_analyzer.cc", |
| 69 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 70 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 71 | deps = [ |
| 72 | ":command_line_parser", |
| 73 | ":video_quality_analysis", |
| 74 | "//build/win:default_exe_manifest", |
| 75 | ] |
| 76 | } |
| 77 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 78 | rtc_executable("psnr_ssim_analyzer") { |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 79 | sources = [ |
| 80 | "psnr_ssim_analyzer/psnr_ssim_analyzer.cc", |
| 81 | ] |
| 82 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 83 | deps = [ |
| 84 | ":command_line_parser", |
| 85 | ":video_quality_analysis", |
brucedawson | 84583e0 | 2016-04-28 00:21:08 -0700 | [diff] [blame] | 86 | "//build/win:default_exe_manifest", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 87 | ] |
| 88 | } |
| 89 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 90 | rtc_executable("rgba_to_i420_converter") { |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 91 | sources = [ |
| 92 | "converter/converter.cc", |
| 93 | "converter/converter.h", |
| 94 | "converter/rgba_to_i420_converter.cc", |
| 95 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 96 | |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 97 | deps = [ |
| 98 | ":command_line_parser", |
| 99 | "../common_video", |
brucedawson | 84583e0 | 2016-04-28 00:21:08 -0700 | [diff] [blame] | 100 | "//build/win:default_exe_manifest", |
Henrik Kjellander | 67bcb60 | 2015-10-07 08:42:52 +0200 | [diff] [blame] | 101 | ] |
| 102 | } |
| 103 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 104 | rtc_static_library("frame_editing_lib") { |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 105 | sources = [ |
| 106 | "frame_editing/frame_editing_lib.cc", |
| 107 | "frame_editing/frame_editing_lib.h", |
| 108 | ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 109 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 110 | # TODO(jschuh): Bug 1348: fix this warning. |
| 111 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 112 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 113 | if (!build_with_chromium && is_clang) { |
| 114 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 115 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 116 | } |
kjellander@webrtc.org | 3037bc3 | 2014-09-30 19:07:58 +0000 | [diff] [blame] | 117 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 118 | deps = [ |
| 119 | "../common_video", |
| 120 | ] |
| 121 | } |
| 122 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 123 | rtc_executable("frame_editor") { |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 124 | sources = [ |
| 125 | "frame_editing/frame_editing.cc", |
| 126 | ] |
| 127 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 128 | deps = [ |
| 129 | ":command_line_parser", |
| 130 | ":frame_editing_lib", |
| 131 | "//build/win:default_exe_manifest", |
| 132 | ] |
| 133 | } |
| 134 | |
solenberg | fc433e6 | 2016-09-09 11:04:53 -0700 | [diff] [blame] | 135 | # It doesn't make sense to build this tool without the ADM enabled. |
| 136 | if (rtc_include_internal_audio_device) { |
| 137 | rtc_executable("force_mic_volume_max") { |
| 138 | sources = [ |
| 139 | "force_mic_volume_max/force_mic_volume_max.cc", |
| 140 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 141 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 142 | if (!build_with_chromium && is_clang) { |
| 143 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
solenberg | fc433e6 | 2016-09-09 11:04:53 -0700 | [diff] [blame] | 144 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 145 | } |
| 146 | |
| 147 | deps = [ |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 148 | "../modules/audio_device", |
solenberg | fc433e6 | 2016-09-09 11:04:53 -0700 | [diff] [blame] | 149 | "../system_wrappers:system_wrappers_default", |
| 150 | "//build/win:default_exe_manifest", |
| 151 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 152 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 153 | } |
| 154 | |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 155 | if (rtc_enable_protobuf) { |
skvlad | f581eb7 | 2016-09-07 11:15:37 -0700 | [diff] [blame] | 156 | proto_library("chart_proto") { |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 157 | sources = [ |
skvlad | f581eb7 | 2016-09-07 11:15:37 -0700 | [diff] [blame] | 158 | "event_log_visualizer/chart.proto", |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 159 | ] |
| 160 | proto_out_dir = "webrtc/tools/event_log_visualizer" |
| 161 | } |
| 162 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 163 | rtc_static_library("event_log_visualizer_utils") { |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 164 | sources = [ |
| 165 | "event_log_visualizer/analyzer.cc", |
| 166 | "event_log_visualizer/analyzer.h", |
| 167 | "event_log_visualizer/plot_base.cc", |
| 168 | "event_log_visualizer/plot_base.h", |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 169 | "event_log_visualizer/plot_protobuf.cc", |
| 170 | "event_log_visualizer/plot_protobuf.h", |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 171 | "event_log_visualizer/plot_python.cc", |
| 172 | "event_log_visualizer/plot_python.h", |
| 173 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 174 | if (!build_with_chromium && is_clang) { |
| 175 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 176 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 177 | } |
| 178 | defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| 179 | deps = [ |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 180 | "../logging:rtc_event_log_impl", |
| 181 | "../logging:rtc_event_log_parser", |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 182 | "../modules/congestion_controller", |
| 183 | "../modules/rtp_rtcp", |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 184 | "../system_wrappers:system_wrappers_default", |
| 185 | "//build/config/sanitizers:deps", |
| 186 | ] |
| 187 | public_deps = [ |
skvlad | f581eb7 | 2016-09-07 11:15:37 -0700 | [diff] [blame] | 188 | ":chart_proto", |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 189 | "../logging:rtc_event_log_parser", |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 190 | ] |
| 191 | } |
| 192 | } |
| 193 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 194 | # Exclude tools depending on gflags since that's not available in Chromium. |
kjellander@webrtc.org | aff499c | 2016-06-06 23:04:31 +0200 | [diff] [blame] | 195 | if (rtc_include_tests) { |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 196 | if (rtc_enable_protobuf) { |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 197 | rtc_executable("event_log_visualizer") { |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 198 | testonly = true |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 199 | sources = [ |
terelius | d49a37b | 2016-08-10 07:12:38 -0700 | [diff] [blame] | 200 | "event_log_visualizer/main.cc", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 201 | ] |
| 202 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 203 | if (!build_with_chromium && is_clang) { |
| 204 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 205 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| 209 | deps = [ |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 210 | ":event_log_visualizer_utils", |
stefan | 985d280 | 2016-11-15 06:54:09 -0800 | [diff] [blame] | 211 | "../test:field_trial", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 212 | "//third_party/gflags", |
| 213 | ] |
| 214 | } |
| 215 | } |
| 216 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 217 | rtc_executable("activity_metric") { |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 218 | testonly = true |
| 219 | sources = [ |
| 220 | "agc/activity_metric.cc", |
| 221 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 222 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 223 | if (!build_with_chromium && is_clang) { |
| 224 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 225 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 226 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 227 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 228 | deps = [ |
| 229 | "../modules/audio_processing", |
| 230 | "../system_wrappers:metrics_default", |
| 231 | "//build/win:default_exe_manifest", |
| 232 | "//testing/gtest", |
| 233 | "//third_party/gflags", |
| 234 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 235 | } |
| 236 | |
charujain | 26fa6b2 | 2016-11-28 05:34:07 -0800 | [diff] [blame^] | 237 | tools_unittests_resources = [ "//resources/foreman_cif.yuv" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 238 | |
| 239 | if (is_ios) { |
| 240 | bundle_data("tools_unittests_bundle_data") { |
| 241 | testonly = true |
| 242 | sources = tools_unittests_resources |
| 243 | outputs = [ |
| 244 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 245 | ] |
| 246 | } |
| 247 | } |
| 248 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 249 | rtc_test("tools_unittests") { |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 250 | testonly = true |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 251 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 252 | sources = [ |
| 253 | "frame_analyzer/video_quality_analysis_unittest.cc", |
| 254 | "frame_editing/frame_editing_unittest.cc", |
| 255 | "simple_command_line_parser_unittest.cc", |
| 256 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 257 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 258 | # TODO(jschuh): Bug 1348: fix this warning. |
| 259 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 260 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 261 | if (!build_with_chromium && is_clang) { |
| 262 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 263 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 264 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 265 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 266 | deps = [ |
| 267 | ":command_line_parser", |
| 268 | ":frame_editing_lib", |
| 269 | ":video_quality_analysis", |
| 270 | "../test:test_support_main", |
| 271 | "//testing/gtest", |
| 272 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 273 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 274 | data = tools_unittests_resources |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 275 | if (is_android) { |
| 276 | deps += [ "//testing/android/native_test:native_test_support" ] |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 277 | shard_timeout = 900 |
| 278 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 279 | if (is_ios) { |
| 280 | deps += [ ":tools_unittests_bundle_data" ] |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 281 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 282 | } |
aleloi | 7ebbf90 | 2016-06-20 07:39:15 -0700 | [diff] [blame] | 283 | |
| 284 | if (rtc_enable_protobuf) { |
| 285 | copy("rtp_analyzer") { |
| 286 | sources = [ |
| 287 | "py_event_log_analyzer/misc.py", |
| 288 | "py_event_log_analyzer/pb_parse.py", |
| 289 | "py_event_log_analyzer/rtp_analyzer.py", |
| 290 | "py_event_log_analyzer/rtp_analyzer.sh", |
| 291 | ] |
| 292 | outputs = [ |
| 293 | "$root_build_dir/{{source_file_part}}", |
| 294 | ] |
| 295 | deps = [ |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 296 | "../logging:rtc_event_log_proto", |
aleloi | 7ebbf90 | 2016-06-20 07:39:15 -0700 | [diff] [blame] | 297 | ] |
| 298 | } |
| 299 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 300 | } |