Struct Config
struct Config { ... }
Contains the encoder configuration.
Implementations
impl Config
fn new() -> SelfCreate a default configuration
same as
Default::default()fn with_encoder_config(self: Self, enc: EncoderConfig) -> SelfSet the encoder configuration
EncoderConfigcontains the settings impacting the codec features used in the produced bitstream.const fn with_threads(self: Self, threads: usize) -> SelfSet the number of workers in the threadpool
The threadpool is shared across all the different parallel components in the encoder.
If it is left unset, the encoder will use the default global threadpool provided by Rayon instead.
const fn with_rate_control(self: Self, rate_control: RateControlConfig) -> SelfSet the rate control configuration
The default configuration is single pass
impl Config
fn new_context<T: Pixel>(self: &Self) -> Result<Context<T>, InvalidConfig>Creates a
Contextwith this configuration.Errors
Returns
InvalidConfigif the config is invalid.Examples
use *; #fn validate(self: &Self) -> Result<(), InvalidConfig>Validates the configuration.
Errors
- Returns
InvalidConfigif the tiling config is invalid.
- Returns
fn tiling_info(self: &Self) -> Result<TilingInfo, InvalidConfig>Provide the tiling information for the current Config
Useful for reporting and debugging.
Errors
- Returns
InvalidConfigif the tiling config is invalid.
- Returns
impl Clone for Config
fn clone(self: &Self) -> Config
impl Debug for Config
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Default for Config
fn default() -> Config
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
impl<T> Any for Config
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Config
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Config
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Config
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Config
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Config
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Config
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Config
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Config
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>