Struct mp4::Mp4Writer [−][src]
Implementations
impl<W> Mp4Writer<W>
[src]
pub fn into_writer(self) -> W
[src]
Consume self, returning the inner writer.
This can be useful to recover the inner writer after completion in case it’s owned by the Mp4Writer instance.
Examples
use mp4::{Mp4Writer, Mp4Config}; use std::io::Cursor; let config = Mp4Config { major_brand: str::parse("isom").unwrap(), minor_version: 512, compatible_brands: vec![ str::parse("isom").unwrap(), str::parse("iso2").unwrap(), str::parse("avc1").unwrap(), str::parse("mp41").unwrap(), ], timescale: 1000, }; let data = Cursor::new(Vec::<u8>::new()); let mut writer = mp4::Mp4Writer::write_start(data, &config)?; writer.write_end()?; let data: Vec<u8> = writer.into_writer().into_inner();
impl<W: Write + Seek> Mp4Writer<W>
[src]
pub fn write_start(writer: W, config: &Mp4Config) -> Result<Self>
[src]
pub fn add_track(&mut self, config: &TrackConfig) -> Result<()>
[src]
pub fn write_sample(&mut self, track_id: u32, sample: &Mp4Sample) -> Result<()>
[src]
pub fn write_end(&mut self) -> Result<()>
[src]
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for Mp4Writer<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> Send for Mp4Writer<W> where
W: Send,
W: Send,
impl<W> Sync for Mp4Writer<W> where
W: Sync,
W: Sync,
impl<W> Unpin for Mp4Writer<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for Mp4Writer<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,