mediadecode 0.13.0

Generic, no_std-friendly type-and-trait spine for media decoders (FFmpeg, WebCodecs, R3D, BRAW, ARRIRAW, X-OCN, ProRes RAW, Canon Cinema RAW Light).
Documentation
[package]
name        = "mediadecode"
version     = "0.13.0"
edition.workspace      = true
rust-version.workspace = true
license.workspace      = true
repository.workspace   = true
homepage.workspace     = true
documentation = "https://docs.rs/mediadecode"
description = "Generic, no_std-friendly type-and-trait spine for media decoders (FFmpeg, WebCodecs, R3D, BRAW, ARRIRAW, X-OCN, ProRes RAW, Canon Cinema RAW Light)."
keywords   = ["media", "decoder", "video", "audio", "no-std"]
categories = ["multimedia", "multimedia::video", "multimedia::audio", "no-std", "no-std::no-alloc"]

[features]
default = ["std"]
# `serde?/alloc` and `serde?/std` keep serde's own capability tier in
# step with this crate's, so a type that gains an owning payload at one
# of them can still derive `Deserialize`. The `?` keeps serde out of the
# build entirely when this crate's `serde` feature is off.
alloc   = ["serde?/alloc"]
std     = ["mediatime/default", "serde?/std"]

# Async-fn-in-trait variants of the decoder traits, exposed under
# `mediadecode::future`. No runtime dependency — only a proc-macro
# (`trait-variant`) used to generate the `Send`-bounded sibling of
# each `!Send` trait. Callers pick their own executor.
future = ["dep:trait-variant"]

# `bitflags/serde` is deliberately absent. It is opt-in per type (a
# `Serialize` / `Deserialize` derive inside the `bitflags!` body, which
# `PacketFlags` does not carry) and its wire shape is a flag *grammar*
# — `"KEY | CORRUPT"` — in any human-readable format. `PacketFlags`
# serializes as its bits instead, hand-written in `packet::serde_impls`.
serde      = ["dep:serde", "mediatime/serde", "mediaframe/serde"]
arbitrary  = ["dep:arbitrary", "mediatime/arbitrary"]
quickcheck = ["dep:quickcheck", "mediatime/quickcheck"]

# **Self-granted `ingraph` citizenship** — the faces `ingraph` reads
# this crate's vocabulary types through, written here because this crate
# is where those types live. Purely additive: nothing outside
# `src/ingraph.rs` changes shape, no other feature implies it, and the
# default build is untouched. See that module for the roster, and for
# what a citizenship deliberately does not carry.
#
# It implies `std`, and that is honest rather than incidental: `ingraph`
# is a `std` framework, and the rows this feature writes name `Vec` in
# a signature that is `std`'s. A `no_std` build has no framework to be a
# citizen of, so the implication costs nothing that was reachable.
ingraph    = ["dep:ingraph", "std"]

[dependencies]
mediatime   = { workspace = true }
bitflags    = { workspace = true }
derive_more = { workspace = true, features = ["display", "is_variant", "try_unwrap", "unwrap"] }
thiserror   = { workspace = true }
mediaframe  = { workspace = true }

serde      = { workspace = true, optional = true }
arbitrary  = { workspace = true, optional = true }
quickcheck = { workspace = true, optional = true }
ingraph    = { workspace = true, optional = true }

trait-variant = { workspace = true, optional = true }

[dev-dependencies]
criterion  = { workspace = true }
tempfile   = { workspace = true }
serde_json = { workspace = true }

[[bench]]
path    = "benches/foo.rs"
name    = "foo"
harness = false

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true