# Copyright (c) 2016 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")
import("audio_coding/audio_coding.gni")

group("modules") {
  deps = [
    "audio_coding",
    "audio_device",
    "audio_mixer",
    "audio_processing",
    "congestion_controller",
    "pacing",
    "remote_bitrate_estimator",
    "rtp_rtcp",
    "utility",
    "video_coding",
  ]

  if (rtc_desktop_capture_supported) {
    deps += [ "desktop_capture" ]
  }
}

rtc_source_set("module_api_public") {
  sources = [ "include/module_common_types_public.h" ]
}

rtc_source_set("module_api") {
  visibility = [ "*" ]
  sources = [ "include/module_common_types.h" ]
}

rtc_source_set("module_fec_api") {
  visibility = [ "*" ]
  sources = [ "include/module_fec_types.h" ]
}

if (rtc_include_tests && !build_with_chromium) {
  modules_tests_resources = [
    "../resources/audio_coding/testfile16kHz.pcm",
    "../resources/audio_coding/testfile32kHz.pcm",
    "../resources/audio_coding/teststereo32kHz.pcm",
    "../resources/foreman_cif.yuv",
  ]

  if (is_ios) {
    bundle_data("modules_tests_bundle_data") {
      testonly = true
      sources = modules_tests_resources
      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
    }
  }

  rtc_test("modules_tests") {
    testonly = true

    deps = [
      "../test:test_main",
      "../test:video_test_common",
      "audio_coding:audio_coding_modules_tests",
      "rtp_rtcp:rtp_rtcp_modules_tests",
      "video_coding:video_coding_modules_tests",
      "//testing/gtest",
    ]

    if (rtc_desktop_capture_supported) {
      deps += [ "desktop_capture:desktop_capture_modules_tests" ]
    }

    data = modules_tests_resources

    if (is_android) {
      use_default_launcher = false
      deps += [
        # NOTE(brandtr): Including Java classes seems only to be possible from
        # rtc_test targets. Therefore we include this target here, instead of
        # in video_coding_modules_tests, where it is actually used.
        "../sdk/android:libjingle_peerconnection_java",
        "//sdk/android:native_test_jni_onload",
        "//testing/android/native_test:native_test_support",
      ]
      shard_timeout = 900
    }

    if (is_ios) {
      deps += [ ":modules_tests_bundle_data" ]
    }
  }

  modules_unittests_resources = [
    "../resources/audio_coding/neteq_opus.rtp",
    "../resources/audio_coding/neteq_opus_dtx.rtp",
    "../resources/audio_coding/neteq_universal_new.rtp",
    "../resources/audio_coding/speech_4_channels_48k_one_second.wav",
    "../resources/audio_coding/speech_mono_16kHz.pcm",
    "../resources/audio_coding/speech_mono_32_48kHz.pcm",
    "../resources/audio_coding/testfile16kHz.pcm",
    "../resources/audio_coding/testfile32kHz.pcm",
    "../resources/audio_coding/testfile_fake_stereo_32kHz.pcm",
    "../resources/audio_coding/teststereo32kHz.pcm",
    "../resources/audio_device/audio_short16.pcm",
    "../resources/audio_device/audio_short44.pcm",
    "../resources/audio_device/audio_short48.pcm",
    "../resources/audio_processing/agc/agc_audio.pcm",
    "../resources/audio_processing/agc/agc_no_circular_buffer.dat",
    "../resources/audio_processing/agc/agc_pitch_gain.dat",
    "../resources/audio_processing/agc/agc_pitch_lag.dat",
    "../resources/audio_processing/agc/agc_spectral_peak.dat",
    "../resources/audio_processing/agc/agc_vad.dat",
    "../resources/audio_processing/agc/agc_voicing_prob.dat",
    "../resources/audio_processing/agc/agc_with_circular_buffer.dat",
    "../resources/audio_processing/output_data_fixed.pb",
    "../resources/audio_processing/output_data_float.pb",
    "../resources/audio_processing/output_data_float_avx2.pb",
    "../resources/audio_processing/output_data_mac.pb",
    "../resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
    "../resources/audio_processing/transient/audio16kHz.pcm",
    "../resources/audio_processing/transient/audio32kHz.pcm",
    "../resources/audio_processing/transient/audio48kHz.pcm",
    "../resources/audio_processing/transient/audio8kHz.pcm",
    "../resources/audio_processing/transient/detect16kHz.dat",
    "../resources/audio_processing/transient/detect32kHz.dat",
    "../resources/audio_processing/transient/detect48kHz.dat",
    "../resources/audio_processing/transient/detect8kHz.dat",
    "../resources/audio_processing/transient/double-utils.dat",
    "../resources/audio_processing/transient/float-utils.dat",
    "../resources/audio_processing/transient/suppressed16kHz.pcm",
    "../resources/audio_processing/transient/suppressed32kHz.pcm",
    "../resources/audio_processing/transient/suppressed8kHz.pcm",
    "../resources/audio_processing/transient/wpd0.dat",
    "../resources/audio_processing/transient/wpd1.dat",
    "../resources/audio_processing/transient/wpd2.dat",
    "../resources/audio_processing/transient/wpd3.dat",
    "../resources/audio_processing/transient/wpd4.dat",
    "../resources/audio_processing/transient/wpd5.dat",
    "../resources/audio_processing/transient/wpd6.dat",
    "../resources/audio_processing/transient/wpd7.dat",
    "../resources/far16_stereo.pcm",
    "../resources/far176_stereo.pcm",
    "../resources/far192_stereo.pcm",
    "../resources/far22_stereo.pcm",
    "../resources/far32_stereo.pcm",
    "../resources/far44_stereo.pcm",
    "../resources/far48_stereo.pcm",
    "../resources/far88_stereo.pcm",
    "../resources/far8_stereo.pcm",
    "../resources/far96_stereo.pcm",
    "../resources/foreman_cif.yuv",
    "../resources/foreman_cif_short.yuv",
    "../resources/near16_stereo.pcm",
    "../resources/near176_stereo.pcm",
    "../resources/near192_stereo.pcm",
    "../resources/near22_stereo.pcm",
    "../resources/near32_stereo.pcm",
    "../resources/near44_stereo.pcm",
    "../resources/near48_stereo.pcm",
    "../resources/near88_stereo.pcm",
    "../resources/near8_stereo.pcm",
    "../resources/near96_stereo.pcm",
    "../resources/ref03.aecdump",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
    "../resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
    "../resources/short_mixed_mono_48.dat",
    "../resources/short_mixed_mono_48.pcm",
    "../resources/short_mixed_mono_48_arm.dat",
    "../resources/short_mixed_stereo_48.dat",
    "../resources/short_mixed_stereo_48.pcm",
    "../resources/voice_engine/audio_tiny48.wav",
  ]
  if (is_ios) {
    bundle_data("modules_unittests_bundle_data") {
      testonly = true
      sources = modules_unittests_resources
      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
    }
  }

  rtc_test("modules_unittests") {
    testonly = true
    defines = []
    sources = [ "module_common_types_unittest.cc" ]

    deps = [
      ":module_api",
      ":module_api_public",
      "../test:test_main",
      "../test:test_support",
      "audio_coding:audio_coding_unittests",
      "audio_device:audio_device_unittests",
      "audio_mixer:audio_mixer_unittests",
      "audio_processing:audio_processing_unittests",
      "audio_processing/aec3:aec3_unittests",
      "audio_processing/ns:ns_unittests",
      "congestion_controller:congestion_controller_unittests",
      "pacing:pacing_unittests",
      "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
      "rtp_rtcp:rtp_rtcp_unittests",
      "video_coding:video_coding_unittests",
      "video_coding/deprecated:deprecated_unittests",
      "video_coding/timing:timing_unittests",
    ]

    if (rtc_desktop_capture_supported) {
      deps += [ "desktop_capture:desktop_capture_unittests" ]
    }

    data = modules_unittests_resources

    if (is_android) {
      use_default_launcher = false
      deps += [
        "../sdk/android:libjingle_peerconnection_java",
        "//testing/android/native_test:native_test_support",
      ]
      shard_timeout = 900
    }
    if (is_ios) {
      info_plist = "../test/ios/Info.plist"
      deps += [ ":modules_unittests_bundle_data" ]
      configs += [ "..:common_objc" ]
      ldflags = [ "-ObjC" ]
    }
  }
}
