pub struct EncodingConfig {
pub codec: VideoCodec,
pub bitrate: u64,
pub keyframe_interval: usize,
pub rate_control: RateControlMethod,
pub quality_parameter: f64,
pub preset: EncodingPreset,
pub custom_params: HashMap<String, TransformParameter>,
}Expand description
Video encoding configuration for streaming
Fields§
§codec: VideoCodecVideo codec
bitrate: u64Target bitrate in bits per second
keyframe_interval: usizeKey frame interval (in frames)
rate_control: RateControlMethodRate control method
quality_parameter: f64Quality parameter (codec-specific)
preset: EncodingPresetEncoding preset (speed vs quality trade-off)
custom_params: HashMap<String, TransformParameter>Custom encoding parameters
Implementations§
Source§impl EncodingConfig
impl EncodingConfig
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Create low-latency encoding configuration
Sourcepub fn high_quality() -> Self
pub fn high_quality() -> Self
Create high-quality encoding configuration
Sourcepub fn mobile_optimized() -> Self
pub fn mobile_optimized() -> Self
Create mobile-optimized encoding configuration
Sourcepub fn validate(&self) -> Result<(), RealTimeError>
pub fn validate(&self) -> Result<(), RealTimeError>
Validate encoding configuration
Trait Implementations§
Source§impl Clone for EncodingConfig
impl Clone for EncodingConfig
Source§fn clone(&self) -> EncodingConfig
fn clone(&self) -> EncodingConfig
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 moreSource§impl Debug for EncodingConfig
impl Debug for EncodingConfig
Source§impl Default for EncodingConfig
impl Default for EncodingConfig
Source§impl<'de> Deserialize<'de> for EncodingConfig
impl<'de> Deserialize<'de> for EncodingConfig
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
Auto Trait Implementations§
impl Freeze for EncodingConfig
impl RefUnwindSafe for EncodingConfig
impl Send for EncodingConfig
impl Sync for EncodingConfig
impl Unpin for EncodingConfig
impl UnwindSafe for EncodingConfig
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> 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