chromium/chromecast/media/common/BUILD.gn

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

# Common modules that do not have any //media dependencies.

import("//build/buildflag_header.gni")
import("//build/config/cast.gni")
import("//chromecast/chromecast.gni")

group("all") {
  public_deps = [
    ":media_pipeline_backend_manager",
    ":media_resource_tracker",
    "//chromecast/media/common/base",
  ]
}

cast_source_set("media_pipeline_backend_manager") {
  sources = [
    "audio_decoder_software_wrapper.cc",
    "audio_decoder_software_wrapper.h",
    "audio_decoder_wrapper.cc",
    "audio_decoder_wrapper.h",
    "media_pipeline_backend_manager.cc",
    "media_pipeline_backend_manager.h",
    "media_pipeline_backend_wrapper.cc",
    "media_pipeline_backend_wrapper.h",
    "video_decoder_wrapper.cc",
    "video_decoder_wrapper.h",
  ]

  public_deps = [
    "//chromecast/media/api",
    "//chromecast/public",
    "//chromecast/public/media",
  ]

  deps = [
    ":media_resource_tracker",
    "//base",
    "//chromecast:chromecast_buildflags",
    "//chromecast/base/metrics:metrics",
    "//chromecast/media/common/base",
  ]

  assert_no_deps = [ "//media" ]
}

cast_source_set("media_resource_tracker") {
  sources = [
    "media_resource_tracker.cc",
    "media_resource_tracker.h",
  ]

  deps = [
    "//base",
    "//chromecast/base",
  ]

  assert_no_deps = [ "//media" ]
}

cast_source_set("test_media_resource_tracker") {
  sources = [
    "test_media_resource_tracker.cc",
    "test_media_resource_tracker.h",
  ]
  deps = [
    ":media_resource_tracker",
    "//base",
    "//testing/gmock",
    "//testing/gtest",
  ]
  testonly = true
  assert_no_deps = [ "//media" ]
}