pub struct NullStream { /* private fields */ }Expand description
Null stream — accepts PES writes, discards data. For benchmarking rip speed.
Implementations§
Trait Implementations§
Source§impl Stream for NullStream
impl Stream for NullStream
Source§fn read(&mut self) -> Result<Option<PesFrame>>
fn read(&mut self) -> Result<Option<PesFrame>>
Read the next frame, or
Ok(None) at end of stream. Returns
StreamWriteOnly (E9001) on a write-only sink.Source§fn write(&mut self, _: &PesFrame) -> Result<()>
fn write(&mut self, _: &PesFrame) -> Result<()>
Write a frame to the sink. Returns
StreamReadOnly (E9000) on a
read-only source.Source§fn finish(&mut self) -> Result<()>
fn finish(&mut self) -> Result<()>
Finalize the stream: flush buffered frames, write any container
index (MKV
Cues), close the underlying file/socket. Idempotent
for read-only streams (no-op).Source§fn info(&self) -> &DiscTitle
fn info(&self) -> &DiscTitle
Stream metadata. Stable across reads — implementors must return a
consistent reference for the lifetime of the stream.
Source§fn codec_private(&self, _track: usize) -> Option<Vec<u8>>
fn codec_private(&self, _track: usize) -> Option<Vec<u8>>
Codec initialization data for a track (SPS/PPS, AC-3 fscod, etc.).
None for tracks that don’t need codec_private (raw passthrough).Source§fn headers_ready(&self) -> bool
fn headers_ready(&self) -> bool
True when
codec_private is available for every video track —
callers buffer input frames until this flips, since some output
formats (MKV) can’t write frames without codec init data.Auto Trait Implementations§
impl Freeze for NullStream
impl RefUnwindSafe for NullStream
impl Send for NullStream
impl Sync for NullStream
impl Unpin for NullStream
impl UnsafeUnpin for NullStream
impl UnwindSafe for NullStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more