Expand description
Containers.
A Demuxer is sans-I/O and speaks the image decoders’ dialogue: the
driver offers an Input, the demuxer takes a prefix and either yields a
DemuxEvent or names what it requested next.
DemuxStage makes any demuxer a [zencodec_io::ByteStepper], so every
zencodec-io cursor (slice, ReadAt with coalesced ranges, Read,
async) drives it; a container that needs its index first (an MP4 with
moov at the end) asks for that range and declares
AccessPattern::RandomAccess.
A Muxer takes packets and lets the caller pull its bytes through
pending_output / consume_output / take_output, as a streaming image
encoder does. Muxer::begin says, through MuxTiming, whether bytes
stream and whether finish patches earlier bytes (sizes, offsets); a
caller whose destination cannot seek back passes
MuxHint::forward_only and gets a layout without patches, or a refusal
at begin.
Borrowed Pulse arguments are optional. None adds no per-call control;
retained job controls and structural limits still apply. Forwarding adapters
pass the original option through to the implementation.
Structs§
- Byte
Range - A byte span within an image file or stream.
- Demux
Progress - The result of one
Demuxer::step. - Demux
Stage - A
Demuxeras a [ByteStepper], so everyzencodec-iocursor drives it:Needmaps to [Step::Need],Doneto [Step::Finished], and every other event is an output. - Input
- Bytes offered to one
step. - MuxFinish
- Shared completion and patch types; retained paths for media implementations. Remaining output and ordered replacements returned by a producer.
- MuxHint
- What the caller tells a muxer about its destination.
- MuxTiming
- When a muxer’s bytes arrive and whether it must patch earlier bytes at
finish(the writer-capability split: seekable fix-ups versus forward-only emission). - Muxer
Shim - Shim erasing a muxer’s error type (the
DynAnimationFrameEncoderpattern: a wrapper, not a blanket impl, so method names never collide). - Patch
- Shared completion and patch types; retained paths for media implementations. Bytes to write over earlier output.
- Seek
Result - What a seek actually landed on: the real timestamp and ordinal, never the request echoed back, plus the container’s random-access evidence.
- Seek
Target - Where to seek.
Enums§
- Access
Pattern - How a decoder reads its input, declared so drivers can size a buffer or choose a fetch strategy for unseekable streams.
- Demux
Event - What one demuxer step produced.
- Input
Request - What an incremental decoder needs before it can continue.
- Patch
Error - Shared completion and patch types; retained paths for media implementations. A patch that does not fit the file.
- Seek
Mode - Which presentation a seek selects relative to the target time.
- Seek
Scope - Which packets a seek may land on.
- Seek
Status - What
seekdid.
Traits§
- Demuxer
- A sans-I/O container reader. See the module docs.
- DynMuxer
- Object-safe muxer (
finishby box), theDynAnimationFrameEncoderpattern. - Muxer
- A container writer whose bytes the caller pulls. See the module docs.
Functions§
- apply_
finish Deprecated - Apply a finish to an in-memory file: append the tail, then patch.
- erase_
muxer - Erase a muxer’s error type.
Type Aliases§
- Request
Deprecated - Deprecated byte-input request name; use
InputRequest.