blob: d2e14a3d5240658f461892715b9f89a346f67866 [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/libprotobuf-mutator/fuzzable_proto_library.gni")
import("//third_party/protobuf/proto_library.gni")
blink_modules_sources("webcodecs") {
sources = [
"audio_decoder.cc",
"audio_decoder.h",
"audio_decoder_broker.cc",
"audio_decoder_broker.h",
"audio_encoder.cc",
"audio_encoder.h",
"audio_frame.cc",
"audio_frame.h",
"audio_frame_serialization_data.cc",
"audio_frame_serialization_data.h",
"codec_config_eval.h",
"codec_logger.cc",
"codec_logger.h",
"codec_state_helper.cc",
"codec_state_helper.h",
"decoder_selector.cc",
"decoder_selector.h",
"decoder_template.cc",
"decoder_template.h",
"encoded_audio_chunk.cc",
"encoded_audio_chunk.h",
"encoded_audio_metadata.h",
"encoded_video_chunk.cc",
"encoded_video_chunk.h",
"encoded_video_metadata.h",
"encoder_base.cc",
"encoder_base.h",
"hardware_preference.cc",
"hardware_preference.h",
"image_decoder_external.cc",
"image_decoder_external.h",
"plane.cc",
"plane.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_logger.cc",
"video_frame_logger.h",
"video_track_reader.cc",
"video_track_reader.h",
"video_track_writer.cc",
"video_track_writer.h",
]
deps = [
"//media",
"//media/mojo:buildflags",
"//media/mojo/clients",
"//media/mojo/mojom",
"//third_party/libyuv:libyuv",
"//third_party/opus",
]
if (media_use_openh264) {
deps += [ "//third_party/openh264:encoder" ]
}
public_deps = [
"//third_party/blink/renderer/modules/mediastream:mediastream",
"//third_party/blink/renderer/modules/webaudio:webaudio",
]
allow_circular_includes_from =
[ "//third_party/blink/renderer/modules/mediastream:mediastream" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"audio_decoder_broker_test.cc",
"audio_frame_test.cc",
"decoder_selector_test.cc",
"encoded_video_chunk_test.cc",
"image_decoder_external_test.cc",
"video_decoder_broker_test.cc",
"video_frame_test.cc",
"video_track_reader_writer_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/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" ]
}