forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB8dbd683Tahinli3 months ago856 commits

lib.rs28 lines, 1.3 KiBHistoryRawDownload
1//! `oxideav-ogg` as edith consumes it, over [`ec_ogg`].
2//!
3//! A shim, not a port: it carries the incumbent's package name and version so
4//! the swap is a `[patch.crates-io]` line, and it exposes exactly the items the
5//! replica names — `mux::xiph_lace`, `mux::open_concrete`, and the concrete
6//! muxer's `set_page_target_bytes` beside the `oxideav_core::Muxer` methods
7//! (`export.rs:2942,2957,2961`).
8//!
9//! One semantic difference is owned here rather than at the call site. The
10//! replica states a packet's *granule position* — where it ends — in the
11//! packet's `pts`, because that is what the incumbent's muxer wrote onto the
12//! page; `ec_ogg` keeps `pts` meaning presentation start and carries granule
13//! positions in side data ([`ec_ogg::granule_side_data`]). The translation is
14//! [`mux::OggMuxer::write_packet`], once, for every caller.
15
16#![forbid(unsafe_code)]
17
18use std::io::{Seek, Write};
19
20/// A sink an Ogg file can be written to. The incumbent puts this trait in
21/// `oxideav-core`; nothing in the replica names it directly (it only ever
22/// passes a `Box::new(File::create(..)?)`), so it lives here until the atomic
23/// oxideav swap decides where the family keeps it.
24pub trait WriteSeek: Write + Seek + Send {}
25
26impl<T: Write + Seek + Send> WriteSeek for T {}
27
28pub mod mux;