pub struct EncoderConfig {
pub output_path: PathBuf,
pub width: u32,
pub height: u32,
pub framerate: u32,
pub sample_rate: u32,
pub channels: u8,
pub format: OutputFormat,
}Expand description
Encoder configuration. Width + height + framerate are the video
caps; output_path is the final container path the encoder
writes to on finalize.
Fields§
§output_path: PathBufOutput container path. Must end with the extension matching
format (.mp4 for MP4 variants, .webm for WebM).
width: u32Video pixel width.
height: u32Video pixel height.
framerate: u32Video framerate (30 is the M-EXPORT.1 default).
sample_rate: u32Audio sample rate (48000 is the SCK / GStreamer default).
channels: u8Audio channel count (2 = stereo).
format: OutputFormatFormat selection.
Implementations§
Source§impl EncoderConfig
impl EncoderConfig
Sourcepub fn for_output(output_path: PathBuf, format: OutputFormat) -> Self
pub fn for_output(output_path: PathBuf, format: OutputFormat) -> Self
Construct a sensible default for the given output path + format. 1920×1080 @ 30 fps video, 48 kHz stereo audio.
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
Source§fn clone(&self) -> EncoderConfig
fn clone(&self) -> EncoderConfig
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 EncoderConfig
impl Debug for EncoderConfig
Source§impl PartialEq for EncoderConfig
impl PartialEq for EncoderConfig
Source§fn eq(&self, other: &EncoderConfig) -> bool
fn eq(&self, other: &EncoderConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for EncoderConfig
impl StructuralPartialEq for EncoderConfig
Auto Trait Implementations§
impl Freeze for EncoderConfig
impl RefUnwindSafe for EncoderConfig
impl Send for EncoderConfig
impl Sync for EncoderConfig
impl Unpin for EncoderConfig
impl UnsafeUnpin for EncoderConfig
impl UnwindSafe for EncoderConfig
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