pub struct Mp4ContainerBuilder;Expand description
Stateless pure-Rust ISOBMFF MP4 container builder producing spec-compliant ftyp/moov/mdat byte streams.
Implementations§
Source§impl Mp4ContainerBuilder
Pure-Rust ISOBMFF MP4 container builder emitting valid ftyp, moov, and mdat boxes.
impl Mp4ContainerBuilder
Pure-Rust ISOBMFF MP4 container builder emitting valid ftyp, moov, and mdat boxes.
Sourcepub fn build_video_mp4(
width: u32,
height: u32,
timescale: u32,
codec: VideoCodec,
color_info: VideoColorInfo,
samples: &[Mp4BuilderSample],
) -> Vec<u8> ⓘ
pub fn build_video_mp4( width: u32, height: u32, timescale: u32, codec: VideoCodec, color_info: VideoColorInfo, samples: &[Mp4BuilderSample], ) -> Vec<u8> ⓘ
Serializes a single-track video MP4 container with ftyp, moov (including colr nclx HDR metadata and optional ctts), and mdat.
§Arguments
u32- Coded frame width in pixels.u32- Coded frame height in pixels.u32- Media timescale in ticks per second (e.g.90_000or60_000).VideoCodec- Video codec identifier mapped to ISOBMFF FourCC (avc1,hvc1,vp09,av01,rawv).VideoColorInfo- Color primaries, transfer curve, matrix, and range encoded incolr/nclx.&[Mp4BuilderSample]- Ordered decode-order video samples.
§Returns
Vec<u8>- Complete spec-compliant MP4 byte stream.
Trait Implementations§
Source§impl Clone for Mp4ContainerBuilder
impl Clone for Mp4ContainerBuilder
impl Copy for Mp4ContainerBuilder
Source§impl Debug for Mp4ContainerBuilder
impl Debug for Mp4ContainerBuilder
Auto Trait Implementations§
impl Forget for Mp4ContainerBuilder
impl Freeze for Mp4ContainerBuilder
impl Move for Mp4ContainerBuilder
impl RefUnwindSafe for Mp4ContainerBuilder
impl Send for Mp4ContainerBuilder
impl Sync for Mp4ContainerBuilder
impl Unpin for Mp4ContainerBuilder
impl UnsafeUnpin for Mp4ContainerBuilder
impl UnwindSafe for Mp4ContainerBuilder
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