| # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| # |
| # Use of this source code is governed by a BSD-style license |
| # that can be found in the LICENSE file in the root of the source |
| # tree. An additional intellectual property rights grant can be found |
| # in the file PATENTS. All contributing project authors may |
| # be found in the AUTHORS file in the root of the source tree. |
| import("../webrtc.gni") |
| if (rtc_enable_protobuf) { |
| import("//third_party/protobuf/proto_library.gni") |
| } |
| |
| group("rtc_tools") { |
| # This target shall build all targets in tools/. |
| testonly = true |
| |
| deps = [ |
| ":frame_analyzer", |
| ":video_file_reader", |
| ":video_quality_analysis", |
| ] |
| if (!build_with_chromium) { |
| deps += [ |
| ":psnr_ssim_analyzer", |
| ":rgba_to_i420_converter", |
| ] |
| if (rtc_enable_protobuf) { |
| deps += [ ":chart_proto" ] |
| } |
| } |
| |
| if (rtc_include_tests) { |
| deps += [ ":tools_unittests" ] |
| if (rtc_enable_protobuf) { |
| if (!build_with_chromium) { |
| deps += [ ":event_log_visualizer" ] |
| } |
| deps += [ |
| ":rtp_analyzer", |
| ":unpack_aecdump", |
| "network_tester", |
| ] |
| } |
| } |
| } |
| |
| rtc_static_library("video_file_reader") { |
| sources = [ |
| "video_file_reader.cc", |
| "video_file_reader.h", |
| ] |
| deps = [ |
| "../api:scoped_refptr", |
| "../api/video:video_frame", |
| "../api/video:video_frame_i420", |
| "../api/video:video_rtp_headers", |
| "../rtc_base:checks", |
| "../rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/strings", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| rtc_static_library("video_file_writer") { |
| sources = [ |
| "video_file_writer.cc", |
| "video_file_writer.h", |
| ] |
| deps = [ |
| ":video_file_reader", |
| "../api:scoped_refptr", |
| "../api/video:video_frame", |
| "../api/video:video_frame_i420", |
| "../api/video:video_rtp_headers", |
| "../rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/strings", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| rtc_static_library("video_quality_analysis") { |
| sources = [ |
| "frame_analyzer/linear_least_squares.cc", |
| "frame_analyzer/linear_least_squares.h", |
| "frame_analyzer/video_color_aligner.cc", |
| "frame_analyzer/video_color_aligner.h", |
| "frame_analyzer/video_geometry_aligner.cc", |
| "frame_analyzer/video_geometry_aligner.h", |
| "frame_analyzer/video_quality_analysis.cc", |
| "frame_analyzer/video_quality_analysis.h", |
| "frame_analyzer/video_temporal_aligner.cc", |
| "frame_analyzer/video_temporal_aligner.h", |
| ] |
| deps = [ |
| ":video_file_reader", |
| "../api:array_view", |
| "../api:scoped_refptr", |
| "../api/video:video_frame", |
| "../api/video:video_frame_i420", |
| "../api/video:video_rtp_headers", |
| "../common_video", |
| "../rtc_base:checks", |
| "../rtc_base:rtc_base_approved", |
| "../test:perf_test", |
| "//third_party/abseil-cpp/absl/types:optional", |
| "//third_party/libyuv", |
| ] |
| } |
| |
| rtc_executable("frame_analyzer") { |
| visibility = [ "*" ] |
| testonly = true |
| sources = [ |
| "frame_analyzer/frame_analyzer.cc", |
| ] |
| |
| deps = [ |
| ":video_file_reader", |
| ":video_file_writer", |
| ":video_quality_analysis", |
| "../api:scoped_refptr", |
| "../rtc_base:stringutils", |
| "../test:perf_test", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| "//third_party/abseil-cpp/absl/strings", |
| ] |
| } |
| |
| if (!build_with_chromium && !build_with_mozilla) { |
| action("frame_analyzer_host") { |
| script = "//tools_webrtc/executable_host_build.py" |
| outputs = [ |
| "${root_out_dir}/frame_analyzer_host", |
| ] |
| args = [ |
| "--executable_name", |
| "frame_analyzer", |
| ] |
| } |
| } |
| |
| # Only expose the targets needed by Chromium (e.g. frame_analyzer) to avoid |
| # building a lot of redundant code as part of Chromium builds. |
| if (!build_with_chromium) { |
| rtc_executable("rtp_generator") { |
| visibility = [ "*" ] |
| testonly = true |
| sources = [ |
| "rtp_generator/main.cc", |
| "rtp_generator/rtp_generator.cc", |
| "rtp_generator/rtp_generator.h", |
| ] |
| |
| deps = [ |
| "../api:rtp_parameters", |
| "../api:transport_api", |
| "../api/rtc_event_log", |
| "../api/task_queue:default_task_queue_factory", |
| "../api/task_queue:task_queue", |
| "../api/video:builtin_video_bitrate_allocator_factory", |
| "../api/video_codecs:builtin_video_decoder_factory", |
| "../api/video_codecs:builtin_video_encoder_factory", |
| "../api/video_codecs:video_codecs_api", |
| "../call", |
| "../call:call_interfaces", |
| "../call:fake_network", |
| "../call:rtp_interfaces", |
| "../call:rtp_sender", |
| "../call:simulated_network", |
| "../call:simulated_packet_receiver", |
| "../call:video_stream_api", |
| "../media:rtc_audio_video", |
| "../media:rtc_media_base", |
| "../rtc_base", |
| "../rtc_base:rtc_base_approved", |
| "../rtc_base:rtc_json", |
| "../rtc_base/system:file_wrapper", |
| "../test:fileutils", |
| "../test:rtp_test_utils", |
| "../test:video_test_common", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| "//third_party/abseil-cpp/absl/flags:usage", |
| "//third_party/abseil-cpp/absl/strings", |
| ] |
| } |
| |
| rtc_executable("psnr_ssim_analyzer") { |
| testonly = true |
| sources = [ |
| "psnr_ssim_analyzer/psnr_ssim_analyzer.cc", |
| ] |
| |
| deps = [ |
| ":video_file_reader", |
| ":video_quality_analysis", |
| "../api:scoped_refptr", |
| "../api/video:video_frame", |
| "../api/video:video_rtp_headers", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| "//third_party/abseil-cpp/absl/flags:usage", |
| ] |
| } |
| |
| rtc_static_library("reference_less_video_analysis_lib") { |
| sources = [ |
| "frame_analyzer/reference_less_video_analysis_lib.cc", |
| "frame_analyzer/reference_less_video_analysis_lib.h", |
| ] |
| |
| deps = [ |
| ":video_file_reader", |
| ":video_quality_analysis", |
| "../api:scoped_refptr", |
| "../api/video:video_frame", |
| "../api/video:video_rtp_headers", |
| ] |
| } |
| |
| rtc_executable("reference_less_video_analysis") { |
| testonly = true |
| sources = [ |
| "frame_analyzer/reference_less_video_analysis.cc", |
| ] |
| |
| deps = [ |
| ":reference_less_video_analysis_lib", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| "//third_party/abseil-cpp/absl/flags:usage", |
| ] |
| } |
| |
| rtc_executable("rgba_to_i420_converter") { |
| visibility = [ "*" ] |
| testonly = true |
| sources = [ |
| "converter/converter.cc", |
| "converter/converter.h", |
| "converter/rgba_to_i420_converter.cc", |
| ] |
| |
| deps = [ |
| "../common_video", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| "//third_party/abseil-cpp/absl/flags:usage", |
| "//third_party/libyuv", |
| ] |
| } |
| |
| if (rtc_enable_protobuf) { |
| proto_library("chart_proto") { |
| visibility = [ "*" ] |
| sources = [ |
| "rtc_event_log_visualizer/proto/chart.proto", |
| "rtc_event_log_visualizer/proto/chart_enums.proto", |
| ] |
| proto_out_dir = "rtc_tools/rtc_event_log_visualizer/proto" |
| } |
| |
| rtc_static_library("event_log_visualizer_utils") { |
| visibility = [ "*" ] |
| sources = [ |
| "rtc_event_log_visualizer/analyzer.cc", |
| "rtc_event_log_visualizer/analyzer.h", |
| "rtc_event_log_visualizer/log_simulation.cc", |
| "rtc_event_log_visualizer/log_simulation.h", |
| "rtc_event_log_visualizer/plot_base.cc", |
| "rtc_event_log_visualizer/plot_base.h", |
| "rtc_event_log_visualizer/plot_protobuf.cc", |
| "rtc_event_log_visualizer/plot_protobuf.h", |
| "rtc_event_log_visualizer/plot_python.cc", |
| "rtc_event_log_visualizer/plot_python.h", |
| "rtc_event_log_visualizer/triage_notifications.h", |
| ] |
| defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| deps = [ |
| ":chart_proto", |
| "../api:function_view", |
| |
| # TODO(kwiberg): Remove this dependency. |
| "../api/audio_codecs:audio_codecs_api", |
| "../api/transport:field_trial_based_config", |
| "../api/transport:goog_cc", |
| "../api/transport:network_control", |
| "../call:call_interfaces", |
| "../call:video_stream_api", |
| "../logging:rtc_event_log_parser", |
| "../logging:rtc_stream_config", |
| "../modules/audio_coding:ana_debug_dump_proto", |
| "../modules/audio_coding:audio_network_adaptor", |
| "../modules/audio_coding:neteq_tools", |
| "../modules/congestion_controller", |
| "../modules/congestion_controller/goog_cc:delay_based_bwe", |
| "../modules/congestion_controller/goog_cc:estimators", |
| "../modules/congestion_controller/rtp:transport_feedback", |
| "../modules/pacing", |
| "../modules/remote_bitrate_estimator", |
| "../modules/rtp_rtcp", |
| "../modules/rtp_rtcp:rtp_rtcp_format", |
| "../rtc_base:checks", |
| "../rtc_base:rtc_base_approved", |
| "../rtc_base:rtc_numerics", |
| "../rtc_base:stringutils", |
| "//third_party/abseil-cpp/absl/strings", |
| ] |
| } |
| } |
| } |
| |
| if (rtc_include_tests) { |
| if (rtc_enable_protobuf && !build_with_chromium) { |
| rtc_executable("event_log_visualizer") { |
| testonly = true |
| sources = [ |
| "rtc_event_log_visualizer/main.cc", |
| ] |
| |
| defines = [ "ENABLE_RTC_EVENT_LOG" ] |
| deps = [ |
| ":event_log_visualizer_utils", |
| "../api/rtc_event_log", |
| "../logging:rtc_event_log_parser", |
| "../modules/audio_coding:neteq", |
| "../modules/rtp_rtcp:rtp_rtcp_format", |
| "../rtc_base:checks", |
| "../rtc_base:protobuf_utils", |
| "../rtc_base:rtc_base_approved", |
| "../system_wrappers:field_trial", |
| "../test:field_trial", |
| "../test:fileutils", |
| "../test:test_support", |
| "//third_party/abseil-cpp/absl/algorithm:container", |
| "//third_party/abseil-cpp/absl/flags:config", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| "//third_party/abseil-cpp/absl/flags:usage", |
| "//third_party/abseil-cpp/absl/strings", |
| ] |
| } |
| } |
| |
| tools_unittests_resources = [ |
| "../resources/foreman_128x96.yuv", |
| "../resources/foreman_cif.yuv", |
| "../resources/reference_less_video_test_file.y4m", |
| ] |
| |
| if (is_ios) { |
| bundle_data("tools_unittests_bundle_data") { |
| testonly = true |
| sources = tools_unittests_resources |
| outputs = [ |
| "{{bundle_resources_dir}}/{{source_file_part}}", |
| ] |
| } |
| } |
| |
| rtc_test("tools_unittests") { |
| testonly = true |
| |
| sources = [ |
| "frame_analyzer/linear_least_squares_unittest.cc", |
| "frame_analyzer/reference_less_video_analysis_unittest.cc", |
| "frame_analyzer/video_color_aligner_unittest.cc", |
| "frame_analyzer/video_geometry_aligner_unittest.cc", |
| "frame_analyzer/video_quality_analysis_unittest.cc", |
| "frame_analyzer/video_temporal_aligner_unittest.cc", |
| "sanitizers_unittest.cc", |
| "video_file_reader_unittest.cc", |
| "video_file_writer_unittest.cc", |
| ] |
| |
| deps = [ |
| ":video_file_reader", |
| ":video_file_writer", |
| ":video_quality_analysis", |
| "../api:scoped_refptr", |
| "../api/video:video_frame", |
| "../api/video:video_frame_i420", |
| "../api/video:video_rtp_headers", |
| "../common_video", |
| "../rtc_base", |
| "../rtc_base:checks", |
| "../test:fileutils", |
| "../test:test_main", |
| "../test:test_support", |
| "//testing/gtest", |
| "//third_party/libyuv", |
| ] |
| |
| if (!build_with_chromium) { |
| deps += [ ":reference_less_video_analysis_lib" ] |
| } |
| |
| if (rtc_enable_protobuf) { |
| deps += [ "network_tester:network_tester_unittests" ] |
| } |
| |
| data = tools_unittests_resources |
| if (is_android) { |
| deps += [ "//testing/android/native_test:native_test_support" ] |
| shard_timeout = 900 |
| } |
| if (is_ios) { |
| deps += [ ":tools_unittests_bundle_data" ] |
| } |
| } |
| |
| if (rtc_enable_protobuf) { |
| copy("rtp_analyzer") { |
| sources = [ |
| "py_event_log_analyzer/misc.py", |
| "py_event_log_analyzer/pb_parse.py", |
| "py_event_log_analyzer/rtp_analyzer.py", |
| "py_event_log_analyzer/rtp_analyzer.sh", |
| ] |
| outputs = [ |
| "$root_build_dir/{{source_file_part}}", |
| ] |
| deps = [ |
| "../logging:rtc_event_log_proto", |
| ] |
| } # rtp_analyzer |
| |
| rtc_executable("unpack_aecdump") { |
| visibility = [ "*" ] |
| testonly = true |
| sources = [ |
| "unpack_aecdump/unpack.cc", |
| ] |
| |
| deps = [ |
| "../api:function_view", |
| "../common_audio", |
| "../modules/audio_processing", |
| "../modules/audio_processing:audioproc_debug_proto", |
| "../modules/audio_processing:audioproc_debug_proto", |
| "../modules/audio_processing:audioproc_protobuf_utils", |
| "../modules/audio_processing:audioproc_test_utils", |
| "../rtc_base:protobuf_utils", |
| "../rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/flags:flag", |
| "//third_party/abseil-cpp/absl/flags:parse", |
| ] |
| } # unpack_aecdump |
| } |
| } |