pub struct ParallelConfig {
pub sample_rate: i32,
pub channels: usize,
pub application: Application,
pub bitrate_bps: i32,
pub complexity: i32,
pub use_cbr: bool,
pub warmup: usize,
pub threads: usize,
}Expand description
Configuration for a parallel encode; mirrors the knobs on OpusEncoder.
Fields§
§sample_rate: i32§channels: usize§application: Application§bitrate_bps: i32§complexity: i32§use_cbr: bool§warmup: usizeFrames of look-back each worker re-encodes to prime its state (discarded).
Must exceed the deepest inter-frame memory (SILK LTP lag + NSQ delay +
CELT overlap). 8 (~160 ms @20 ms frames) is a safe default; sweep down
under the PEAQ gate. 0 = no priming (equivalent to naive chunking).
threads: usizeWorker count; 0 selects available_parallelism.
Implementations§
Source§impl ParallelConfig
impl ParallelConfig
pub fn new(sample_rate: i32, channels: usize, application: Application) -> Self
Trait Implementations§
Source§impl Clone for ParallelConfig
impl Clone for ParallelConfig
Source§fn clone(&self) -> ParallelConfig
fn clone(&self) -> ParallelConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParallelConfig
Auto Trait Implementations§
impl Freeze for ParallelConfig
impl RefUnwindSafe for ParallelConfig
impl Send for ParallelConfig
impl Sync for ParallelConfig
impl Unpin for ParallelConfig
impl UnsafeUnpin for ParallelConfig
impl UnwindSafe for ParallelConfig
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