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 From<FfmpegContext> for FfmpegScheduler<Initialization>
impl From<FfmpegContext> for FfmpegScheduler<Initialization>
Source§fn from(val: FfmpegContext) -> Self
fn from(val: FfmpegContext) -> Self
Converts to this type from the 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