pub struct Mp4Parser { /* private fields */ }Expand description
A parser for extracting structure and metadata from MP4 files.
Implementations§
Source§impl Mp4Parser
impl Mp4Parser
pub fn new() -> Self
Sourcepub fn base_box(
self,
type_: &str,
definition: impl Fn(ParsedBox<'_>) -> Result<(), Error> + 'static,
) -> Self
pub fn base_box( self, type_: &str, definition: impl Fn(ParsedBox<'_>) -> Result<(), Error> + 'static, ) -> Self
Registers a basic box type with its associated parser callback.
Sourcepub fn full_box(
self,
type_: &str,
definition: impl Fn(ParsedBox<'_>) -> Result<(), Error> + 'static,
) -> Self
pub fn full_box( self, type_: &str, definition: impl Fn(ParsedBox<'_>) -> Result<(), Error> + 'static, ) -> Self
Registers a full box type with its associated parser callback.
Sourcepub fn parse(
&mut self,
data: &[u8],
partial_okay: bool,
stop_on_partial: bool,
) -> Result<(), Error>
pub fn parse( &mut self, data: &[u8], partial_okay: bool, stop_on_partial: bool, ) -> Result<(), Error>
Parses the given MP4 data buffer using the registered callbacks.
§Arguments
partial_okay- If true, allows parsing box structures even if payloads are incomplete.stop_on_partial- If true, halts reading when an incomplete box is encountered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mp4Parser
impl !RefUnwindSafe for Mp4Parser
impl !Send for Mp4Parser
impl !Sync for Mp4Parser
impl Unpin for Mp4Parser
impl UnsafeUnpin for Mp4Parser
impl !UnwindSafe for Mp4Parser
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