Commits
Commits on
222de206975c7698215fdb8cc78c19138dbbd647Filtered to crates/ec-core/src/error.rsClear filter2026-08-14
feat(core): workspace + ec-core IR foundationAhmet Kaan Gümüş · a3c0049
feat(core): workspace + ec-core IR foundation
Cargo workspace (crates/*, shims/*, tools/*) and ec-core, the IR every
crate in the family builds on:
- timebase: reduced rational TimeBase + Timestamp, all i128-exact integer
math, four rounding modes. 24000/1001 is representable and stays exact;
cross-base ordering compares instants without rounding first.
- packet: Buf (refcounted byte range, cheap clone and slice) + Packet with
optional pts/dts/duration, flags and side data.
- frame: VideoFrame over validated planes (I420/I422/I444, 10-bit I010/
I210/I410, NV12/NV21, P010/P016, gray, packed RGB/BGRA) with CICP colour
code points, AudioFrame with named channel positions (5.1 = FL FR FC LFE
BL BR) interleaved or planar.
- bitio: MSB and LSB bit readers/writers, exp-Golomb ue/se both ways,
truncation reported as NeedMore instead of panicking, exp-Golomb prefix
bounded so a fuzzer cannot spin.
- error: NeedMore/Eof/Unsupported{what,why}/Corrupt{context}/Io; a refusal
always names what was refused and why.
- registry: CodecId for every codec edith touches (video, audio, subtitle),
CodecParameters/StreamInfo, and the Demuxer/Muxer/Decoder/Encoder
contracts. Codecs are push/pull (send_packet/receive_frame) because
packets and frames do not correspond one to one and end of stream has to
be drainable.
forbid(unsafe_code), warn(missing_docs), no dependencies, no async.