1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
use AVMediaType;
use ;
/// The **ffmpeg_scheduler** module provides the orchestrator that actually runs the
/// configured FFmpeg job. It handles the lifecycle of the FFmpeg process, manages
/// threading (or subprocess execution) as appropriate, and returns the final results.
/// You can optionally run this job synchronously or, if the `async` feature is enabled,
/// as an async task that you `.await`.
///
/// # Synchronous Example
///
/// ```rust,ignore
/// // Assume we've already built an FfmpegContext
/// let context = FfmpegContext::builder()
/// .input("test.mp4")
/// .filter_desc("hue=s=0")
/// .output("output.mp4")
/// .build()
/// .unwrap();
///
/// // Create a scheduler, start the job, then block until it's finished
/// let result = FfmpegScheduler::new(context)
/// .start()
/// .unwrap()
/// .wait();
///
/// assert!(result.is_ok(), "FFmpeg job failed unexpectedly");
/// ```
///
/// # Asynchronous Example (requires `async` feature)
///
/// ```rust,ignore
/// // Note: you need to enable the "async" feature in Cargo.toml:
/// // [dependencies.ez_ffmpeg]
/// // features = ["async"]
///
/// #[tokio::main]
/// async fn main() {
/// let context = FfmpegContext::builder()
/// .input("test.mp4")
/// .filter_desc("hue=s=0")
/// .output("output.mp4")
/// .build()
/// .unwrap();
///
/// let mut scheduler = FfmpegScheduler::new(context)
/// .start()
/// .expect("Failed to start FFmpeg job");
///
/// // Asynchronous wait
/// scheduler.await.expect("FFmpeg job failed unexpectedly");
/// }
/// ```
pub
pub
pub