pub struct ProxyOptimizer { /* private fields */ }Expand description
Proxy generation optimizer.
Implementations§
Source§impl ProxyOptimizer
impl ProxyOptimizer
Sourcepub const fn with_target_size(self, size: u64) -> Self
pub const fn with_target_size(self, size: u64) -> Self
Set target file size.
Sourcepub const fn with_target_bitrate(self, bitrate: u64) -> Self
pub const fn with_target_bitrate(self, bitrate: u64) -> Self
Set target bitrate.
Sourcepub const fn with_max_encoding_time(self, time: f64) -> Self
pub const fn with_max_encoding_time(self, time: f64) -> Self
Set maximum encoding time.
Sourcepub fn optimize(
&self,
base_settings: ProxyGenerationSettings,
input_duration: f64,
) -> Result<ProxyGenerationSettings>
pub fn optimize( &self, base_settings: ProxyGenerationSettings, input_duration: f64, ) -> Result<ProxyGenerationSettings>
Optimize settings for the given constraints.
Sourcepub fn estimate_output_size(
&self,
settings: &ProxyGenerationSettings,
duration: f64,
) -> u64
pub fn estimate_output_size( &self, settings: &ProxyGenerationSettings, duration: f64, ) -> u64
Estimate output size for given settings.
Sourcepub fn estimate_encoding_time(
&self,
settings: &ProxyGenerationSettings,
duration: f64,
) -> f64
pub fn estimate_encoding_time( &self, settings: &ProxyGenerationSettings, duration: f64, ) -> f64
Estimate encoding time for given settings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyOptimizer
impl RefUnwindSafe for ProxyOptimizer
impl Send for ProxyOptimizer
impl Sync for ProxyOptimizer
impl Unpin for ProxyOptimizer
impl UnsafeUnpin for ProxyOptimizer
impl UnwindSafe for ProxyOptimizer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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