summaryrefslogtreecommitdiffstats
path: root/chromecast/media/base/BUILD.gn
blob: 48a92532b8ee54b625e93ce27feaa5572c1dd643 (plain)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chromecast/chromecast.gni")

source_set("message_loop") {
  sources = [
    "media_message_loop.cc",
    "media_message_loop.h",
    "video_plane_controller.cc",
    "video_plane_controller.h",
  ]

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

  deps = [
    "//base",
    "//chromecast/media/base:libcast_media_1.0",
    "//chromecast/public",
  ]
}

source_set("key_systems") {
  sources = [
    "key_systems_common.cc",
    "key_systems_common.h",
  ]

  if (use_playready) {
    public_configs = [ "//chromecast:playready_config" ]
  }

  deps = [
    "//base",
    "//chromecast/public/media",
    "//media",
    "//third_party/widevine/cdm:version_h",
  ]
}

source_set("base") {
  sources = [
    "decrypt_context_impl.cc",
    "decrypt_context_impl.h",
    "decrypt_context_impl_clearkey.cc",
    "decrypt_context_impl_clearkey.h",
    "media_caps.cc",
    "media_caps.h",
    "media_codec_support.cc",
    "media_codec_support.h",
    "media_resource_tracker.cc",
    "media_resource_tracker.h",
  ]

  public_deps = [
    ":key_systems",
    ":message_loop",
    "//chromecast/public/media",
  ]

  deps = [
    ":libcast_media_1.0",
    "//base",
    "//chromecast/base",
    "//crypto",
    "//crypto:platform",
    "//net",
  ]

  if (chromecast_branding == "public") {
    sources += [ "key_systems_common_simple.cc" ]
  } else {
    deps += [ "//chromecast/internal/media/base" ]
  }
}

# Target for OEM partners to override media shared library, i.e.
# libcast_media_1.0.so. This target is only used to build executables
# with correct linkage information.
shared_library("libcast_media_1.0") {
  sources = [
    "cast_media_dummy.cc",
  ]

  public_deps = [
    "//chromecast/public",
  ]
}

# This target can be statically linked into unittests, but production
# binaries should not depend on this target.
source_set("libcast_media_1.0_default_core") {
  sources = [
    "cast_media_default.cc",
  ]

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

  deps = [
    "//base",
    "//build/config/sanitizers:deps",
    "//chromecast/base",
    "//chromecast/media/cma/backend",
  ]
}

# Default implementation of libcast_media_1.0.so.
# TODO(slan): Make this target a loadable_module (crbug/380327)
shared_library("libcast_media_1.0_default") {
  # Note that it cannot depend on libcast_media_1.0_default_core since a
  # loadable_module include only symbols necessary for source files.
  # So, it should include top-level .cc, here cast_media_default.cc explicitly.
  sources = [
    "cast_media_default.cc",
  ]

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

  deps = [
    "//base",
    "//build/config/sanitizers:deps",
    "//chromecast/base",
    "//chromecast/media/cma/backend",
  ]
}