pub struct ProxyQualityConfig {
pub tier: ProxyQualityTier,
pub video_bitrate_kbps: u32,
pub audio_bitrate_kbps: u32,
pub codec_hint: String,
pub fps_cap: f32,
}Expand description
Configuration for a specific proxy quality tier.
Fields§
§tier: ProxyQualityTierThe tier this config describes.
video_bitrate_kbps: u32Target video bitrate in kbps.
audio_bitrate_kbps: u32Target audio bitrate in kbps.
codec_hint: StringContainer/codec hint (e.g. “h264”, “vp9”).
fps_cap: f32Frames per second (0 = match source).
Implementations§
Source§impl ProxyQualityConfig
impl ProxyQualityConfig
Sourcepub fn new(tier: ProxyQualityTier) -> Self
pub fn new(tier: ProxyQualityTier) -> Self
Create a new config for the given tier with default parameters.
Sourcepub fn bitrate_kbps(&self) -> u32
pub fn bitrate_kbps(&self) -> u32
Return total bitrate in kbps (video + audio).
Sourcepub fn fits_budget(&self, budget_kbps: u32) -> bool
pub fn fits_budget(&self, budget_kbps: u32) -> bool
Return true if total bitrate fits within budget_kbps.
Sourcepub fn resolution_cap(&self) -> (u32, u32)
pub fn resolution_cap(&self) -> (u32, u32)
Effective resolution cap for this config.
Trait Implementations§
Source§impl Clone for ProxyQualityConfig
impl Clone for ProxyQualityConfig
Source§fn clone(&self) -> ProxyQualityConfig
fn clone(&self) -> ProxyQualityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProxyQualityConfig
impl RefUnwindSafe for ProxyQualityConfig
impl Send for ProxyQualityConfig
impl Sync for ProxyQualityConfig
impl Unpin for ProxyQualityConfig
impl UnsafeUnpin for ProxyQualityConfig
impl UnwindSafe for ProxyQualityConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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