chromium/chromecast/media/cma/backend/video/BUILD.gn

# Copyright 2018 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/cast.gni")
import("//chromecast/chromecast.gni")
import("//media/media_options.gni")

declare_args() {
  cast_static_videodecoderformixer_lib_target = ""
}

cast_source_set("av_sync_video") {
  sources = [
    "av_sync_video.cc",
    "av_sync_video.h",
  ]
  deps = [
    "//base",
    "//chromecast/base",
    "//chromecast/media/audio:rate_adjuster",
    "//chromecast/media/cma/backend:for_mixer_audio",
    "//chromecast/public",
    "//chromecast/public/media",
  ]
}

cast_source_set("cast_media_shlib_common") {
  sources = [ "cast_media_shlib_common.cc" ]
  deps = [
    "//base",
    "//chromecast/public/media",
  ]
}

cast_source_set("cast_media_shlib_default") {
  sources = [ "cast_media_shlib_default.cc" ]
  deps = [
    ":cast_media_shlib_common",
    "//base",
    "//chromecast/base",
    "//chromecast/media/cma/backend:for_mixer_audio",
    "//chromecast/public",
  ]
}

cast_source_set("libcast_media_1.0_avsync") {
  deps = [
    ":av_sync_video",
    ":cast_media_shlib_default",
    "//chromecast/base",
    "//chromecast/media/cma/backend:for_mixer_audio",
    "//chromecast/public/media",
    "//media",
  ]

  if (cast_static_videodecoderformixer_lib_target != "") {
    deps += [ "$cast_static_videodecoderformixer_lib_target" ]
  }

  if (use_alsa) {
    deps += [ "//chromecast/media/cma/backend/alsa:volume_control" ]
    if (cast_static_videodecoderformixer_lib_target == "") {
      libs = [ "videodecoderformixer" ]
    }
  }

  if (is_fuchsia) {
    deps += [ "//chromecast/media/cma/backend:null_video" ]
  }
}