pub struct MultiPassEncoder { /* private fields */ }Expand description
Multi-pass encoder state.
Implementations§
Source§impl MultiPassEncoder
impl MultiPassEncoder
Sourcepub fn new(config: EncoderConfig) -> Self
pub fn new(config: EncoderConfig) -> Self
Create a new multi-pass encoder.
Sourcepub fn encode_frame(
&mut self,
frame: &VideoFrame,
) -> Result<Option<EncodingResult>, EncoderError>
pub fn encode_frame( &mut self, frame: &VideoFrame, ) -> Result<Option<EncodingResult>, EncoderError>
Encode a frame (behavior depends on pass type).
Sourcepub fn save_stats(&self, path: &str) -> Result<(), EncoderError>
pub fn save_stats(&self, path: &str) -> Result<(), EncoderError>
Save first-pass statistics to a file.
Sourcepub fn load_stats(&mut self, path: &str) -> Result<(), EncoderError>
pub fn load_stats(&mut self, path: &str) -> Result<(), EncoderError>
Load first-pass statistics from a file.
Sourcepub fn statistics(&self) -> &PassStatistics
pub fn statistics(&self) -> &PassStatistics
Get encoding statistics.
Sourcepub fn vbv_statistics(&self) -> Option<VbvStatistics>
pub fn vbv_statistics(&self) -> Option<VbvStatistics>
Get VBV statistics if available.
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Get current frame count.
Auto Trait Implementations§
impl Freeze for MultiPassEncoder
impl RefUnwindSafe for MultiPassEncoder
impl Send for MultiPassEncoder
impl Sync for MultiPassEncoder
impl Unpin for MultiPassEncoder
impl UnsafeUnpin for MultiPassEncoder
impl UnwindSafe for MultiPassEncoder
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