Skip to main content

Fmp4Muxer

Struct Fmp4Muxer 

Source
pub struct Fmp4Muxer { /* private fields */ }
Available on crate features fmp4 and hls only.
Expand description

Native fragmented-MP4 muxer for a single video track.

Construct with new, hand to an HlsSegmenter (or drive the Muxer trait directly). The init segment is built for H.264 (avc1) and, behind their codec features, H.265 (hvc1), AV1 (av01) and VVC (vvc1); the moof/mdat fragment path is codec-generic. Send — owned by a single segmenter task. Audio frames are skipped (use a dedicated audio rendition).

Implementations§

Source§

impl Fmp4Muxer

Source

pub fn new() -> Self

A new muxer, awaiting the first CONFIG access unit to build its init segment.

Trait Implementations§

Source§

impl Default for Fmp4Muxer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Muxer for Fmp4Muxer

Source§

fn extension(&self) -> &'static str

File extension for produced segments (e.g. "ts", "m4s").
Source§

fn start_segment(&mut self) -> Result<()>

Begin a fresh segment, discarding any partial state.
Source§

fn write(&mut self, frame: &MediaFrame) -> Result<()>

Append one frame to the current segment.
Source§

fn finish_segment(&mut self) -> Result<Bytes>

Take the finished segment’s bytes, resetting for the next one.
Source§

fn init_segment( &mut self, codec: CodecId, config_record: &[u8], ) -> Result<Option<Bytes>>

Build an fMP4 initialization segment (ftyp+moov carrying the avcC/hvcC/av1C/vvcC decoder config) from a CONFIG access unit. Read more
Source§

fn codec_string(&self) -> Option<String>

The HLS CODECS attribute for this rendition’s master-playlist entry (e.g. "hvc1.1.6.L120.B0"), once known.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more