pub struct Mp4Writer<W: Write + Seek> { /* private fields */ }Expand description
A progressive MP4 writer.
Implementations§
Source§impl<W: Write + Seek> Mp4Writer<W>
impl<W: Write + Seek> Mp4Writer<W>
Sourcepub fn new(writer: W, config: WriterConfig) -> Result<Self, Error>
pub fn new(writer: W, config: WriterConfig) -> Result<Self, Error>
Creates a writer and emits the file-type and media-data headers.
Sourcepub fn add_track(&mut self, track: TrackConfig) -> Result<TrackId, Error>
pub fn add_track(&mut self, track: TrackConfig) -> Result<TrackId, Error>
Adds a track before the first sample and returns its identifier.
Sourcepub fn write_sample(
&mut self,
id: TrackId,
sample: &SampleInput<'_>,
) -> Result<(), Error>
pub fn write_sample( &mut self, id: TrackId, sample: &SampleInput<'_>, ) -> Result<(), Error>
Writes one encoded sample.
Auto Trait Implementations§
impl<W> Freeze for Mp4Writer<W>where
W: Freeze,
impl<W> RefUnwindSafe for Mp4Writer<W>where
W: RefUnwindSafe,
impl<W> Send for Mp4Writer<W>where
W: Send,
impl<W> Sync for Mp4Writer<W>where
W: Sync,
impl<W> Unpin for Mp4Writer<W>where
W: Unpin,
impl<W> UnsafeUnpin for Mp4Writer<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for Mp4Writer<W>where
W: UnwindSafe,
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