1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103

media / gpu / mac / BUILD.gn [blame]

# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//media/gpu/args.gni")
import("//media/media_options.gni")
import("//ui/gl/features.gni")

assert(is_apple)

if (is_mac) {
  import("//build/config/mac/mac_sdk.gni")
}

source_set("mac") {
  defines = [ "MEDIA_GPU_IMPLEMENTATION" ]
  visibility = [ "//media/gpu" ]

  sources = [
    "video_toolbox_av1_accelerator.cc",
    "video_toolbox_av1_accelerator.h",
    "video_toolbox_decompression_metadata.cc",
    "video_toolbox_decompression_metadata.h",
    "video_toolbox_decompression_session.cc",
    "video_toolbox_decompression_session.h",
    "video_toolbox_decompression_session_manager.h",
    "video_toolbox_decompression_session_manager.mm",
    "video_toolbox_frame_converter.cc",
    "video_toolbox_frame_converter.h",
    "video_toolbox_h264_accelerator.cc",
    "video_toolbox_h264_accelerator.h",
    "video_toolbox_output_queue.cc",
    "video_toolbox_output_queue.h",
    "video_toolbox_video_decoder.cc",
    "video_toolbox_video_decoder.h",
    "video_toolbox_vp9_accelerator.cc",
    "video_toolbox_vp9_accelerator.h",
    "vt_config_util.h",
    "vt_config_util.mm",
    "vt_video_encode_accelerator_mac.h",
    "vt_video_encode_accelerator_mac.mm",
  ]
  if (enable_hevc_parser_and_hw_decoder) {
    sources += [
      "video_toolbox_h265_accelerator.cc",
      "video_toolbox_h265_accelerator.h",
    ]
  }
  public_deps = [ "//third_party/webrtc_overrides:webrtc_component" ]
  frameworks = [
    "CoreFoundation.framework",
    "CoreMedia.framework",
    "Foundation.framework",
    "IOSurface.framework",
    "QuartzCore.framework",
    "VideoToolbox.framework",
  ]
  deps = [
    "//base",
    "//components/crash/core/common:crash_key",
    "//components/viz/common:shared_image_format",
    "//gpu/command_buffer/service",
    "//gpu/command_buffer/service:gles2",
    "//gpu/ipc/service",
    "//media",
    "//media/gpu:common",
    "//ui/gfx/geometry",
    "//ui/gl",
  ]
}

source_set("unit_tests") {
  testonly = true
  frameworks = [
    "CoreFoundation.framework",
    "CoreMedia.framework",
  ]
  deps = [
    "//base/test:test_support",
    "//media:test_support",
    "//media/gpu:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (media_use_ffmpeg) {
    deps += [ "//third_party/ffmpeg" ]
  }

  sources = [
    "video_toolbox_av1_accelerator_unittest.cc",
    "video_toolbox_decompression_session_manager_unittest.cc",
    "video_toolbox_h264_accelerator_unittest.cc",
    "video_toolbox_output_queue_unittest.cc",
    "video_toolbox_vp9_accelerator_unittest.cc",
    "vt_config_util_unittest.mm",
  ]
  if (enable_hevc_parser_and_hw_decoder) {
    sources += [ "video_toolbox_h265_accelerator_unittest.cc" ]
  }
}