# 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_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",
        "../call:video_stream_api",
        "../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
  }
}
