Skip to main content

RateController

Trait RateController 

Source
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§

Source

fn get_output(&mut self, frame_type: FrameType, complexity: f32) -> RcOutput

Get rate control output for a frame.

Source

fn update_stats(&mut self, stats: &FrameStats)

Update controller with frame encoding results.

Source

fn reset(&mut self)

Reset the controller state.

Source

fn current_qp(&self) -> f32

Get the current QP value.

Source

fn frame_count(&self) -> u64

Get total frames processed.

Source

fn total_bits(&self) -> u64

Get total bits produced.

Implementors§