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