# 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")
if (is_android) {
  import("//build/config/android/config.gni")
  import("//build/config/android/rules.gni")
}

group("pc") {
  deps = [
    ":rtc_pc",
  ]
}

config("rtc_pc_config") {
  defines = []
  if (rtc_enable_sctp) {
    defines += [ "HAVE_SCTP" ]
  }
}

rtc_static_library("rtc_pc_base") {
  visibility = [ "*" ]
  defines = []
  sources = [
    "channel.cc",
    "channel.h",
    "channelmanager.cc",
    "channelmanager.h",
    "dtlssrtptransport.cc",
    "dtlssrtptransport.h",
    "externalhmac.cc",
    "externalhmac.h",
    "jseptransport.cc",
    "jseptransport.h",
    "jseptransportcontroller.cc",
    "jseptransportcontroller.h",
    "mediasession.cc",
    "mediasession.h",
    "rtcpmuxfilter.cc",
    "rtcpmuxfilter.h",
    "rtpmediautils.cc",
    "rtpmediautils.h",
    "rtptransport.cc",
    "rtptransport.h",
    "rtptransportinternal.h",
    "rtptransportinternaladapter.h",
    "sessiondescription.cc",
    "sessiondescription.h",
    "srtpfilter.cc",
    "srtpfilter.h",
    "srtpsession.cc",
    "srtpsession.h",
    "srtptransport.cc",
    "srtptransport.h",
    "transportstats.cc",
    "transportstats.h",
  ]

  deps = [
    "..:webrtc_common",
    "../api:array_view",
    "../api:call_api",
    "../api:libjingle_peerconnection_api",
    "../api:ortc_api",
    "../api/video:video_frame",
    "../call:rtp_interfaces",
    "../call:rtp_receiver",
    "../common_video:common_video",
    "../logging:rtc_event_log_api",
    "../media:rtc_data",
    "../media:rtc_h264_profile_id",
    "../media:rtc_media_base",
    "../modules/rtp_rtcp:rtp_rtcp_format",
    "../p2p:rtc_p2p",
    "../rtc_base:base64",
    "../rtc_base:checks",
    "../rtc_base:rtc_base",
    "../rtc_base:rtc_task_queue",
    "../rtc_base:stringutils",
    "../system_wrappers:metrics_api",
    "//third_party/abseil-cpp/absl/types:optional",
  ]

  if (rtc_build_libsrtp) {
    deps += [ "//third_party/libsrtp" ]
  }

  public_configs = [ ":rtc_pc_config" ]

  if (!build_with_chromium && is_clang) {
    # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
    suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
  }
}

rtc_source_set("rtc_pc") {
  visibility = [ "*" ]
  allow_poison = [
    "audio_codecs",  # TODO(bugs.webrtc.org/8396): Remove.
    "software_video_codecs",  # TODO(bugs.webrtc.org/7925): Remove.
  ]
  deps = [
    ":rtc_pc_base",
    "../media:rtc_audio_video",
  ]
}

config("libjingle_peerconnection_warnings_config") {
  # GN orders flags on a target before flags from configs. The default config
  # adds these flags so to cancel them out they need to come from a config and
  # cannot be on the target directly.
  if (!is_win && !is_clang) {
    cflags = [ "-Wno-maybe-uninitialized" ]  # Only exists for GCC.
  }
}

rtc_static_library("peerconnection") {
  visibility = [ "*" ]
  cflags = []
  sources = [
    "audiotrack.cc",
    "audiotrack.h",
    "datachannel.cc",
    "datachannel.h",
    "dtmfsender.cc",
    "dtmfsender.h",
    "iceserverparsing.cc",
    "iceserverparsing.h",
    "jsepicecandidate.cc",
    "jsepsessiondescription.cc",
    "localaudiosource.cc",
    "localaudiosource.h",
    "mediastream.cc",
    "mediastream.h",
    "mediastreamobserver.cc",
    "mediastreamobserver.h",
    "mediastreamtrack.h",
    "peerconnection.cc",
    "peerconnection.h",
    "peerconnectionfactory.cc",
    "peerconnectionfactory.h",
    "peerconnectioninternal.h",
    "remoteaudiosource.cc",
    "remoteaudiosource.h",
    "rtcstatscollector.cc",
    "rtcstatscollector.h",
    "rtcstatstraversal.cc",
    "rtcstatstraversal.h",
    "rtpreceiver.cc",
    "rtpreceiver.h",
    "rtpsender.cc",
    "rtpsender.h",
    "rtptransceiver.cc",
    "rtptransceiver.h",
    "sctputils.cc",
    "sctputils.h",
    "sdputils.cc",
    "sdputils.h",
    "statscollector.cc",
    "statscollector.h",
    "streamcollection.h",
    "trackmediainfomap.cc",
    "trackmediainfomap.h",
    "videocapturertracksource.cc",
    "videocapturertracksource.h",
    "videotrack.cc",
    "videotrack.h",
    "videotracksource.cc",
    "videotracksource.h",
    "webrtcsdp.cc",
    "webrtcsdp.h",
    "webrtcsessiondescriptionfactory.cc",
    "webrtcsessiondescriptionfactory.h",
  ]

  configs += [ ":libjingle_peerconnection_warnings_config" ]

  if (!build_with_chromium && is_clang) {
    # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
    suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
  }

  deps = [
    ":rtc_pc_base",
    "..:webrtc_common",
    "../api:call_api",
    "../api:fec_controller_api",
    "../api:libjingle_peerconnection_api",
    "../api:rtc_stats_api",
    "../api/video:video_frame",
    "../api/video_codecs:video_codecs_api",
    "../call:call_interfaces",
    "../common_video:common_video",
    "../logging:ice_log",
    "../logging:rtc_event_log_api",
    "../logging:rtc_event_log_impl_output",
    "../media:rtc_data",
    "../media:rtc_media_base",
    "../modules/congestion_controller/bbr",
    "../p2p:rtc_p2p",
    "../rtc_base:base64",
    "../rtc_base:checks",
    "../rtc_base:rtc_base",
    "../rtc_base:rtc_base_approved",
    "../rtc_base:stringutils",
    "../rtc_base/experiments:congestion_controller_experiment",
    "../stats",
    "../system_wrappers",
    "../system_wrappers:field_trial_api",
    "//third_party/abseil-cpp/absl/types:optional",
  ]
}

# This target implements CreatePeerConnectionFactory methods that will create a
# PeerConnection will full functionality (audio, video and data). Applications
# that wish to reduce their binary size by ommitting functionality they don't
# need should use CreateModularCreatePeerConnectionFactory instead, using the
# "peerconnection" build target and other targets specific to their
# requrements. See comment in peerconnectionfactoryinterface.h.
rtc_static_library("create_pc_factory") {
  sources = [
    "createpeerconnectionfactory.cc",
  ]

  deps = [
    "../api:callfactory_api",
    "../api:libjingle_peerconnection_api",
    "../api/audio:audio_mixer_api",
    "../api/audio_codecs:audio_codecs_api",
    "../api/video_codecs:video_codecs_api",
    "../call",
    "../call:call_interfaces",
    "../logging:rtc_event_log_api",
    "../logging:rtc_event_log_impl_base",
    "../media:rtc_audio_video",
    "../media:rtc_media_base",
    "../modules/audio_device:audio_device",
    "../modules/audio_processing:audio_processing",
    "../rtc_base:rtc_base",
    "../rtc_base:rtc_base_approved",
  ]

  configs += [ ":libjingle_peerconnection_warnings_config" ]

  if (!build_with_chromium && is_clang) {
    # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
    suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
  }
}

rtc_source_set("libjingle_peerconnection") {
  visibility = [ "*" ]
  allow_poison = [
    "audio_codecs",  # TODO(bugs.webrtc.org/8396): Remove.
    "software_video_codecs",  # TODO(bugs.webrtc.org/7925): Remove.
  ]
  deps = [
    ":create_pc_factory",
    ":peerconnection",
    "../api:libjingle_peerconnection_api",
  ]
}

if (rtc_include_tests) {
  config("rtc_pc_unittests_config") {
    # GN orders flags on a target before flags from configs. The default config
    # adds -Wall, and this flag have to be after -Wall -- so they need to
    # come from a config and can't be on the target directly.
    if (!is_win && !is_clang) {
      cflags = [ "-Wno-maybe-uninitialized" ]  # Only exists for GCC.
    }
  }

  rtc_test("rtc_pc_unittests") {
    testonly = true

    sources = [
      "channel_unittest.cc",
      "channelmanager_unittest.cc",
      "dtlssrtptransport_unittest.cc",
      "jseptransport_unittest.cc",
      "jseptransportcontroller_unittest.cc",
      "mediasession_unittest.cc",
      "rtcpmuxfilter_unittest.cc",
      "rtptransport_unittest.cc",
      "rtptransporttestutil.h",
      "srtpfilter_unittest.cc",
      "srtpsession_unittest.cc",
      "srtptestutil.h",
      "srtptransport_unittest.cc",
    ]

    include_dirs = [ "//third_party/libsrtp/srtp" ]

    configs += [ ":rtc_pc_unittests_config" ]

    if (!build_with_chromium && is_clang) {
      # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
    }

    if (is_win) {
      libs = [ "strmiids.lib" ]
    }

    deps = [
      ":libjingle_peerconnection",
      ":pc_test_utils",
      ":rtc_pc",
      ":rtc_pc_base",
      "../api:array_view",
      "../api:fakemetricsobserver",
      "../api:libjingle_peerconnection_api",
      "../call:rtp_interfaces",
      "../logging:rtc_event_log_api",
      "../media:rtc_media_base",
      "../media:rtc_media_tests_utils",
      "../modules/rtp_rtcp:rtp_rtcp_format",
      "../p2p:p2p_test_utils",
      "../p2p:rtc_p2p",
      "../rtc_base:checks",
      "../rtc_base:rtc_base",
      "../rtc_base:rtc_base_approved",
      "../rtc_base:rtc_base_tests_main",
      "../rtc_base:rtc_base_tests_utils",
      "../system_wrappers:metrics_default",
      "../system_wrappers:runtime_enabled_features_default",
      "../test:test_support",
    ]

    if (rtc_build_libsrtp) {
      deps += [ "//third_party/libsrtp" ]
    }

    if (is_android) {
      deps += [ "//testing/android/native_test:native_test_support" ]
    }
  }

  rtc_source_set("pc_test_utils") {
    testonly = true
    sources = [
      "test/fakeaudiocapturemodule.cc",
      "test/fakeaudiocapturemodule.h",
      "test/fakedatachannelprovider.h",
      "test/fakepeerconnectionbase.h",
      "test/fakepeerconnectionforstats.h",
      "test/fakeperiodicvideosource.h",
      "test/fakeperiodicvideotracksource.h",
      "test/fakertccertificategenerator.h",
      "test/fakesctptransport.h",
      "test/fakevideotrackrenderer.h",
      "test/fakevideotracksource.h",
      "test/mock_datachannel.h",
      "test/mock_peerconnection.h",
      "test/mock_rtpreceiverinternal.h",
      "test/mock_rtpsenderinternal.h",
      "test/mockpeerconnectionobservers.h",
      "test/peerconnectiontestwrapper.cc",
      "test/peerconnectiontestwrapper.h",
      "test/rtcstatsobtainer.h",
      "test/testsdpstrings.h",
    ]

    deps = [
      ":libjingle_peerconnection",
      ":peerconnection",
      ":rtc_pc_base",
      "..:webrtc_common",
      "../api:libjingle_peerconnection_api",
      "../api:libjingle_peerconnection_test_api",
      "../api:rtc_stats_api",
      "../api/video:video_frame",
      "../api/video_codecs:builtin_video_decoder_factory",
      "../api/video_codecs:builtin_video_encoder_factory",
      "../call:call_interfaces",
      "../logging:rtc_event_log_api",
      "../media:rtc_data",
      "../media:rtc_media",
      "../media:rtc_media_base",
      "../media:rtc_media_tests_utils",
      "../modules/audio_device:audio_device",
      "../modules/audio_processing:audio_processing",
      "../p2p:p2p_test_utils",
      "../rtc_base:checks",
      "../rtc_base:rtc_base",
      "../rtc_base:rtc_base_approved",
      "../rtc_base:rtc_base_tests_utils",
      "../rtc_base:rtc_task_queue",
      "../test:test_support",
    ]

    if (!build_with_chromium && is_clang) {
      # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
    }
  }

  config("peerconnection_unittests_config") {
    # The warnings below are enabled by default. Since GN orders compiler flags
    # for a target before flags from configs, the only way to disable such
    # warnings is by having them in a separate config, loaded from the target.
    # TODO(kjellander): Make the code compile without disabling these flags.
    # See https://bugs.webrtc.org/3307.
    if (is_clang && is_win) {
      cflags = [
        # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
        # for -Wno-sign-compare
        "-Wno-sign-compare",
      ]
    }

    if (!is_win) {
      cflags = [ "-Wno-sign-compare" ]
    }
  }

  rtc_test("peerconnection_unittests") {
    testonly = true
    sources = [
      "datachannel_unittest.cc",
      "dtmfsender_unittest.cc",
      "iceserverparsing_unittest.cc",
      "jsepsessiondescription_unittest.cc",
      "localaudiosource_unittest.cc",
      "mediaconstraintsinterface_unittest.cc",
      "mediastream_unittest.cc",
      "peerconnection_bundle_unittest.cc",
      "peerconnection_crypto_unittest.cc",
      "peerconnection_datachannel_unittest.cc",
      "peerconnection_histogram_unittest.cc",
      "peerconnection_ice_unittest.cc",
      "peerconnection_integrationtest.cc",
      "peerconnection_jsep_unittest.cc",
      "peerconnection_media_unittest.cc",
      "peerconnection_rtp_unittest.cc",
      "peerconnection_signaling_unittest.cc",
      "peerconnectionendtoend_unittest.cc",
      "peerconnectionfactory_unittest.cc",
      "peerconnectioninterface_unittest.cc",
      "peerconnectionwrapper.cc",
      "peerconnectionwrapper.h",
      "proxy_unittest.cc",
      "rtcstats_integrationtest.cc",
      "rtcstatscollector_unittest.cc",
      "rtcstatstraversal_unittest.cc",
      "rtpmediautils_unittest.cc",
      "rtpsenderreceiver_unittest.cc",
      "sctputils_unittest.cc",
      "statscollector_unittest.cc",
      "test/fakeaudiocapturemodule_unittest.cc",
      "test/testsdpstrings.h",
      "trackmediainfomap_unittest.cc",
      "videocapturertracksource_unittest.cc",
      "videotrack_unittest.cc",
      "webrtcsdp_unittest.cc",
    ]

    if (rtc_enable_sctp) {
      defines = [ "HAVE_SCTP" ]
    }

    configs += [ ":peerconnection_unittests_config" ]

    if (!build_with_chromium && is_clang) {
      # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
      suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
    }

    deps = [
      ":peerconnection",
      ":rtc_pc_base",
      "../api:libjingle_peerconnection_api",
      "../api:mock_rtp",
      "../api/units:time_delta",
      "../logging:fake_rtc_event_log",
      "../rtc_base:base64",
      "../rtc_base:checks",
      "../rtc_base:stringutils",
      "../test:fileutils",
    ]
    if (is_android) {
      deps += [ ":android_black_magic" ]
    }

    deps += [
      ":libjingle_peerconnection",
      ":pc_test_utils",
      "..:webrtc_common",
      "../api:callfactory_api",
      "../api:fakemetricsobserver",
      "../api:libjingle_peerconnection_test_api",
      "../api:rtc_stats_api",
      "../api/audio_codecs:audio_codecs_api",
      "../api/audio_codecs:builtin_audio_decoder_factory",
      "../api/audio_codecs:builtin_audio_encoder_factory",
      "../api/audio_codecs/L16:audio_decoder_L16",
      "../api/audio_codecs/L16:audio_encoder_L16",
      "../api/video_codecs:builtin_video_decoder_factory",
      "../api/video_codecs:builtin_video_encoder_factory",
      "../api/video_codecs:video_codecs_api",
      "../call:call_interfaces",
      "../logging:rtc_event_log_api",
      "../logging:rtc_event_log_impl_base",
      "../logging:rtc_event_log_impl_output",
      "../media:rtc_audio_video",
      "../media:rtc_data",  # TODO(phoglund): AFAIK only used for one sctp constant.
      "../media:rtc_media_base",
      "../media:rtc_media_tests_utils",
      "../modules/audio_processing:audio_processing",
      "../modules/utility:utility",
      "../p2p:p2p_test_utils",
      "../p2p:rtc_p2p",
      "../pc:rtc_pc",
      "../rtc_base:rtc_base",
      "../rtc_base:rtc_base_approved",
      "../rtc_base:rtc_base_tests_main",
      "../rtc_base:rtc_base_tests_utils",
      "../rtc_base:rtc_task_queue",
      "../system_wrappers:metrics_default",
      "../system_wrappers:runtime_enabled_features_default",
      "../test:audio_codec_mocks",
      "../test:test_support",
      "//third_party/abseil-cpp/absl/types:optional",
    ]

    if (is_android) {
      deps += [
        "//testing/android/native_test:native_test_support",

        # We need to depend on this one directly, or classloads will fail for
        # the voice engine BuildInfo, for instance.
        "../sdk/android:libjingle_peerconnection_java",
      ]

      shard_timeout = 900
    }
  }

  if (is_android) {
    rtc_source_set("android_black_magic") {
      # The android code uses hacky includes to chromium-base and the ssl code;
      # having this in a separate target enables us to keep the peerconnection
      # unit tests clean.
      check_includes = false
      testonly = true
      sources = [
        "test/androidtestinitializer.cc",
        "test/androidtestinitializer.h",
      ]
      deps = [
        "../sdk/android:libjingle_peerconnection_jni",
        "//testing/android/native_test:native_test_support",
      ]
    }
  }
}
