pub struct FfmpegContext { /* private fields */ }Implementations§
Source§impl FfmpegContext
impl FfmpegContext
Sourcepub fn builder() -> FfmpegContextBuilder
pub fn builder() -> FfmpegContextBuilder
Creates a new FfmpegContextBuilder which allows you to configure
and construct an FfmpegContext with custom inputs, outputs, filters,
and other parameters.
§Examples
let context = FfmpegContext::builder()
.input("input.mp4")
.output("output.mp4")
.build()
.unwrap();Sourcepub fn start(self) -> Result<FfmpegScheduler<Running>>
pub fn start(self) -> Result<FfmpegScheduler<Running>>
Consumes this FfmpegContext and starts an FFmpeg job, returning
an FfmpegScheduler<ffmpeg_scheduler::Running> for further management.
Internally, this method creates an FfmpegScheduler from the context
and immediately calls FfmpegScheduler::start().
§Returns
Ok(FfmpegScheduler<Running>)if the scheduling process started successfully.Err(...)if there was an error initializing or starting FFmpeg.
§Example
let context = FfmpegContext::builder()
.input("input.mp4")
.output("output.mp4")
.build()
.unwrap();
// Start the FFmpeg job and get a scheduler to manage it
let scheduler = context.start().expect("Failed to start Ffmpeg job");
// Optionally, wait for it to finish
let result = scheduler.wait();
assert!(result.is_ok());Trait Implementations§
Source§impl Into<FfmpegScheduler<Initialization>> for FfmpegContext
impl Into<FfmpegScheduler<Initialization>> for FfmpegContext
Source§fn into(self) -> FfmpegScheduler<Initialization>
fn into(self) -> FfmpegScheduler<Initialization>
Converts this type into the (usually inferred) input type.
impl Send for FfmpegContext
impl Sync for FfmpegContext
Auto Trait Implementations§
impl Freeze for FfmpegContext
impl !RefUnwindSafe for FfmpegContext
impl Unpin for FfmpegContext
impl !UnwindSafe for FfmpegContext
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