pub struct VideoRateControl {
pub bitrate: u64,
pub mode: BitrateMode,
pub quantizer: Option<u32>,
}Expand description
A resolved video rate control: what a sink encodes with.
bitrate is always present. With a quantizer it is the fallback for an
encoder that cannot hold a constant quantizer; without one it is the
target.
Fields§
§bitrate: u64Target, or fallback, bits per second. Always positive.
mode: BitrateModeHow the bitrate is held when the encoder runs on it.
quantizer: Option<u32>Constant quantizer on the codec’s own scale, where the encoder has one.
Implementations§
Source§impl VideoRateControl
impl VideoRateControl
Sourcepub const fn bitrate(
bitrate: u64,
mode: BitrateMode,
) -> Result<Self, RateControlError>
pub const fn bitrate( bitrate: u64, mode: BitrateMode, ) -> Result<Self, RateControlError>
An explicit bitrate with no quantizer.
§Errors
Returns RateControlError::NonPositiveBitrate for zero.
Trait Implementations§
Source§impl Clone for VideoRateControl
impl Clone for VideoRateControl
impl Copy for VideoRateControl
Source§impl Debug for VideoRateControl
impl Debug for VideoRateControl
Source§impl<'de> Deserialize<'de> for VideoRateControl
impl<'de> Deserialize<'de> for VideoRateControl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for VideoRateControl
Source§impl Hash for VideoRateControl
impl Hash for VideoRateControl
Source§impl PartialEq for VideoRateControl
impl PartialEq for VideoRateControl
Source§impl Serialize for VideoRateControl
impl Serialize for VideoRateControl
impl StructuralPartialEq for VideoRateControl
Auto Trait Implementations§
impl Freeze for VideoRateControl
impl RefUnwindSafe for VideoRateControl
impl Send for VideoRateControl
impl Sync for VideoRateControl
impl Unpin for VideoRateControl
impl UnsafeUnpin for VideoRateControl
impl UnwindSafe for VideoRateControl
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