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§
Trait Implementations§
Source§impl Muxer for Fmp4Muxer
impl Muxer for Fmp4Muxer
Source§fn start_segment(&mut self) -> Result<()>
fn start_segment(&mut self) -> Result<()>
Begin a fresh segment, discarding any partial state.
Source§fn write(&mut self, frame: &MediaFrame) -> Result<()>
fn write(&mut self, frame: &MediaFrame) -> Result<()>
Append one frame to the current segment.
Source§fn finish_segment(&mut self) -> Result<Bytes>
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>>
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 moreSource§fn codec_string(&self) -> Option<String>
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§
impl Freeze for Fmp4Muxer
impl RefUnwindSafe for Fmp4Muxer
impl Send for Fmp4Muxer
impl Sync for Fmp4Muxer
impl Unpin for Fmp4Muxer
impl UnsafeUnpin for Fmp4Muxer
impl UnwindSafe for Fmp4Muxer
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