pub trait Demuxer {
type Error: Error + Send + Sync + 'static;
// Required methods
fn step(
&mut self,
input: Input<'_>,
pulse: Option<&dyn Pulse>,
) -> Result<DemuxProgress, SessionError<Self::Error>>;
fn requested(&self) -> &[InputRequest];
fn tracks(&self) -> &[TrackInfo];
// Provided methods
fn access_pattern(&self) -> AccessPattern { ... }
fn seek(
&mut self,
target: &SeekTarget,
) -> Result<SeekStatus, SessionError<Self::Error>> { ... }
}Expand description
A sans-I/O container reader. See the module docs.
Required Associated Types§
Required Methods§
Sourcefn step(
&mut self,
input: Input<'_>,
pulse: Option<&dyn Pulse>,
) -> Result<DemuxProgress, SessionError<Self::Error>>
fn step( &mut self, input: Input<'_>, pulse: Option<&dyn Pulse>, ) -> Result<DemuxProgress, SessionError<Self::Error>>
Take a prefix of input and report what happened.
Sourcefn requested(&self) -> &[InputRequest]
fn requested(&self) -> &[InputRequest]
What the demuxer needs next, after DemuxEvent::Need. Never empty
then.
Sourcefn tracks(&self) -> &[TrackInfo]
fn tracks(&self) -> &[TrackInfo]
The tracks; empty before DemuxEvent::Headers.
Provided Methods§
Sourcefn access_pattern(&self) -> AccessPattern
fn access_pattern(&self) -> AccessPattern
How the demuxer reads its input. Default: front to back.
Sourcefn seek(
&mut self,
target: &SeekTarget,
) -> Result<SeekStatus, SessionError<Self::Error>>
fn seek( &mut self, target: &SeekTarget, ) -> Result<SeekStatus, SessionError<Self::Error>>
Reposition. Default: unsupported.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".