pub trait StreamingDemuxer: Send {
// Required methods
fn header(&self) -> &DemuxHeader;
fn next_video_sample(&mut self) -> Result<Option<Sample>>;
fn audio(&self) -> Option<&AudioTrack>;
}Expand description
Pull-based per-format demuxer. The trait is Send so the pipeline
can move the demuxer onto its dedicated decode thread (the existing
transcode pump pattern).
Required Methods§
Sourcefn header(&self) -> &DemuxHeader
fn header(&self) -> &DemuxHeader
Header info parsed from the container header. Cheap to call —
returns a borrow of the cached DemuxHeader populated at
construction time.
Sourcefn next_video_sample(&mut self) -> Result<Option<Sample>>
fn next_video_sample(&mut self) -> Result<Option<Sample>>
Pull the next video sample. Returns Ok(None) at EOF.
Allocates a fresh Vec per sample; nothing is retained
internally beyond the reader’s per-format cursor state.
Sourcefn audio(&self) -> Option<&AudioTrack>
fn audio(&self) -> Option<&AudioTrack>
Audio is a single buffered slab populated at construction time (Squad-18/23/27 passthrough pattern). Streaming audio is out of scope for this sprint per the pinned design.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".