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
//! Pluggable layer compositor for the preview runner.
//!
//! The runner composites each frame with the built-in CPU compositor
//! ([`RealtimeComposer`](ff_filter::RealtimeComposer)). A caller that has a GPU
//! compositor (which `ff-preview` cannot reach directly, since `ff-render` depends
//! on `ff-preview`, not the reverse) can inject one through this seam: the runner
//! tries the injected compositor first and falls back to the CPU path whenever it
//! returns `None` (no GPU, an unsupported layer, or a GPU error). This is how the
//! `avio` engine wires `ff-render` into the preview without a dependency cycle.
use Duration;
use ;
use VideoFrame;
/// An external compositor the preview runner can use in place of its built-in CPU
/// compositor. Implemented by `avio` over `ff-render`; see the module docs.