# Copyright 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_ios) {
  import("//build/config/ios/rules.gni")
}

declare_args() {
  # Determine whether or not to include metal rendering
  rtc_use_metal_rendering = is_mac || (is_ios && current_cpu == "arm64")
}

group("sdk") {
  if (!build_with_chromium && is_ios) {
    public_deps = [
      ":objc_framework",
    ]
  }
}

if (is_ios || is_mac) {
  config("objc_common_config") {
    include_dirs = [
      "objc/Framework/Classes",
      "objc/Framework/Classes/Audio",
      "objc/Framework/Classes/Common",
      "objc/Framework/Classes/Metal",
      "objc/Framework/Classes/PeerConnection",
      "objc/Framework/Classes/UI",
      "objc/Framework/Classes/Video",
      "objc/Framework/Classes/VideoToolbox",
      "objc/Framework/Headers",
    ]
  }

  rtc_static_library("objc_common") {
    sources = [
      "objc/Framework/Classes/Common/NSString+StdString.h",
      "objc/Framework/Classes/Common/NSString+StdString.mm",
      "objc/Framework/Classes/Common/RTCDispatcher+Private.h",
      "objc/Framework/Classes/Common/RTCDispatcher.m",
      "objc/Framework/Classes/Common/RTCFieldTrials.mm",
      "objc/Framework/Classes/Common/RTCLogging.mm",
      "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h",
      "objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m",
      "objc/Framework/Classes/Common/helpers.h",
      "objc/Framework/Classes/Common/helpers.mm",
      "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
      "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
      "objc/Framework/Headers/WebRTC/RTCLogging.h",
      "objc/Framework/Headers/WebRTC/RTCMacros.h",
    ]

    deps = [
      "../base:rtc_base",
    ]
    configs += [ "..:common_objc" ]

    public_configs = [ ":objc_common_config" ]

    if (is_ios) {
      sources += [
        "objc/Framework/Classes/Common/UIDevice+RTCDevice.mm",
        "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
      ]
    }

    if (!build_with_chromium) {
      sources += [
        "objc/Framework/Classes/Common/RTCFileLogger.mm",
        "objc/Framework/Headers/WebRTC/RTCFileLogger.h",
      ]
    }
  }

  if (!build_with_chromium) {
    rtc_static_library("objc_audio") {
      sources = [
        "objc/Framework/Classes/Audio/RTCAudioSession+Configuration.mm",
        "objc/Framework/Classes/Audio/RTCAudioSession+Private.h",
        "objc/Framework/Classes/Audio/RTCAudioSession.mm",
        "objc/Framework/Classes/Audio/RTCAudioSessionConfiguration.m",
        "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
        "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
      ]
      configs += [ "..:common_objc" ]

      deps = [
        ":objc_common",
        "../base:rtc_base_approved",
      ]

      if (is_clang) {
        # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
        suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
      }
    }
    rtc_static_library("objc_video") {
      sources = [
        "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.h",
        "objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.mm",
        "objc/Framework/Classes/Video/RTCDefaultShader.h",
        "objc/Framework/Classes/Video/RTCDefaultShader.mm",
        "objc/Framework/Classes/Video/RTCI420TextureCache.h",
        "objc/Framework/Classes/Video/RTCI420TextureCache.mm",
        "objc/Framework/Classes/Video/RTCOpenGLDefines.h",
        "objc/Framework/Classes/Video/RTCShader.h",
        "objc/Framework/Classes/Video/RTCShader.mm",
        "objc/Framework/Classes/Video/avfoundationformatmapper.h",
        "objc/Framework/Classes/Video/avfoundationformatmapper.mm",
        "objc/Framework/Classes/Video/avfoundationvideocapturer.h",
        "objc/Framework/Classes/Video/avfoundationvideocapturer.mm",
        "objc/Framework/Classes/Video/objcvideotracksource.h",
        "objc/Framework/Classes/Video/objcvideotracksource.mm",
      ]
      libs = []
      if (is_ios) {
        sources += [
          "objc/Framework/Classes/Video/RTCNV12TextureCache.h",
          "objc/Framework/Classes/Video/RTCNV12TextureCache.m",
        ]
        libs += [
          "GLKit.framework",
          "OpenGLES.framework",
          "QuartzCore.framework",
        ]
      } else if (is_mac) {
        sources += []

        libs += [
          "CoreMedia.framework",
          "CoreVideo.framework",
          "OpenGL.framework",
        ]
      }

      deps = [
        ":objc_common",
        ":objc_corevideoframebuffer",
        ":objc_videotoolbox",
        "../api:libjingle_peerconnection_api",
        "../base:rtc_base",
        "../common_video",
        "../media:rtc_media_base",
      ]

      configs += [ "..:common_objc" ]
      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_static_library("objc_ui") {
      if (is_ios) {
        sources = [
          "objc/Framework/Classes/UI/RTCCameraPreviewView.m",
          "objc/Framework/Classes/UI/RTCEAGLVideoView.m",
          "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
          "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
        ]
      }
      if (is_mac) {
        sources = [
          "objc/Framework/Classes/UI/RTCNSGLVideoView.m",
          "objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
        ]
      }
      configs += [ "..:common_objc" ]
      deps = [
        ":objc_common",
        ":objc_peerconnection",
      ]
    }

    if (rtc_use_metal_rendering) {
      rtc_static_library("objc_metal") {
        sources = [
          "objc/Framework/Classes/Metal/RTCMTLI420Renderer.h",
          "objc/Framework/Classes/Metal/RTCMTLI420Renderer.mm",
          "objc/Framework/Classes/Metal/RTCMTLRenderer+Private.h",
          "objc/Framework/Classes/Metal/RTCMTLRenderer.h",
          "objc/Framework/Classes/Metal/RTCMTLRenderer.mm",
        ]
        if (is_ios) {
          sources += [
            "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h",
            "objc/Framework/Classes/Metal/RTCMTLNV12Renderer.mm",
            "objc/Framework/Classes/Metal/RTCMTLVideoView.m",
            "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h",
          ]
        }
        if (is_mac) {
          sources += [
            "objc/Framework/Classes/Metal/RTCMTLNSVideoView.m",
            "objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
          ]
        }
        libs = [
          "CoreVideo.framework",
          "Metal.framework",
          "MetalKit.framework",
        ]
        deps = [
          ":objc_video",
          "../api:video_frame_api",
          "../base:rtc_base_approved",
        ]
        configs += [ "..:common_objc" ]
        public_configs = [ ":objc_common_config" ]
      }
    }

    rtc_static_library("objc_peerconnection") {
      sources = [
        "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCAVFoundationVideoSource.mm",
        "objc/Framework/Classes/PeerConnection/RTCAudioSource+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCAudioSource.mm",
        "objc/Framework/Classes/PeerConnection/RTCAudioTrack+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCAudioTrack.mm",
        "objc/Framework/Classes/PeerConnection/RTCCameraVideoCapturer.m",
        "objc/Framework/Classes/PeerConnection/RTCConfiguration+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCConfiguration.mm",
        "objc/Framework/Classes/PeerConnection/RTCDataChannel+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCDataChannel.mm",
        "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCDataChannelConfiguration.mm",
        "objc/Framework/Classes/PeerConnection/RTCIceCandidate+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCIceCandidate.mm",
        "objc/Framework/Classes/PeerConnection/RTCIceServer+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCIceServer.mm",
        "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCLegacyStatsReport.mm",
        "objc/Framework/Classes/PeerConnection/RTCMediaConstraints+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCMediaConstraints.mm",
        "objc/Framework/Classes/PeerConnection/RTCMediaSource+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCMediaSource.mm",
        "objc/Framework/Classes/PeerConnection/RTCMediaStream+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCMediaStream.mm",
        "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCMediaStreamTrack.mm",
        "objc/Framework/Classes/PeerConnection/RTCMetrics.mm",
        "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCMetricsSampleInfo.mm",
        "objc/Framework/Classes/PeerConnection/RTCPeerConnection+DataChannel.mm",
        "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCPeerConnection+Stats.mm",
        "objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm",
        "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm",
        "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCRtpCodecParameters.mm",
        "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCRtpEncodingParameters.mm",
        "objc/Framework/Classes/PeerConnection/RTCRtpParameters+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCRtpParameters.mm",
        "objc/Framework/Classes/PeerConnection/RTCRtpReceiver+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCRtpReceiver.mm",
        "objc/Framework/Classes/PeerConnection/RTCRtpSender+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCRtpSender.mm",
        "objc/Framework/Classes/PeerConnection/RTCSSLAdapter.mm",
        "objc/Framework/Classes/PeerConnection/RTCSessionDescription+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCSessionDescription.mm",
        "objc/Framework/Classes/PeerConnection/RTCTracing.mm",
        "objc/Framework/Classes/PeerConnection/RTCVideoCapturer.m",
        "objc/Framework/Classes/PeerConnection/RTCVideoFrame+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCVideoFrame.mm",
        "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.h",
        "objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.mm",
        "objc/Framework/Classes/PeerConnection/RTCVideoSource+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCVideoSource.mm",
        "objc/Framework/Classes/PeerConnection/RTCVideoTrack+Private.h",
        "objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm",
        "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
        "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
        "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
        "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
        "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
        "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
        "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
        "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
        "objc/Framework/Headers/WebRTC/RTCIceServer.h",
        "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
        "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
        "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
        "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
        "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
        "objc/Framework/Headers/WebRTC/RTCMetrics.h",
        "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
        "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
        "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
        "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
        "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
        "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
        "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
        "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
        "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
        "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
        "objc/Framework/Headers/WebRTC/RTCTracing.h",
        "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
        "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
        "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
        "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
        "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
        "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
      ]
      if (is_ios) {
        sources += [
          "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.h",
          "objc/Framework/Classes/PeerConnection/RTCFileVideoCapturer.m",
        ]
      }
      libs = [ "AVFoundation.framework" ]

      if (is_ios) {
        libs += [ "CoreGraphics.framework" ]
      }

      configs += [ "..:common_objc" ]

      public_configs = [ ":objc_common_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 = [
        ":objc_common",
        ":objc_corevideoframebuffer",
        ":objc_video",
        "../api:video_frame_api",
        "../base:rtc_base",
        "../media:rtc_media_base",
        "../pc:libjingle_peerconnection",
      ]

      if (rtc_use_metal_rendering) {
        deps += [ ":objc_metal" ]
      }

      if (rtc_build_libyuv) {
        deps += [ "$rtc_libyuv_dir" ]
        public_deps = [
          "$rtc_libyuv_dir",
        ]
      }
    }

    if (rtc_include_tests) {
      rtc_source_set("objc_sdk_unittests") {
        testonly = true

        # Skip restricting visibility on mobile platforms since the tests on those
        # gets additional generated targets which would require many lines here to
        # cover (which would be confusing to read and hard to maintain).
        if (!is_android && !is_ios) {
          visibility = [ "..:rtc_unittests" ]
        }
        sources = [
          "objc/Framework/UnitTests/RTCCameraVideoCapturerTests.mm",
          "objc/Framework/UnitTests/RTCConfigurationTest.mm",
          "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
          "objc/Framework/UnitTests/RTCIceCandidateTest.mm",
          "objc/Framework/UnitTests/RTCIceServerTest.mm",
          "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
          "objc/Framework/UnitTests/RTCPeerConnectionTest.mm",
          "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
          "objc/Framework/UnitTests/avformatmappertests.mm",
        ]

        # |-ObjC| flag needed to make sure category method implementations
        # are included:
        # https://developer.apple.com/library/mac/qa/qa1490/_index.html
        ldflags = [ "-ObjC" ]

        defines = [ "GTEST_RELATIVE_PATH" ]
        deps = [
          ":objc_peerconnection",
          "..//system_wrappers:system_wrappers_default",
          "../base:rtc_base_tests_utils",
          "../system_wrappers:system_wrappers_default",
          "//third_party/ocmock",
        ]

        if (is_ios) {
          sources += [ "objc/Framework/UnitTests/RTCAudioSessionTest.mm" ]

          # RTCMTLVideoView not supported on 32-bit arm
          if (current_cpu != "arm") {
            sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ]
            if (current_cpu != "arm64") {
              # Only include this file on simulator, as it's already
              # included in device builds.
              sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ]
              libs = [ "CoreVideo.framework" ]
            }
          }
        }
        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_ios) {
      ios_framework_bundle("objc_framework") {
        info_plist = "objc/Framework/Info.plist"
        output_name = "WebRTC"

        common_objc_headers = [
          "objc/Framework/Headers/WebRTC/RTCAudioSession.h",
          "objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h",
          "objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
          "objc/Framework/Headers/WebRTC/RTCAudioSource.h",
          "objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
          "objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h",
          "objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
          "objc/Framework/Headers/WebRTC/RTCConfiguration.h",
          "objc/Framework/Headers/WebRTC/RTCDataChannel.h",
          "objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
          "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
          "objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
          "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
          "objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
          "objc/Framework/Headers/WebRTC/RTCIceServer.h",
          "objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
          "objc/Framework/Headers/WebRTC/RTCLogging.h",
          "objc/Framework/Headers/WebRTC/RTCMacros.h",
          "objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
          "objc/Framework/Headers/WebRTC/RTCMediaSource.h",
          "objc/Framework/Headers/WebRTC/RTCMediaStream.h",
          "objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
          "objc/Framework/Headers/WebRTC/RTCMetrics.h",
          "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
          "objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
          "objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
          "objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
          "objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
          "objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
          "objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
          "objc/Framework/Headers/WebRTC/RTCRtpSender.h",
          "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
          "objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
          "objc/Framework/Headers/WebRTC/RTCTracing.h",
          "objc/Framework/Headers/WebRTC/RTCVideoCapturer.h",
          "objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
          "objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
          "objc/Framework/Headers/WebRTC/RTCVideoSource.h",
          "objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
          "objc/Framework/Headers/WebRTC/RTCVideoViewShading.h",
          "objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
          "objc/Framework/Headers/WebRTC/WebRTC.h",
        ]
        if (rtc_use_metal_rendering) {
          common_objc_headers +=
              [ "objc/Framework/Headers/WebRTC/RTCMTLVideoView.h" ]
        }
        sources = common_objc_headers
        public_headers = common_objc_headers

        if (!build_with_chromium) {
          sources += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
          public_headers += [ "objc/Framework/Headers/WebRTC/RTCFileLogger.h" ]
        }

        ldflags = [
          "-all_load",
          "-install_name",
          "@rpath/$output_name.framework/$output_name",
        ]

        deps = [
          ":objc_audio",
          ":objc_peerconnection",
          ":objc_ui",
          "../base:rtc_base_approved",
          "../system_wrappers:field_trial_default",
          "../system_wrappers:metrics_default",
        ]

        libs = [
          "AVFoundation.framework",
          "CoreGraphics.framework",
          "CoreMedia.framework",
          "GLKit.framework",
        ]

        configs += [ "..:common_objc" ]

        public_configs = [ ":objc_common_config" ]

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

    rtc_static_library("rtc_sdk_objc") {
      complete_static_lib = true
      deps = [
        ":objc_peerconnection",
        ":objc_ui",
        "../system_wrappers:field_trial_default",
        "../system_wrappers:metrics_default",
      ]
    }

    rtc_static_library("objc_corevideoframebuffer") {
      sources = [
        "objc/Framework/Classes/Video/corevideo_frame_buffer.cc",
        "objc/Framework/Classes/Video/corevideo_frame_buffer.h",
      ]

      deps = [
        "../base:rtc_base_approved",
        "../common_video",
      ]

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

      libs = [ "CoreVideo.framework" ]
    }

    rtc_static_library("objc_videotoolbox") {
      sources = [
        "objc/Framework/Classes/VideoToolbox/decoder.h",
        "objc/Framework/Classes/VideoToolbox/decoder.mm",
        "objc/Framework/Classes/VideoToolbox/encoder.h",
        "objc/Framework/Classes/VideoToolbox/encoder.mm",
        "objc/Framework/Classes/VideoToolbox/nalu_rewriter.cc",
        "objc/Framework/Classes/VideoToolbox/nalu_rewriter.h",
        "objc/Framework/Classes/VideoToolbox/videocodecfactory.h",
        "objc/Framework/Classes/VideoToolbox/videocodecfactory.mm",
      ]

      configs += [ "..:common_objc" ]

      deps = [
        ":objc_common",
        ":objc_corevideoframebuffer",
        "../base:rtc_base_approved",
        "../common_video",
        "../media:rtc_media",
        "../media:rtc_media_base",
        "../modules:module_api",
        "../modules/video_coding:video_coding_utility",
        "../modules/video_coding:webrtc_h264",
        "../system_wrappers",
      ]

      libs = [
        "CoreFoundation.framework",
        "CoreMedia.framework",
        "CoreVideo.framework",
        "VideoToolbox.framework",
      ]

      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 (rtc_build_libyuv) {
        deps += [ "$rtc_libyuv_dir" ]
        public_deps = [
          "$rtc_libyuv_dir",
        ]
      } else {
        # Need to add a directory normally exported by libyuv.
        include_dirs = [ "$rtc_libyuv_dir/include" ]
      }
    }
  }
}
