summaryrefslogtreecommitdiff
path: root/chromium/media/base/win/BUILD.gn
blob: b4a7cb764a18d964d88468a69a9461bba2b63961 (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
# 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.

assert(is_win)

config("delay_load_mf") {
  ldflags = [
    "/DELAYLOAD:mf.dll",
    "/DELAYLOAD:mfplat.dll",
    "/DELAYLOAD:mfreadwrite.dll",
  ]
}

component("media_foundation_util") {
  defines = [ "MF_INITIALIZER_IMPLEMENTATION" ]
  sources = [
    "mf_helpers.cc",
    "mf_helpers.h",
    "mf_initializer.cc",
    "mf_initializer.h",
    "mf_initializer_export.h",
  ]
  configs += [
    # TODO(crbug.com/167187): Fix size_t to int truncations.
    "//build/config/compiler:no_size_t_to_int_warning",
    "//media:media_config",
  ]
  deps = [
    "//base",
    "//media:shared_memory_support",
  ]
  libs = [
    "mf.lib",
    "mfplat.lib",
    "mfreadwrite.lib",
  ]

  # MediaFoundation is not available on Windows N, so must be delay loaded.
  all_dependent_configs = [ ":delay_load_mf" ]
}

source_set("hresult_status_helper") {
  sources = [
    "hresult_status_helper.cc",
    "hresult_status_helper.h",
  ]
  deps = [ "//media" ]
}

source_set("mf_cdm_proxy") {
  sources = [ "mf_cdm_proxy.h" ]
  deps = [ "//base" ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "d3d11_mocks.cc",
    "d3d11_mocks.h",
    "mf_mocks.cc",
    "mf_mocks.h",
    "test_utils.h",
  ]
  deps = [
    "//base",
    "//testing/gmock",
    "//testing/gtest",
  ]
}