ogg-core 0.1.1

Sans-IO Ogg page/packet mux and demux
Documentation
  • Coverage
  • 100%
    22 out of 22 items documented0 out of 0 items with examples
  • Size
  • Source code size: 41.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 534.16 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • nyxways/mediaway
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dev-nyxie

ogg-core

Status: early development (0.x). Not recommended for production; public APIs may change without notice. Part of the Mediaway media stack.

Sans-IO Ogg page/packet framing (RFC 3533): mux writes spec-valid pages (one packet per page), demux is a general incremental reader that handles multi-packet pages, packets spanning continuation pages, and CRC verification. The transport for Opus, Vorbis, and FLAC logical bitstreams. No I/O in the core.

Quick start

use ogg_core::{Demuxer, Muxer};

let mut muxer = Muxer::new(serial_number);
let mut ogg = Vec::new();
muxer.push_packet(&opus_head, 0, false, &mut ogg)?; // bos set automatically
muxer.push_packet(&opus_packet, 44100, true, &mut ogg)?; // eos on the last page

let mut demuxer = Demuxer::new();
demuxer.push_bytes(&ogg);
while let Some(packet) = demuxer.poll_packet()? {
    // packet.data (continuation pages merged), packet.granule_position, …
}

Status

Status marks: ✅ first-class (tests for claimed scope) · ⚡ Zero-Copy path (no payload copy; implies ✅) · 🆗 best-effort / prototype · 🛠️ planned · ❌ attempted and genuinely blocked · 👻 not exercisable yet (no hardware / device / session available)

Area Status Notes
Mux (one packet per page, correct lacing + CRC, bos/eos)
Demux (multi-packet pages, cross-page continuation, CRC) General case, tested against hand-built pages
Mux: multi-packet page batching 🛠️ Real encoders pack small packets; this mux emits one packet per page
Mux: packets over 65024 bytes (continuation-page split) 🛠️ PacketTooLargeForSinglePage today
Multi-logical-stream interleaving / chaining 🛠️ One muxer = one serial

Docs

Contributing

Contributions are welcome — open an issue or pull request at github.com/nyxways/mediaway.

License

MIT OR Apache-2.0.