pub struct PostProcessConfig {
pub video_codec: Option<VideoCodec>,
pub audio_codec: Option<AudioCodec>,
pub video_bitrate: Option<String>,
pub audio_bitrate: Option<String>,
pub resolution: Option<Resolution>,
pub framerate: Option<u32>,
pub preset: Option<EncodingPreset>,
pub filters: Vec<FfmpegFilter>,
}Expand description
Comprehensive post-processing configuration
Fieldsยง
ยงvideo_codec: Option<VideoCodec>Video codec to use for encoding
audio_codec: Option<AudioCodec>Audio codec to use for encoding
video_bitrate: Option<String>Video bitrate (e.g., โ2Mโ, โ5Mโ)
audio_bitrate: Option<String>Audio bitrate (e.g., โ128kโ, โ192kโ, โ320kโ)
resolution: Option<Resolution>Target resolution for scaling
framerate: Option<u32>Target framerate
preset: Option<EncodingPreset>Encoding preset (quality/speed trade-off)
filters: Vec<FfmpegFilter>Video filters to apply
Implementationsยง
Sourceยงimpl PostProcessConfig
impl PostProcessConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new post-processing configuration
ยงReturns
An empty PostProcessConfig with all options set to None
Sourcepub fn with_video_codec(self, codec: VideoCodec) -> Self
pub fn with_video_codec(self, codec: VideoCodec) -> Self
Sourcepub fn with_audio_codec(self, codec: AudioCodec) -> Self
pub fn with_audio_codec(self, codec: AudioCodec) -> Self
Sourcepub fn with_video_bitrate(self, bitrate: impl Into<String>) -> Self
pub fn with_video_bitrate(self, bitrate: impl Into<String>) -> Self
Sets the video bitrate
Sourcepub fn with_audio_bitrate(self, bitrate: impl Into<String>) -> Self
pub fn with_audio_bitrate(self, bitrate: impl Into<String>) -> Self
Sets the audio bitrate
Sourcepub fn with_resolution(self, resolution: Resolution) -> Self
pub fn with_resolution(self, resolution: Resolution) -> Self
Sets the target resolution
Sourcepub fn with_framerate(self, fps: u32) -> Self
pub fn with_framerate(self, fps: u32) -> Self
Sets the target framerate
Sourcepub fn with_preset(self, preset: EncodingPreset) -> Self
pub fn with_preset(self, preset: EncodingPreset) -> Self
Sets the encoding preset
Sourcepub fn add_filter(self, filter: FfmpegFilter) -> Self
pub fn add_filter(self, filter: FfmpegFilter) -> Self
Trait Implementationsยง
Sourceยงimpl Clone for PostProcessConfig
impl Clone for PostProcessConfig
Sourceยงfn clone(&self) -> PostProcessConfig
fn clone(&self) -> PostProcessConfig
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 moreSourceยงimpl Debug for PostProcessConfig
impl Debug for PostProcessConfig
Sourceยงimpl Default for PostProcessConfig
impl Default for PostProcessConfig
Sourceยงimpl Display for PostProcessConfig
impl Display for PostProcessConfig
Sourceยงimpl PartialEq for PostProcessConfig
impl PartialEq for PostProcessConfig
impl StructuralPartialEq for PostProcessConfig
Auto Trait Implementationsยง
impl Freeze for PostProcessConfig
impl RefUnwindSafe for PostProcessConfig
impl Send for PostProcessConfig
impl Sync for PostProcessConfig
impl Unpin for PostProcessConfig
impl UnsafeUnpin for PostProcessConfig
impl UnwindSafe for PostProcessConfig
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,
impl<T> CommonTraits for T
Sourceยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Sourceยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Sourceยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Sourceยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.Sourceยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.