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: i32Input sampling rate in Hz (8000, 12000, 16000, 24000 or 48000).
channels: usizeChannel count (1 or 2).
application: ApplicationEncoder application mode.
bitrate_bps: i32Target bitrate in bits per second.
complexity: i32Encoder complexity, 0-10.
use_cbr: boolConstant bitrate when true.
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
Sourcepub fn new(sample_rate: i32, channels: usize, application: Application) -> Self
pub fn new(sample_rate: i32, channels: usize, application: Application) -> Self
Defaults: 64 kb/s VBR, complexity 9, 8 warm-up frames, one worker per core.
Trait Implementations§
Source§impl Clone for ParallelConfig
impl Clone for ParallelConfig
impl 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