pub struct H264Encoder { /* private fields */ }Expand description
A from-scratch H.264 encoder (IDR-only, I_PCM).
Implementations§
Source§impl H264Encoder
impl H264Encoder
Sourcepub fn config(&self) -> &H264Config
pub fn config(&self) -> &H264Config
The configuration the parameter sets describe.
Sourcepub fn encode_frame(&mut self, frame: &Yuv420Frame) -> Vec<u8> ⓘ
pub fn encode_frame(&mut self, frame: &Yuv420Frame) -> Vec<u8> ⓘ
Encode one 4:2:0 frame, returning its Annex-B access unit.
Sourcepub fn sample_from_au(au: &[u8]) -> Vec<u8> ⓘ
pub fn sample_from_au(au: &[u8]) -> Vec<u8> ⓘ
Turn one Annex-B access unit into an MP4 sample (length-prefixed NALs).
Auto Trait Implementations§
impl Forget for H264Encoder
impl Freeze for H264Encoder
impl Move for H264Encoder
impl RefUnwindSafe for H264Encoder
impl Send for H264Encoder
impl Sync for H264Encoder
impl Unpin for H264Encoder
impl UnsafeUnpin for H264Encoder
impl UnwindSafe for H264Encoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more