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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 12 | rtc_source_set("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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 26 | rtc_source_set("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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 36 | rtc_source_set("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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 88 | rtc_source_set("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 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 120 | rtc_executable("force_mic_volume_max") { |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 121 | sources = [ |
| 122 | "force_mic_volume_max/force_mic_volume_max.cc", |
| 123 | ] |
| 124 | |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 125 | if (is_clang) { |
| 126 | # Suppress warnings from the Chromium Clang plugin. |
| 127 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 128 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | deps = [ |
| 132 | "../system_wrappers:system_wrappers_default", |
| 133 | "../voice_engine", |
| 134 | "//build/win:default_exe_manifest", |
| 135 | ] |
| 136 | } |
| 137 | |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 138 | if (rtc_enable_protobuf) { |
skvlad | f581eb7 | 2016-09-07 11:15:37 -0700 | [diff] [blame] | 139 | proto_library("chart_proto") { |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 140 | sources = [ |
skvlad | f581eb7 | 2016-09-07 11:15:37 -0700 | [diff] [blame] | 141 | "event_log_visualizer/chart.proto", |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 142 | ] |
| 143 | proto_out_dir = "webrtc/tools/event_log_visualizer" |
| 144 | } |
| 145 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 146 | rtc_source_set("event_log_visualizer_utils") { |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 147 | sources = [ |
| 148 | "event_log_visualizer/analyzer.cc", |
| 149 | "event_log_visualizer/analyzer.h", |
| 150 | "event_log_visualizer/plot_base.cc", |
| 151 | "event_log_visualizer/plot_base.h", |
terelius | b246a29 | 2016-08-23 18:15:25 -0700 | [diff] [blame] | 152 | "event_log_visualizer/plot_protobuf.cc", |
| 153 | "event_log_visualizer/plot_protobuf.h", |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 154 | "event_log_visualizer/plot_python.cc", |
| 155 | "event_log_visualizer/plot_python.h", |
| 156 | ] |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 157 | if (is_clang && !is_nacl) { |
| 158 | # Suppress warnings from the Chromium Clang plugin. |
| 159 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 160 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 161 | } |
| 162 | defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| 163 | deps = [ |
| 164 | "../:rtc_event_log", |
| 165 | "../:rtc_event_log_parser", |
| 166 | "../modules/congestion_controller:congestion_controller", |
| 167 | "../modules/rtp_rtcp:rtp_rtcp", |
| 168 | "../system_wrappers:system_wrappers_default", |
| 169 | "//build/config/sanitizers:deps", |
| 170 | ] |
| 171 | public_deps = [ |
skvlad | f581eb7 | 2016-09-07 11:15:37 -0700 | [diff] [blame] | 172 | ":chart_proto", |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 173 | "../:rtc_event_log_parser", |
| 174 | ] |
| 175 | } |
| 176 | } |
| 177 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 178 | # 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] | 179 | if (rtc_include_tests) { |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 180 | if (rtc_enable_protobuf) { |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 181 | rtc_executable("event_log_visualizer") { |
Stefan Holmer | 1318103 | 2016-07-29 14:48:54 +0200 | [diff] [blame] | 182 | testonly = true |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 183 | sources = [ |
terelius | d49a37b | 2016-08-10 07:12:38 -0700 | [diff] [blame] | 184 | "event_log_visualizer/main.cc", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 185 | ] |
| 186 | |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 187 | if (is_clang && !is_nacl) { |
| 188 | # Suppress warnings from the Chromium Clang plugin. |
| 189 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 190 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| 194 | deps = [ |
skvlad | 185ba29 | 2016-08-23 13:01:27 -0700 | [diff] [blame] | 195 | ":event_log_visualizer_utils", |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 196 | "//third_party/gflags", |
| 197 | ] |
| 198 | } |
| 199 | } |
| 200 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 201 | rtc_executable("activity_metric") { |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 202 | testonly = true |
| 203 | sources = [ |
| 204 | "agc/activity_metric.cc", |
| 205 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 206 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 207 | if (is_clang) { |
| 208 | # Suppress warnings from the Chromium Clang plugin. |
| 209 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 210 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 211 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 212 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 213 | deps = [ |
| 214 | "../modules/audio_processing", |
| 215 | "../system_wrappers:metrics_default", |
| 216 | "//build/win:default_exe_manifest", |
| 217 | "//testing/gtest", |
| 218 | "//third_party/gflags", |
| 219 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 220 | } |
| 221 | |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 222 | if (is_android || is_ios) { |
Henrik Kjellander | 7a122d6 | 2016-08-30 13:10:23 +0200 | [diff] [blame] | 223 | tools_unittests_resources = [ "//resources/foreman_cif.yuv" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | if (is_ios) { |
| 227 | bundle_data("tools_unittests_bundle_data") { |
| 228 | testonly = true |
| 229 | sources = tools_unittests_resources |
| 230 | outputs = [ |
| 231 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 232 | ] |
| 233 | } |
| 234 | } |
| 235 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 236 | rtc_test("tools_unittests") { |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 237 | testonly = true |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 238 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 239 | sources = [ |
| 240 | "frame_analyzer/video_quality_analysis_unittest.cc", |
| 241 | "frame_editing/frame_editing_unittest.cc", |
| 242 | "simple_command_line_parser_unittest.cc", |
| 243 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 244 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 245 | # TODO(jschuh): Bug 1348: fix this warning. |
| 246 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 247 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 248 | if (is_clang) { |
| 249 | # Suppress warnings from the Chromium Clang plugin. |
| 250 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 251 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 252 | } |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 253 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 254 | deps = [ |
| 255 | ":command_line_parser", |
| 256 | ":frame_editing_lib", |
| 257 | ":video_quality_analysis", |
| 258 | "../test:test_support_main", |
| 259 | "//testing/gtest", |
| 260 | ] |
kjellander | bac0412 | 2016-06-02 02:18:48 -0700 | [diff] [blame] | 261 | |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 262 | if (is_android) { |
| 263 | deps += [ "//testing/android/native_test:native_test_support" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 264 | data = tools_unittests_resources |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 265 | shard_timeout = 900 |
| 266 | } |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 267 | if (is_ios) { |
| 268 | deps += [ ":tools_unittests_bundle_data" ] |
kjellander@webrtc.org | dc0dbad | 2016-06-02 13:29:07 +0200 | [diff] [blame] | 269 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 270 | } |
aleloi | 7ebbf90 | 2016-06-20 07:39:15 -0700 | [diff] [blame] | 271 | |
| 272 | if (rtc_enable_protobuf) { |
| 273 | copy("rtp_analyzer") { |
| 274 | sources = [ |
| 275 | "py_event_log_analyzer/misc.py", |
| 276 | "py_event_log_analyzer/pb_parse.py", |
| 277 | "py_event_log_analyzer/rtp_analyzer.py", |
| 278 | "py_event_log_analyzer/rtp_analyzer.sh", |
| 279 | ] |
| 280 | outputs = [ |
| 281 | "$root_build_dir/{{source_file_part}}", |
| 282 | ] |
| 283 | deps = [ |
| 284 | "..:rtc_event_log_proto", |
| 285 | ] |
| 286 | } |
| 287 | } |
kjellander@webrtc.org | b8caf6a | 2014-09-30 18:05:02 +0000 | [diff] [blame] | 288 | } |