| OLD | NEW |
| 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import("//third_party/protobuf/proto_library.gni") | 9 # TODO(kjellander): Remove when bugs.webrtc.org/7855 is completed. |
| 10 import("../webrtc.gni") | 10 import("../webrtc.gni") |
| 11 | 11 |
| 12 group("tools") { | 12 group("tools") { |
| 13 # This target shall build all targets in tools/. | 13 # This target shall build all targets in tools/. |
| 14 testonly = true | 14 testonly = true |
| 15 | 15 |
| 16 public_deps = [ | 16 public_deps = [ |
| 17 ":command_line_parser", | 17 "../rtc_tools", |
| 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 ":tools_unittests", | |
| 34 ] | |
| 35 if (rtc_enable_protobuf) { | |
| 36 public_deps += [ | |
| 37 ":event_log_visualizer", | |
| 38 ":rtp_analyzer", | |
| 39 "network_tester", | |
| 40 ] | |
| 41 } | |
| 42 } | |
| 43 } | |
| 44 | |
| 45 rtc_static_library("command_line_parser") { | |
| 46 sources = [ | |
| 47 "simple_command_line_parser.cc", | |
| 48 "simple_command_line_parser.h", | |
| 49 ] | |
| 50 deps = [ | |
| 51 "../base:gtest_prod", | |
| 52 "../base:rtc_base_approved", | |
| 53 ] | 18 ] |
| 54 } | 19 } |
| 55 | 20 |
| 56 rtc_static_library("video_quality_analysis") { | 21 group("command_line_parser") { |
| 57 sources = [ | 22 public_deps = [ "../rtc_tools:command_line_parser" ] |
| 58 "frame_analyzer/video_quality_analysis.cc", | |
| 59 "frame_analyzer/video_quality_analysis.h", | |
| 60 ] | |
| 61 | |
| 62 deps = [ | |
| 63 "../common_video", | |
| 64 ] | |
| 65 public_deps = [ | |
| 66 "../common_video", | |
| 67 ] | |
| 68 } | 23 } |
| 69 | 24 |
| 70 rtc_executable("frame_analyzer") { | 25 group("video_quality_analysis") { |
| 71 sources = [ | 26 public_deps = [ "../rtc_tools:video_quality_analysis" ] |
| 72 "frame_analyzer/frame_analyzer.cc", | |
| 73 ] | |
| 74 | |
| 75 deps = [ | |
| 76 ":command_line_parser", | |
| 77 ":video_quality_analysis", | |
| 78 "//build/win:default_exe_manifest", | |
| 79 ] | |
| 80 } | 27 } |
| 81 | 28 |
| 82 rtc_executable("psnr_ssim_analyzer") { | 29 group("frame_analyzer") { |
| 83 sources = [ | 30 public_deps = [ "../rtc_tools:frame_analyzer" ] |
| 84 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc", | |
| 85 ] | |
| 86 | |
| 87 deps = [ | |
| 88 ":command_line_parser", | |
| 89 ":video_quality_analysis", | |
| 90 "//build/win:default_exe_manifest", | |
| 91 ] | |
| 92 } | 31 } |
| 93 | 32 |
| 94 rtc_static_library("reference_less_video_analysis_lib") { | 33 group("psnr_ssim_analyzer") { |
| 95 sources = [ | 34 public_deps = [ "../rtc_tools:psnr_ssim_analyzer" ] |
| 96 "frame_analyzer/reference_less_video_analysis_lib.cc", | |
| 97 "frame_analyzer/reference_less_video_analysis_lib.h", | |
| 98 ] | |
| 99 | |
| 100 deps = [ | |
| 101 ":video_quality_analysis", | |
| 102 ] | |
| 103 } | 35 } |
| 104 | 36 |
| 105 rtc_executable("reference_less_video_analysis") { | 37 group("reference_less_video_analysis_lib") { |
| 106 sources = [ | 38 public_deps = [ "../rtc_tools:reference_less_video_analysis_lib" ] |
| 107 "frame_analyzer/reference_less_video_analysis.cc", | |
| 108 ] | |
| 109 | |
| 110 deps = [ | |
| 111 ":command_line_parser", | |
| 112 ":reference_less_video_analysis_lib", | |
| 113 "//build/win:default_exe_manifest", | |
| 114 ] | |
| 115 } | 39 } |
| 116 | 40 |
| 117 rtc_executable("rgba_to_i420_converter") { | 41 group("reference_less_video_analysis") { |
| 118 sources = [ | 42 public_deps = [ "../rtc_tools:reference_less_video_analysis" ] |
| 119 "converter/converter.cc", | |
| 120 "converter/converter.h", | |
| 121 "converter/rgba_to_i420_converter.cc", | |
| 122 ] | |
| 123 | |
| 124 deps = [ | |
| 125 ":command_line_parser", | |
| 126 "../common_video", | |
| 127 "//build/win:default_exe_manifest", | |
| 128 ] | |
| 129 } | 43 } |
| 130 | 44 |
| 131 rtc_static_library("frame_editing_lib") { | 45 group("rgba_to_i420_converter") { |
| 132 sources = [ | 46 public_deps = [ "../rtc_tools:rgba_to_i420_converter" ] |
| 133 "frame_editing/frame_editing_lib.cc", | 47 } |
| 134 "frame_editing/frame_editing_lib.h", | |
| 135 ] | |
| 136 | 48 |
| 137 # TODO(jschuh): Bug 1348: fix this warning. | 49 group("frame_editing_lib") { |
| 138 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 50 public_deps = [ "../rtc_tools:frame_editing_lib" ] |
| 51 } |
| 139 | 52 |
| 140 if (!build_with_chromium && is_clang) { | 53 group("frame_editor") { |
| 141 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 54 public_deps = [ "../rtc_tools:frame_editor" ] |
| 142 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 55 } |
| 56 |
| 57 if (rtc_include_internal_audio_device) { |
| 58 group("force_mic_volume_max") { |
| 59 public_deps = [ "../rtc_tools:force_mic_volume_max" ] |
| 60 } |
| 143 } | 61 } |
| 144 | 62 |
| 145 deps = [ | 63 if (rtc_enable_protobuf) { |
| 146 "..:webrtc_common", | 64 group("chart_proto") { |
| 147 "../common_video", | 65 public_deps = [ "../rtc_tools:chart_proto" ] |
| 148 ] | 66 } |
| 149 } | |
| 150 | 67 |
| 151 rtc_executable("frame_editor") { | 68 group("event_log_visualizer_utils") { |
| 152 sources = [ | 69 public_deps = [ "../rtc_tools:event_log_visualizer_utils" ] |
| 153 "frame_editing/frame_editing.cc", | |
| 154 ] | |
| 155 | |
| 156 deps = [ | |
| 157 ":command_line_parser", | |
| 158 ":frame_editing_lib", | |
| 159 "//build/win:default_exe_manifest", | |
| 160 ] | |
| 161 } | |
| 162 | |
| 163 # It doesn't make sense to build this tool without the ADM enabled. | |
| 164 if (rtc_include_internal_audio_device) { | |
| 165 rtc_executable("force_mic_volume_max") { | |
| 166 sources = [ | |
| 167 "force_mic_volume_max/force_mic_volume_max.cc", | |
| 168 ] | |
| 169 | |
| 170 if (!build_with_chromium && is_clang) { | |
| 171 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 172 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 173 } | |
| 174 | |
| 175 deps = [ | |
| 176 "../modules/audio_device", | |
| 177 "../system_wrappers:system_wrappers_default", | |
| 178 "//build/win:default_exe_manifest", | |
| 179 ] | |
| 180 } | 70 } |
| 181 } | 71 } |
| 182 | |
| 183 if (rtc_enable_protobuf) { | |
| 184 proto_library("chart_proto") { | |
| 185 sources = [ | |
| 186 "event_log_visualizer/chart.proto", | |
| 187 ] | |
| 188 proto_out_dir = "webrtc/tools/event_log_visualizer" | |
| 189 } | |
| 190 | |
| 191 rtc_static_library("event_log_visualizer_utils") { | |
| 192 sources = [ | |
| 193 "event_log_visualizer/analyzer.cc", | |
| 194 "event_log_visualizer/analyzer.h", | |
| 195 "event_log_visualizer/plot_base.cc", | |
| 196 "event_log_visualizer/plot_base.h", | |
| 197 "event_log_visualizer/plot_protobuf.cc", | |
| 198 "event_log_visualizer/plot_protobuf.h", | |
| 199 "event_log_visualizer/plot_python.cc", | |
| 200 "event_log_visualizer/plot_python.h", | |
| 201 ] | |
| 202 if (!build_with_chromium && is_clang) { | |
| 203 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 204 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 205 } | |
| 206 defines = [ "ENABLE_RTC_EVENT_LOG" ] | |
| 207 deps = [ | |
| 208 "..:video_stream_api", | |
| 209 "../base:rtc_base_approved", | |
| 210 "../call:call_interfaces", | |
| 211 "../logging:rtc_event_log_impl", | |
| 212 "../logging:rtc_event_log_parser", | |
| 213 "../modules:module_api", | |
| 214 "../modules/audio_coding:ana_debug_dump_proto", | |
| 215 "../modules/audio_coding:neteq_tools", | |
| 216 | |
| 217 # TODO(kwiberg): Remove this dependency. | |
| 218 "../api/audio_codecs:audio_codecs_api", | |
| 219 "../modules/congestion_controller", | |
| 220 "../modules/rtp_rtcp", | |
| 221 "../system_wrappers:system_wrappers_default", | |
| 222 "//build/config:exe_and_shlib_deps", | |
| 223 ] | |
| 224 public_deps = [ | |
| 225 ":chart_proto", | |
| 226 "../logging:rtc_event_log_parser", | |
| 227 ] | |
| 228 } | |
| 229 } | |
| 230 | |
| 231 # Exclude tools depending on gflags since that's not available in Chromium. | |
| 232 if (rtc_include_tests) { | |
| 233 if (rtc_enable_protobuf) { | |
| 234 rtc_executable("event_log_visualizer") { | |
| 235 testonly = true | |
| 236 sources = [ | |
| 237 "event_log_visualizer/main.cc", | |
| 238 ] | |
| 239 | |
| 240 if (!build_with_chromium && is_clang) { | |
| 241 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
. | |
| 242 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 243 } | |
| 244 | |
| 245 defines = [ "ENABLE_RTC_EVENT_LOG" ] | |
| 246 deps = [ | |
| 247 ":event_log_visualizer_utils", | |
| 248 "../base:rtc_base_approved", | |
| 249 "../test:field_trial", | |
| 250 "../test:test_support", | |
| 251 ] | |
| 252 } | |
| 253 } | |
| 254 | |
| 255 rtc_executable("activity_metric") { | |
| 256 testonly = true | |
| 257 sources = [ | |
| 258 "agc/activity_metric.cc", | |
| 259 ] | |
| 260 | |
| 261 if (!build_with_chromium && is_clang) { | |
| 262 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 263 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 264 } | |
| 265 | |
| 266 deps = [ | |
| 267 "../base:rtc_base_approved", | |
| 268 "../modules:module_api", | |
| 269 "../modules/audio_processing", | |
| 270 "../system_wrappers:metrics_default", | |
| 271 "../test:test_support", | |
| 272 "//build/win:default_exe_manifest", | |
| 273 "//testing/gtest", | |
| 274 ] | |
| 275 } | |
| 276 | |
| 277 tools_unittests_resources = [ | |
| 278 "//resources/foreman_cif.yuv", | |
| 279 "//resources/reference_less_video_test_file.y4m", | |
| 280 "//resources/video_quality_analysis_frame.txt", | |
| 281 ] | |
| 282 | |
| 283 if (is_ios) { | |
| 284 bundle_data("tools_unittests_bundle_data") { | |
| 285 testonly = true | |
| 286 sources = tools_unittests_resources | |
| 287 outputs = [ | |
| 288 "{{bundle_resources_dir}}/{{source_file_part}}", | |
| 289 ] | |
| 290 } | |
| 291 } | |
| 292 | |
| 293 rtc_test("tools_unittests") { | |
| 294 testonly = true | |
| 295 | |
| 296 sources = [ | |
| 297 "frame_analyzer/reference_less_video_analysis_unittest.cc", | |
| 298 "frame_analyzer/video_quality_analysis_unittest.cc", | |
| 299 "frame_editing/frame_editing_unittest.cc", | |
| 300 "simple_command_line_parser_unittest.cc", | |
| 301 ] | |
| 302 | |
| 303 # TODO(jschuh): Bug 1348: fix this warning. | |
| 304 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | |
| 305 | |
| 306 if (!build_with_chromium && is_clang) { | |
| 307 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
| 308 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
| 309 } | |
| 310 | |
| 311 deps = [ | |
| 312 ":command_line_parser", | |
| 313 ":frame_editing_lib", | |
| 314 ":reference_less_video_analysis_lib", | |
| 315 ":video_quality_analysis", | |
| 316 "../test:test_main", | |
| 317 "//testing/gtest", | |
| 318 ] | |
| 319 | |
| 320 if (rtc_enable_protobuf) { | |
| 321 deps += [ "network_tester:network_tester_unittests" ] | |
| 322 } | |
| 323 | |
| 324 data = tools_unittests_resources | |
| 325 if (is_android) { | |
| 326 deps += [ "//testing/android/native_test:native_test_support" ] | |
| 327 shard_timeout = 900 | |
| 328 } | |
| 329 if (is_ios) { | |
| 330 deps += [ ":tools_unittests_bundle_data" ] | |
| 331 } | |
| 332 } | |
| 333 | |
| 334 if (rtc_enable_protobuf) { | |
| 335 copy("rtp_analyzer") { | |
| 336 sources = [ | |
| 337 "py_event_log_analyzer/misc.py", | |
| 338 "py_event_log_analyzer/pb_parse.py", | |
| 339 "py_event_log_analyzer/rtp_analyzer.py", | |
| 340 "py_event_log_analyzer/rtp_analyzer.sh", | |
| 341 ] | |
| 342 outputs = [ | |
| 343 "$root_build_dir/{{source_file_part}}", | |
| 344 ] | |
| 345 deps = [ | |
| 346 "../logging:rtc_event_log_proto", | |
| 347 ] | |
| 348 } | |
| 349 } | |
| 350 } | |
| OLD | NEW |