pub struct EncodeConfig {
pub width: u32,
pub height: u32,
pub rate_control: RateControl,
pub speed: SpeedPreset,
pub keyframe_interval: u64,
}Expand description
Codec-agnostic video encode configuration.
Codec-specific encoders translate this into their own configuration type.
§Examples
use tpt_kinetix_core::encode::{EncodeConfig, RateControl, SpeedPreset};
let cfg = EncodeConfig {
width: 1920,
height: 1080,
rate_control: RateControl::Bitrate { bits_per_second: 6_000_000 },
speed: SpeedPreset::Medium,
keyframe_interval: 240,
};
assert_eq!(cfg.speed.to_speed(), 6);Fields§
§width: u32Frame width in pixels.
height: u32Frame height in pixels.
rate_control: RateControlRate-control strategy.
speed: SpeedPresetSpeed / quality preset.
keyframe_interval: u64Maximum interval between keyframes, in frames.
Implementations§
Trait Implementations§
Source§impl Clone for EncodeConfig
impl Clone for EncodeConfig
Source§fn clone(&self) -> EncodeConfig
fn clone(&self) -> EncodeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EncodeConfig
Source§impl Debug for EncodeConfig
impl Debug for EncodeConfig
Source§impl Default for EncodeConfig
impl Default for EncodeConfig
Source§impl<'de> Deserialize<'de> for EncodeConfig
impl<'de> Deserialize<'de> for EncodeConfig
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 EncodeConfig
Source§impl PartialEq for EncodeConfig
impl PartialEq for EncodeConfig
Source§impl Serialize for EncodeConfig
impl Serialize for EncodeConfig
impl StructuralPartialEq for EncodeConfig
Auto Trait Implementations§
impl Freeze for EncodeConfig
impl RefUnwindSafe for EncodeConfig
impl Send for EncodeConfig
impl Sync for EncodeConfig
impl Unpin for EncodeConfig
impl UnsafeUnpin for EncodeConfig
impl UnwindSafe for EncodeConfig
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