pub struct Config { /* private fields */ }
Expand description
Contains the encoder configuration.
Implementations§
source§impl Config
impl Config
sourcepub fn with_encoder_config(self, enc: EncoderConfig) -> Self
pub fn with_encoder_config(self, enc: EncoderConfig) -> Self
Set the encoder configuration
EncoderConfig
contains the settings impacting the
codec features used in the produced bitstream.
sourcepub const fn with_threads(self, threads: usize) -> Self
pub const fn with_threads(self, threads: usize) -> Self
Set 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.
sourcepub const fn with_rate_control(self, rate_control: RateControlConfig) -> Self
pub const fn with_rate_control(self, rate_control: RateControlConfig) -> Self
Set the rate control configuration
The default configuration is single pass
source§impl Config
impl Config
sourcepub fn new_context<T: Pixel>(&self) -> Result<Context<T>, InvalidConfig>
pub fn new_context<T: Pixel>(&self) -> Result<Context<T>, InvalidConfig>
sourcepub fn validate(&self) -> Result<(), InvalidConfig>
pub fn validate(&self) -> Result<(), InvalidConfig>
sourcepub fn tiling_info(&self) -> Result<TilingInfo, InvalidConfig>
pub fn tiling_info(&self) -> Result<TilingInfo, InvalidConfig>
Provide the tiling information for the current Config
Useful for reporting and debugging.
§Errors
- Returns
InvalidConfig
if the tiling config is invalid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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