chromium/media/gpu/sandbox/BUILD.gn

# Copyright 2021 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/chromeos/ui_mode.gni")
import("//media/gpu/args.gni")

source_set("sandbox") {
  sources = []
  if (is_linux || is_chromeos_ash) {
    sources += [
      "hardware_video_decoding_sandbox_hook_linux.cc",
      "hardware_video_decoding_sandbox_hook_linux.h",
    ]
  }
  if (is_linux || is_chromeos) {
    sources += [
      "hardware_video_encoding_sandbox_hook_linux.cc",
      "hardware_video_encoding_sandbox_hook_linux.h",
    ]
  }
  deps = [
    "//base",
    "//media/gpu:buildflags",
    "//sandbox/policy:policy",
  ]
  if (use_vaapi) {
    deps += [ "//media/gpu/vaapi:common" ]
  }
  if (use_v4l2_codec) {
    deps += [ "//media/gpu/v4l2" ]
  }
  if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
      !is_castos) {
    # For DRI_DRIVER_DIR.
    configs += [ "//build/config/linux/dri" ]
  }
}