Commit 12e60f7
feat(compositor): scaffold macOS Metal+VideoToolbox port
Branch off the CPU-backend seam established by PR #162 and split the
compositor crate into per-platform directories. Windows behaviour is
byte-identical (81 tests pass) and the macOS stubs that follow this
commit in the stack expose the same public surface (Backend, Gpu,
Compositor, Decoder, VideoEncoder, ExportCodec, ClipSource, LiveParams,
LayerCB...) and Err from every operation.
Renames + cfg dispatch:
- crates/compositor/src/d3d_windows.rs (from d3d.rs)
- crates/compositor/src/cpu_frames_windows.rs (from cpu_frames.rs)
- crates/compositor/src/compositor_windows.rs (from compositor.rs)
- crates/compositor/src/pipeline_windows.rs (from pipeline.rs)
- crates/compositor/src/text_windows.rs (from text.rs)
- crates/compositor/wrapper_windows.h (from wrapper.h)
lib.rs cfg-dispatches 'd3d', 'cpu_frames', 'compositor', 'text' across
the per-platform modules so call-sites stay portable.
live.rs: Win32 harness (run_standalone, host_proc, wide, client_size)
moved into a #[cfg(windows)] pub mod standalone_harness with a
dev-only on Windows).
Cargo.toml: macOS deps (metal, objc, block, core-foundation) added
under [target.cfg(target_os = macos).dependencies]; windows dep
gated to cfg(windows). compositor-view-napi mirrors the gate.
crates/.cargo/config.toml: target-specific env block for macOS
(LIBCLANG_PATH not needed, MAC_FFMPEG_DIR falls back via build.rs).
build.rs: selects wrapper_windows.h vs wrapper_macos.h on
CARGO_CFG_TARGET_OS, sets bindgen --target=aarch64-apple-darwin +
-isysroot on macOS, finds MAC_FFMPEG_DIR or vendored
thirdparty/ffmpeg-n8.1.2-macos64-lgpl-shared.
Stacked on feat/d3d-warp-fallback (PR #162).1 parent d0a091a commit 12e60f7
14 files changed
Lines changed: 415 additions & 47 deletions
File tree
- .github/workflows
- crates
- .cargo
- compositor-view-napi
- compositor
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
100 | 146 | | |
101 | 147 | | |
102 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
| 26 | + | |
0 commit comments