pub struct ContainerProber { /* private fields */ }Expand description
A thin prober that inspects raw bytes and fills a ContainerInfo.
Implementations§
Source§impl ContainerProber
impl ContainerProber
Sourcepub fn probed_count(&self) -> usize
pub fn probed_count(&self) -> usize
Returns the number of containers probed so far.
Sourcepub fn probe_header(&mut self, header: &[u8]) -> ContainerProbeResult
pub fn probe_header(&mut self, header: &[u8]) -> ContainerProbeResult
Inspects the first bytes of a container and returns a
ContainerProbeResult.
Detection is based on well-known magic sequences:
[0x1A, 0x45, 0xDF, 0xA3]→ Matroska /WebM[0x66, 0x4C, 0x61, 0x43](fLaC) → FLAC[0x4F, 0x67, 0x67, 0x53](OggS) → Ogg[0x52, 0x49, 0x46, 0x46](RIFF) → WAV[0x00, 0x00, 0x00, _, 0x66, 0x74, 0x79, 0x70]→ MP4/ftyp
Trait Implementations§
Source§impl Debug for ContainerProber
impl Debug for ContainerProber
Source§impl Default for ContainerProber
impl Default for ContainerProber
Source§fn default() -> ContainerProber
fn default() -> ContainerProber
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContainerProber
impl RefUnwindSafe for ContainerProber
impl Send for ContainerProber
impl Sync for ContainerProber
impl Unpin for ContainerProber
impl UnsafeUnpin for ContainerProber
impl UnwindSafe for ContainerProber
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