blob: b3442be5d58758894496b3e528fc309181992254 [file] [log] [blame]
# 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",
]
deps = [
"//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_core_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" ]
}