oxideav-codec 0.0.4

Codec (Decoder + Encoder) traits and registry for oxideav — pure Rust, no C deps
Documentation
  • Coverage
  • 67.5%
    27 out of 40 items documented0 out of 33 items with examples
  • Size
  • Source code size: 22.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.12 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 42s Average build duration of successful builds.
  • all releases: 1m 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • OxideAV/oxideav-codec
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MagicalTux

oxideav-codec

Codec traits + registry for the oxideav pure-Rust media framework. Every per-format codec crate (MP3, AAC, H.264, GIF, …) implements Decoder and/or Encoder and registers itself via a CodecImplementation; the aggregator builds one CodecRegistry with the union of every enabled feature.

  • Decodersend_packetreceive_frame, plus flush (EOS drain) and reset (state wipe after seek, added in 0.0.4).
  • Encodersend_framereceive_packet, plus flush.
  • CodecCapabilities — per-impl flags (lossless, intra-only, accepted pixel formats, supported sample rates, priority) so registries can pick the right implementation for a given request.
  • CodecRegistry — factory lookup by CodecId, with fallback when the first-choice implementation refuses the input.

Zero C dependencies. Zero FFI.

Usage

[dependencies]
oxideav-codec = "0.0"

Typical pattern in a codec crate:

pub fn register(reg: &mut oxideav_codec::CodecRegistry) {
    let caps = CodecCapabilities::audio("my_codec_sw")
        .with_lossless(true);
    reg.register_both(
        CodecId::new("my-codec"),
        caps,
        make_decoder,
        make_encoder,
    );
}

License

MIT — see LICENSE.