pub struct SceneEncoder { /* private fields */ }Expand description
Scene-based encoding optimizer.
Implementations§
Source§impl SceneEncoder
impl SceneEncoder
Sourcepub fn new(base_qp: f64, target_bitrate_bps: u64, frame_rate: f64) -> Self
pub fn new(base_qp: f64, target_bitrate_bps: u64, frame_rate: f64) -> Self
Creates a new scene encoder with target settings.
Sourcepub fn target_bitrate_bps(&self) -> u64
pub fn target_bitrate_bps(&self) -> u64
Returns the target bitrate.
Sourcepub fn generate_params(&self, metrics: &SceneMetrics) -> SceneEncodeParams
pub fn generate_params(&self, metrics: &SceneMetrics) -> SceneEncodeParams
Generates encoding parameters for a scene based on its metrics.
Sourcepub fn process_scene(&mut self, metrics: SceneMetrics) -> SceneEncodeParams
pub fn process_scene(&mut self, metrics: SceneMetrics) -> SceneEncodeParams
Processes a scene: records metrics and generates params.
Sourcepub fn scene_params(&self) -> &[SceneEncodeParams]
pub fn scene_params(&self) -> &[SceneEncodeParams]
Returns scene parameters generated so far.
Sourcepub fn scenes_processed(&self) -> usize
pub fn scenes_processed(&self) -> usize
Returns the number of scenes processed.
Sourcepub fn scene_history(&self) -> &VecDeque<SceneMetrics>
pub fn scene_history(&self) -> &VecDeque<SceneMetrics>
Returns the scene history.
Sourcepub fn avg_scene_complexity(&self) -> f64
pub fn avg_scene_complexity(&self) -> f64
Returns the average complexity across all processed scenes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SceneEncoder
impl RefUnwindSafe for SceneEncoder
impl Send for SceneEncoder
impl Sync for SceneEncoder
impl Unpin for SceneEncoder
impl UnsafeUnpin for SceneEncoder
impl UnwindSafe for SceneEncoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more