1# Copyright 2015 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/buildflag_header.gni")
6import("//chromecast/chromecast.gni")
7import("//third_party/widevine/cdm/widevine.gni")
8
9buildflag_header("buildflags") {
10  header = "buildflags.h"
11
12  flags = [ "MEDIA_CLOCK_MONOTONIC_RAW=$media_clock_monotonic_raw" ]
13}
14
15cast_source_set("key_systems") {
16  sources = [
17    "key_systems_common.cc",
18    "key_systems_common.h",
19  ]
20
21  deps = [
22    "//base",
23    "//chromecast:chromecast_buildflags",
24    "//chromecast/public/media",
25    "//third_party/widevine/cdm:buildflags",
26  ]
27
28  if (enable_widevine) {
29    deps += [ "//third_party/widevine/cdm:headers" ]
30  }
31
32  assert_no_deps = [ "//media" ]
33}
34
35cast_source_set("base") {
36  sources = [
37    "aligned_buffer.h",
38    "audio_device_ids.cc",
39    "audio_device_ids.h",
40    "cast_decoder_buffer_impl.cc",
41    "cast_decoder_buffer_impl.h",
42    "decrypt_context_impl.cc",
43    "decrypt_context_impl.h",
44    "media_caps.cc",
45    "media_caps.h",
46    "supported_codec_profile_levels_memo.cc",
47    "supported_codec_profile_levels_memo.h",
48    "video_mode_switcher.cc",
49    "video_mode_switcher.h",
50  ]
51
52  if (!is_android) {
53    sources += [
54      "video_resolution_policy.cc",
55      "video_resolution_policy.h",
56    ]
57  }
58
59  public_deps = [
60    ":key_systems",
61    "//chromecast/public/media",
62  ]
63
64  deps = [
65    "//base",
66    "//chromecast/base",
67    "//chromecast/media/api",
68    "//ui/gfx/geometry",
69  ]
70
71  assert_no_deps = [ "//media" ]
72}
73
74cast_source_set("media_resource_tracker") {
75  sources = [
76    "media_resource_tracker.cc",
77    "media_resource_tracker.h",
78  ]
79
80  deps = [
81    "//base",
82    "//chromecast/base",
83    "//chromecast/media:libcast_media",
84  ]
85}
86
87cast_source_set("media_codec_support") {
88  sources = [
89    "media_codec_support.cc",
90    "media_codec_support.h",
91  ]
92
93  public_deps = [ "//chromecast/public/media" ]
94
95  deps = [
96    "//base",
97    "//media",
98  ]
99}
100
101cast_source_set("slew_volume") {
102  sources = [
103    "slew_volume.cc",
104    "slew_volume.h",
105  ]
106
107  deps = [
108    "//base",
109    "//media",
110  ]
111}
112
113cast_source_set("video_plane_controller") {
114  sources = [
115    "video_plane_controller.cc",
116    "video_plane_controller.h",
117  ]
118
119  public_deps = [ "//chromecast/public" ]
120
121  deps = [
122    "//base",
123    "//chromecast/media:libcast_media",
124    "//ui/gfx",
125    "//ui/gfx/geometry",
126  ]
127}
128
129cast_source_set("monotonic_clock") {
130  sources = [
131    "default_monotonic_clock.cc",
132    "default_monotonic_clock.h",
133  ]
134  deps = [
135    ":buildflags",
136    "//base",
137    "//chromecast/media/api:api",
138  ]
139}
140
141cast_source_set("test_media_resource_tracker") {
142  sources = [
143    "test_media_resource_tracker.cc",
144    "test_media_resource_tracker.h",
145  ]
146  deps = [
147    ":media_resource_tracker",
148    "//base",
149    "//testing/gmock",
150    "//testing/gtest",
151  ]
152  testonly = true
153}
154