pub trait RateController: Send {
// Required methods
fn get_output(&mut self, frame_type: FrameType, complexity: f32) -> RcOutput;
fn update_stats(&mut self, stats: &FrameStats);
fn reset(&mut self);
fn current_qp(&self) -> f32;
fn frame_count(&self) -> u64;
fn total_bits(&self) -> u64;
}Expand description
Common trait for all rate controllers.
Required Methods§
Sourcefn get_output(&mut self, frame_type: FrameType, complexity: f32) -> RcOutput
fn get_output(&mut self, frame_type: FrameType, complexity: f32) -> RcOutput
Get rate control output for a frame.
Sourcefn update_stats(&mut self, stats: &FrameStats)
fn update_stats(&mut self, stats: &FrameStats)
Update controller with frame encoding results.
Sourcefn current_qp(&self) -> f32
fn current_qp(&self) -> f32
Get the current QP value.
Sourcefn frame_count(&self) -> u64
fn frame_count(&self) -> u64
Get total frames processed.
Sourcefn total_bits(&self) -> u64
fn total_bits(&self) -> u64
Get total bits produced.