pub struct Vp9Encoder { /* private fields */ }Expand description
The pure-Rust VP9 encoder.
Construct via Encodable::new. The first frame (and every
keyframe_interval-th frame, plus any frame after Vp9Encoder::force_keyframe)
is an intra keyframe; the rest are single-reference inter frames with
integer-pel motion compensation. A one-pass VBR [RateControl] picks the
per-frame quantizer within the app’s [min_quantizer, max_quantizer] window;
[SpeedFeatures] derived from cpu_used tune the motion search.
Implementations§
Source§impl Vp9Encoder
impl Vp9Encoder
Sourcepub fn last_reconstruction_i420(&self) -> Option<Vec<u8>>
pub fn last_reconstruction_i420(&self) -> Option<Vec<u8>>
The most recently encoded frame’s reconstruction as a tight-packed I420
buffer at the cropped dimensions, or None before the first frame.
This is exactly what a conformant decoder must reproduce, so tests can assert bit-exactness against the libvpx oracle.
Sourcepub fn force_keyframe(&mut self)
pub fn force_keyframe(&mut self)
Request that the next encoded frame be a keyframe, regardless of the keyframe interval. The flag clears after that frame is emitted. Useful when the app needs a decodable refresh point (e.g. a new participant joins).
Trait Implementations§
Source§impl Encodable for Vp9Encoder
impl Encodable for Vp9Encoder
Auto Trait Implementations§
impl Freeze for Vp9Encoder
impl RefUnwindSafe for Vp9Encoder
impl Send for Vp9Encoder
impl Sync for Vp9Encoder
impl Unpin for Vp9Encoder
impl UnsafeUnpin for Vp9Encoder
impl UnwindSafe for Vp9Encoder
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
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> ⓘ
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> ⓘ
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