# 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 = [ ":video_file_reader" ]
  if (!build_with_chromium) {
    deps += [
      ":frame_analyzer",
      ":psnr_ssim_analyzer",
      ":video_quality_analysis",
    ]
  }
  if (!build_with_chromium && rtc_enable_protobuf) {
    deps += [ ":chart_proto" ]
  }
  if (!build_with_chromium && rtc_include_tests) {
    deps += [ ":tools_unittests" ]
  }
  if (rtc_include_tests && rtc_enable_protobuf) {
    deps += [
      ":rtp_analyzer",
      "network_tester",
    ]
  }
  if (rtc_include_tests && rtc_enable_protobuf && !build_with_chromium) {
    deps += [
      ":audioproc_f",
      ":event_log_visualizer",
      ":rtc_event_log_to_text",
      ":unpack_aecdump",
    ]
  }
  if (!build_with_chromium && rtc_enable_grpc) {
    deps += [ "data_channel_benchmark" ]
  }
}

rtc_library("video_file_reader") {
  sources = [
    "video_file_reader.cc",
    "video_file_reader.h",
  ]
  deps = [
    "../api:make_ref_counted",
    "../api:ref_count",
    "../api:scoped_refptr",
    "../api/video:video_frame",
    "../api/video:video_rtp_headers",
    "../rtc_base:checks",
    "../rtc_base:logging",
    "../rtc_base:refcount",
    "../rtc_base:stringutils",
    "//third_party/abseil-cpp/absl/strings",
  ]
}

rtc_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_rtp_headers",
    "../rtc_base:logging",
    "//third_party/abseil-cpp/absl/strings",
  ]
}

rtc_library("video_quality_analysis") {
  testonly = true
  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:make_ref_counted",
    "../api:scoped_refptr",
    "../api/numerics",
    "../api/test/metrics:metric",
    "../api/test/metrics:metrics_logger",
    "../api/video:video_frame",
    "../api/video:video_rtp_headers",
    "../common_video",
    "../rtc_base:checks",
    "../rtc_base:logging",
    "//third_party/libyuv",
  ]
}

# TODO(bugs.webrtc.org/11474): Enable this on win if needed. For now it
# is only required for Linux and Android.
if (!build_with_chromium && !build_with_mozilla && !is_win && !is_ios) {
  action("frame_analyzer_host") {
    script = "//tools_webrtc/executable_host_build.py"
    outputs = [ "${root_out_dir}/frame_analyzer_host" ]
    args = [
      "--executable_name",
      "frame_analyzer",
    ]
  }
}

if (!is_component_build) {
  # This target can be built from Chromium but it doesn't support
  # is_component_build=true because it depends on WebRTC testonly code
  # which is not part of //third_party/webrtc_overrides:webrtc_component.

  rtc_executable("frame_analyzer") {
    visibility = [ "*" ]
    testonly = true
    sources = [ "frame_analyzer/frame_analyzer.cc" ]

    deps = [
      ":video_file_reader",
      ":video_file_writer",
      ":video_quality_analysis",
      "../api:make_ref_counted",
      "../api:scoped_refptr",
      "../api/test/metrics:chrome_perf_dashboard_metrics_exporter",
      "../api/test/metrics:global_metrics_logger_and_exporter",
      "../api/test/metrics:metrics_exporter",
      "../api/test/metrics:stdout_metrics_exporter",
      "../rtc_base:stringutils",
      "//third_party/abseil-cpp/absl/flags:flag",
      "//third_party/abseil-cpp/absl/flags:parse",
      "//third_party/abseil-cpp/absl/strings",
    ]

    if (build_with_chromium) {
      # When building from Chromium, WebRTC's metrics and field trial
      # implementations need to be replaced by the Chromium ones.
      deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
    }
  }

  # This target can be built from Chromium but it doesn't support
  # is_component_build=true because it depends on WebRTC testonly code
  # which is not part of //third_party/webrtc_overrides:webrtc_component.

  rtc_executable("rtp_generator") {
    visibility = [ "*" ]
    testonly = true
    sources = [
      "rtp_generator/main.cc",
      "rtp_generator/rtp_generator.cc",
      "rtp_generator/rtp_generator.h",
    ]

    deps = [
      "..//api/video_codecs:video_decoder_factory_template",
      "..//api/video_codecs:video_decoder_factory_template_dav1d_adapter",
      "..//api/video_codecs:video_decoder_factory_template_libvpx_vp8_adapter",
      "..//api/video_codecs:video_decoder_factory_template_libvpx_vp9_adapter",
      "..//api/video_codecs:video_decoder_factory_template_open_h264_adapter",
      "..//api/video_codecs:video_encoder_factory_template",
      "..//api/video_codecs:video_encoder_factory_template_libaom_av1_adapter",
      "..//api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter",
      "..//api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter",
      "..//api/video_codecs:video_encoder_factory_template_open_h264_adapter",
      "..//test/network:simulated_network",
      "../api:create_frame_generator",
      "../api:rtp_parameters",
      "../api:transport_api",
      "../api/environment",
      "../api/environment:environment_factory",
      "../api/video:builtin_video_bitrate_allocator_factory",
      "../api/video_codecs:video_codecs_api",
      "../call",
      "../call:call_interfaces",
      "../call:fake_network",
      "../call:rtp_interfaces",
      "../call:rtp_sender",
      "../call:simulated_packet_receiver",
      "../call:video_send_stream_api",
      "../media:media_constants",
      "../media:rtc_audio_video",
      "../rtc_base:rtc_json",
      "../rtc_base:threading",
      "../rtc_base/system:file_wrapper",
      "../test:fileutils",
      "../test:frame_generator_capturer",
      "../test:rtp_test_utils",
      "../video/config:encoder_config",
      "../video/config:streams_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",
    ]
    if (build_with_chromium) {
      # When building from Chromium, WebRTC's metrics and field trial
      # implementations need to be replaced by the Chromium ones.
      deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
    }
  }

  # This target can be built from Chromium but it doesn't support
  # is_component_build=true because it depends on WebRTC testonly code
  # which is not part of //third_party/webrtc_overrides:webrtc_component.

  rtc_executable("video_replay") {
    visibility = [ "*" ]
    testonly = true
    sources = [ "video_replay.cc" ]
    deps = [
      "../api:field_trials",
      "../api:rtp_parameters",
      "../api/environment",
      "../api/environment:environment_factory",
      "../api/task_queue",
      "../api/test/video:function_video_factory",
      "../api/transport:field_trial_based_config",
      "../api/units:timestamp",
      "../api/video:video_frame",
      "../api/video_codecs:video_codecs_api",
      "../call",
      "../call:call_interfaces",
      "../common_video",
      "../media:rtc_internal_video_codecs",
      "../modules/rtp_rtcp:rtp_rtcp_format",
      "../modules/video_coding:video_coding_utility",
      "../rtc_base:checks",
      "../rtc_base:rtc_json",
      "../rtc_base:stringutils",
      "../system_wrappers",
      "../test:call_config_utils",
      "../test:encoder_settings",
      "../test:fake_video_codecs",
      "../test:null_transport",
      "../test:rtp_test_utils",
      "../test:run_loop",
      "../test:run_test",
      "../test:run_test_interface",
      "../test:test_renderer",
      "../test:test_support",
      "../test:test_video_capturer",
      "../test:video_frame_writer",
      "../test:video_test_common",
      "../test:video_test_constants",
      "../test/time_controller:time_controller",
      "//third_party/abseil-cpp/absl/flags:flag",
      "//third_party/abseil-cpp/absl/flags:parse",
      "//third_party/abseil-cpp/absl/strings:strings",
    ]
    if (build_with_chromium) {
      # When building from Chromium, WebRTC's metrics and field trial
      # implementations need to be replaced by the Chromium ones.
      deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
    }
  }
}

# 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("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_library("reference_less_video_analysis_lib") {
    testonly = true
    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",
    ]
  }

  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_library("event_log_visualizer_utils") {
      visibility = [ "*" ]
      allow_poison = [ "environment_construction" ]
      sources = [
        "rtc_event_log_visualizer/alerts.cc",
        "rtc_event_log_visualizer/alerts.h",
        "rtc_event_log_visualizer/analyze_audio.cc",
        "rtc_event_log_visualizer/analyze_audio.h",
        "rtc_event_log_visualizer/analyzer.cc",
        "rtc_event_log_visualizer/analyzer.h",
        "rtc_event_log_visualizer/analyzer_common.cc",
        "rtc_event_log_visualizer/analyzer_common.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",
      ]
      deps = [
        ":chart_proto",
        "../api:candidate",
        "../api:dtls_transport_interface",
        "../api:function_view",
        "../api:make_ref_counted",
        "../api:rtp_headers",
        "../api:rtp_parameters",
        "../api:scoped_refptr",
        "../api/audio_codecs:audio_codecs_api",  # TODO(kwiberg): Remove this
                                                 # dependency.
        "../api/environment",
        "../api/environment:environment_factory",
        "../api/neteq:neteq_api",
        "../api/rtc_event_log:rtc_event_log",
        "../api/transport:bandwidth_usage",
        "../api/transport:field_trial_based_config",
        "../api/transport:goog_cc",
        "../api/transport:network_control",
        "../api/units:data_rate",
        "../api/units:time_delta",
        "../api/units:timestamp",
        "../call:call_interfaces",
        "../logging:ice_log",
        "../logging:rtc_event_audio",
        "../logging:rtc_event_audio",
        "../logging:rtc_event_bwe",
        "../logging:rtc_event_generic_packet_events",
        "../logging:rtc_event_log_parser",
        "../logging:rtc_event_rtp_rtcp",
        "../logging:rtc_stream_config",
        "../modules/audio_coding:ana_debug_dump_proto",
        "../modules/audio_coding:audio_network_adaptor",
        "../modules/audio_coding:neteq_input_audio_tools",
        "../modules/audio_coding:neteq_tools",
        "../modules/audio_coding:neteq_tools_minimal",
        "../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:ntp_time_util",
        "../modules/rtp_rtcp:rtp_rtcp_format",
        "../rtc_base:checks",
        "../rtc_base:logging",
        "../rtc_base:macromagic",
        "../rtc_base:rate_statistics",
        "../rtc_base:refcount",
        "../rtc_base:rtc_numerics",
        "../rtc_base:stringutils",
        "../rtc_base/network:sent_packet",
        "../system_wrappers",
        "../system_wrappers:field_trial",
        "../test:explicit_key_value_config",
        "//third_party/abseil-cpp/absl/algorithm:container",
        "//third_party/abseil-cpp/absl/base:core_headers",
        "//third_party/abseil-cpp/absl/functional:bind_front",
        "//third_party/abseil-cpp/absl/strings:string_view",
      ]
    }

    rtc_library("event_log_visualizer_bindings") {
      visibility = [ "*" ]
      allow_poison = [ "environment_construction" ]
      sources = [
        "rtc_event_log_visualizer/analyzer_bindings.cc",
        "rtc_event_log_visualizer/analyzer_bindings.h",
      ]
      deps = [
        ":chart_proto",
        ":event_log_visualizer_utils",
        "//api/units:time_delta",
        "//logging:rtc_event_log_parser",
        "//rtc_base:protobuf_utils",
        "//rtc_base:safe_conversions",
        "//third_party/abseil-cpp/absl/strings",
        "//third_party/abseil-cpp/absl/strings:string_view",
      ]
    }

    rtc_library("event_log_visualizer_bindings_unittest") {
      testonly = true
      sources = [ "rtc_event_log_visualizer/analyzer_bindings_unittest.cc" ]
      deps = [
        ":chart_proto",
        ":event_log_visualizer_bindings",
        "//rtc_base:protobuf_utils",
        "//rtc_base/system:file_wrapper",
        "//test:fileutils",
        "//test:test_support",
      ]
    }
  }

  rtc_executable("video_encoder") {
    visibility = [ "*" ]
    testonly = true
    sources = [
      "video_encoder/encoded_image_file_writer.cc",
      "video_encoder/encoded_image_file_writer.h",
      "video_encoder/video_encoder.cc",
    ]
    deps = [
      "//api:create_frame_generator",
      "//api:frame_generator_api",
      "//api/environment",
      "//api/environment:environment_factory",
      "//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",
      "//common_video:common_video",
      "//media:media_constants",
      "//modules/video_coding:video_codec_interface",
      "//modules/video_coding:video_coding_utility",
      "//modules/video_coding/codecs/av1:av1_svc_config",
      "//modules/video_coding/svc:scalability_mode_util",
      "//rtc_base:logging",
      "//test:y4m_frame_generator",
      "//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:strings",
    ]
  }
}

if (rtc_include_tests) {
  if (!build_with_chromium) {
    if (rtc_enable_protobuf) {
      rtc_executable("event_log_visualizer") {
        # TODO(bugs.webrtc.org/14248): Remove once usage of std::tmpnam
        # is removed (in favor of in memory InputAudioFile.
        cflags_cc = [ "-Wno-deprecated-declarations" ]
        sources = [
          "rtc_event_log_visualizer/conversational_speech_en.h",
          "rtc_event_log_visualizer/main.cc",
        ]
        deps = [
          ":chart_proto",
          ":event_log_visualizer_utils",
          "../api/neteq:neteq_api",
          "../api/rtc_event_log",
          "../api/units:time_delta",
          "../logging:rtc_event_log_parser",
          "../modules/audio_coding:neteq",
          "../modules/rtp_rtcp:rtp_rtcp_format",
          "../rtc_base:checks",
          "../rtc_base:logging",
          "../rtc_base:protobuf_utils",
          "../system_wrappers:field_trial",
          "//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",
        ]
      }

      rtc_executable("rtc_event_log_to_text") {
        testonly = true
        sources = [
          "rtc_event_log_to_text/converter.cc",
          "rtc_event_log_to_text/converter.h",
          "rtc_event_log_to_text/main.cc",
        ]
        deps = [
          "../api:candidate",
          "../api:rtp_parameters",
          "../api/rtc_event_log",
          "../api/transport:bandwidth_usage",
          "../api/video:video_frame",
          "../logging:ice_log",
          "../logging:rtc_event_audio",
          "../logging:rtc_event_begin_end",
          "../logging:rtc_event_bwe",
          "../logging:rtc_event_frame_events",
          "../logging:rtc_event_generic_packet_events",
          "../logging:rtc_event_log2_proto",
          "../logging:rtc_event_log_impl_encoder",
          "../logging:rtc_event_log_parser",
          "../logging:rtc_event_log_proto",
          "../logging:rtc_event_pacing",
          "../logging:rtc_event_rtp_rtcp",
          "../logging:rtc_event_video",
          "../logging:rtc_stream_config",
          "../rtc_base:checks",
          "../rtc_base:logging",
          "//third_party/abseil-cpp/absl/base:core_headers",
          "//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",
      "../resources/rtc_event_log/rtc_event_log_500kbps.binarypb",
    ]

    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/test/metrics:metric",
        "../api/test/metrics:metrics_logger",
        "../api/video:video_frame",
        "../api/video:video_rtp_headers",
        "../common_video",
        "../rtc_base:checks",
        "../rtc_base:null_socket_server",
        "../rtc_base:threading",
        "../system_wrappers",
        "../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 += [
          ":event_log_visualizer_bindings_unittest",
          "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) {
      rtc_executable("audioproc_f") {
        testonly = true
        sources = [ "audioproc_f/audioproc_float_main.cc" ]
        deps = [
          "../api:audioproc_f_api",
          "../api/audio:audio_processing",
          "../modules/audio_processing",
        ]
      }

      rtc_executable("unpack_aecdump") {
        visibility = [ "*" ]
        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",
          "../rtc_base:checks",
          "../rtc_base:macromagic",
          "../rtc_base:protobuf_utils",
          "../rtc_base:stringutils",
          "../rtc_base/system:arch",
          "//third_party/abseil-cpp/absl/flags:flag",
          "//third_party/abseil-cpp/absl/flags:parse",
        ]
      }  # unpack_aecdump
    }
  }

  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
  }
}
