pub struct TwoPassExample { /* private fields */ }Expand description
Example: Two-pass encoding for optimal quality.
This example demonstrates how to perform two-pass encoding to achieve optimal bitrate allocation across frames.
Implementations§
Source§impl TwoPassExample
impl TwoPassExample
Sourcepub fn new(width: u32, height: u32, target_bitrate: u64) -> Self
pub fn new(width: u32, height: u32, target_bitrate: u64) -> Self
Create a new two-pass encoding example.
Sourcepub fn run_first_pass(&self, frames: &[VideoFrame]) -> Result<(), String>
pub fn run_first_pass(&self, frames: &[VideoFrame]) -> Result<(), String>
Run the first pass to collect statistics.
Sourcepub fn run_second_pass(
&self,
frames: &[VideoFrame],
) -> Result<Vec<EncodingResult>, String>
pub fn run_second_pass( &self, frames: &[VideoFrame], ) -> Result<Vec<EncodingResult>, String>
Run the second pass with optimal bitrate allocation.
Auto Trait Implementations§
impl Freeze for TwoPassExample
impl RefUnwindSafe for TwoPassExample
impl Send for TwoPassExample
impl Sync for TwoPassExample
impl Unpin for TwoPassExample
impl UnsafeUnpin for TwoPassExample
impl UnwindSafe for TwoPassExample
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