| # Copyright 2019 The Fuchsia 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("//build/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("fuchsia-audio-codec") { |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.media:fuchsia.media-rustc", |
| "//sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec-rustc", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fidl_table_validation", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/media/stream_processors/fuchsia-stream-processors", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| test_deps = [ |
| "//src/lib/mundane", |
| "//src/media/stream_processors/test:stream_processor_test_lib", |
| "//third_party/rust_crates:futures-test", |
| "//third_party/rust_crates:hex", |
| ] |
| |
| sources = [ |
| "src/buffer_collection_constraints.rs", |
| "src/lib.rs", |
| "src/stream_processor.rs", |
| "src/sysmem_allocator.rs", |
| ] |
| } |
| |
| resource("test-data") { |
| sources = [ rebase_path( |
| "//src/media/stream_processors/test/audio_decoder_test/test_data/s16le44100mono.sbc") ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_unittest_package("fuchsia-audio-codec-tests") { |
| manifest = "meta/fuchsia_audio_codec_lib_test.cmx" |
| deps = [ |
| ":fuchsia-audio-codec_test", |
| ":test-data", |
| "//src/media/codec:codec_factory", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fuchsia-audio-codec-tests" ] |
| } |