summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/webcodecs/BUILD.gn
blob: d81e6e1eebd48030127d4010b59f52cc25af3290 (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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Copyright 2019 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("//media/media_options.gni")
import("//third_party/blink/renderer/modules/modules.gni")
import("//third_party/libaom/options.gni")
import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni")
import("//third_party/protobuf/proto_library.gni")

blink_modules_sources("webcodecs") {
  sources = [
    "allow_shared_buffer_source_util.h",
    "audio_data.cc",
    "audio_data.h",
    "audio_data_attachment.cc",
    "audio_data_attachment.h",
    "audio_decoder.cc",
    "audio_decoder.h",
    "audio_decoder_broker.cc",
    "audio_decoder_broker.h",
    "audio_encoder.cc",
    "audio_encoder.h",
    "codec_config_eval.h",
    "codec_logger.cc",
    "codec_logger.h",
    "codec_state_helper.cc",
    "codec_state_helper.h",
    "codec_trace_names.h",
    "decoder_buffer_attachment.cc",
    "decoder_buffer_attachment.h",
    "decoder_selector.cc",
    "decoder_selector.h",
    "decoder_template.cc",
    "decoder_template.h",
    "encoded_audio_chunk.cc",
    "encoded_audio_chunk.h",
    "encoded_video_chunk.cc",
    "encoded_video_chunk.h",
    "encoder_base.cc",
    "encoder_base.h",
    "gpu_factories_retriever.cc",
    "gpu_factories_retriever.h",
    "hardware_preference.cc",
    "hardware_preference.h",
    "image_decoder_core.cc",
    "image_decoder_core.h",
    "image_decoder_external.cc",
    "image_decoder_external.h",
    "image_track.cc",
    "image_track.h",
    "image_track_list.cc",
    "image_track_list.h",
    "parsed_copy_to_options.cc",
    "parsed_copy_to_options.h",
    "reclaimable_codec.cc",
    "reclaimable_codec.h",
    "video_color_space.cc",
    "video_color_space.h",
    "video_decoder.cc",
    "video_decoder.h",
    "video_decoder_broker.cc",
    "video_decoder_broker.h",
    "video_encoder.cc",
    "video_encoder.h",
    "video_frame.cc",
    "video_frame.h",
    "video_frame_attachment.cc",
    "video_frame_attachment.h",
    "video_frame_handle.cc",
    "video_frame_handle.h",
    "video_frame_init_util.cc",
    "video_frame_init_util.h",
    "video_frame_monitor.cc",
    "video_frame_monitor.h",
    "video_frame_rect_util.cc",
    "video_frame_rect_util.h",
    "video_frame_transfer_list.cc",
    "video_frame_transfer_list.h",
    "webcodecs_logger.cc",
    "webcodecs_logger.h",
  ]
  jumbo_excluded_sources = [ "video_decoder_broker.cc" ]
  deps = [
    "//build:os_buildflags",
    "//media",
    "//media/mojo:buildflags",
    "//media/mojo/clients",
    "//media/mojo/mojom",
    "//third_party/libaom:libaom_buildflags",
    "//third_party/libyuv:libyuv",
    "//third_party/opus",
  ]
  if (enable_libaom) {
    deps += [ "//third_party/libaom" ]
  }
  if (media_use_libvpx) {
    deps += [ "//third_party/libvpx" ]
  }
  if (media_use_openh264) {
    deps += [ "//third_party/openh264:encoder" ]
  }
  public_deps = [ "//third_party/blink/renderer/modules/webaudio:webaudio" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "audio_data_test.cc",
    "audio_decoder_broker_test.cc",
    "audio_encoder_test.cc",
    "decoder_selector_test.cc",
    "decoder_template_test.cc",
    "encoded_video_chunk_test.cc",
    "image_decoder_external_test.cc",
    "reclaimable_codec_test.cc",
    "video_decoder_broker_test.cc",
    "video_encoder_test.cc",
    "video_frame_monitor_test.cc",
    "video_frame_test.cc",
  ]

  configs += [
    "//third_party/blink/renderer:config",
    "//third_party/blink/renderer:inside_blink",
    "//third_party/blink/renderer/core:blink_core_pch",
  ]

  deps = [
    "//base/test:test_support",
    "//gpu/command_buffer/common",
    "//media:test_support",
    "//media/mojo/services:services",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public:test_headers",
    "//third_party/blink/renderer/controller:blink_bindings_test_sources",
    "//third_party/blink/renderer/core:testing",
    "//third_party/blink/renderer/modules",
    "//third_party/blink/renderer/platform",
    "//third_party/blink/renderer/platform:test_support",
    "//third_party/blink/renderer/platform/wtf",
    "//third_party/libyuv",
  ]

  data = [ "//third_party/blink/web_tests/images/resources/" ]
}

fuzzable_proto_library("fuzzer_protos") {
  generate_python = true
  sources = [ "fuzzer_inputs.proto" ]
}