Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9bba0f5
feat(compositor): fail legibly when D3D11 init fails, instead of fall…
EtienneLescot Jul 27, 2026
c305e35
docs(compositor): correct the WGC rationale -- capture is not mandatory
EtienneLescot Jul 27, 2026
d4db3a0
feat(compositor): add a CPU backend -- WARP render + software decode,…
EtienneLescot Jul 27, 2026
8a0b119
feat(compositor): select the CPU backend automatically, and tell the …
EtienneLescot Jul 27, 2026
13e1a31
feat(compositor): let the CPU backend reach the export encoder
EtienneLescot Jul 27, 2026
81e68ee
Merge branch 'release/v1.8.0' into feat/d3d-warp-fallback
EtienneLescot Jul 27, 2026
994b65d
feat(compositor): scaffold macOS Metal+VideoToolbox port
Jul 28, 2026
cc66bc7
feat(compositor): mac_frames.rs — software decode → NV12 → CVPixelBuf…
Jul 28, 2026
a0bd38d
feat(compositor): add d3d_macos, text_macos, wrapper_macos — backend …
Jul 28, 2026
40740b0
feat(compositor): compositor_macos — Compositor skeleton, CVMetalText…
Jul 28, 2026
003bc67
feat(compositor): shaders.metal — MSL port of all 9 shader entry points
Jul 28, 2026
89458a3
feat(compositor): pipeline_macos — VideoToolbox hwaccel decode + dual…
Jul 28, 2026
3ff7671
fix(compositor/build.rs): discover macOS SDK via xcrun on macOS
Jul 28, 2026
3257688
fix(ci): indent the build: job so the macOS job parses
Jul 28, 2026
afe7585
feat(compositor): compositor_macos engine — render targets, MSL pipel…
Jul 28, 2026
5d567d9
feat(compositor): pipeline_macos::Decoder — seek / next / cur_time_se…
Jul 28, 2026
899e4d9
feat(compositor): pipeline_macos::VideoEncoder — h264_videotoolbox + …
Jul 28, 2026
c23d960
feat(compositor): pipeline_macos::run_composited_multi — multi-clip e…
Jul 28, 2026
daa9fe0
feat(compositor): text_metal — CoreText/CoreGraphics text rasterizer
Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,52 @@ jobs:
- uses: ./.github/actions/setup
- run: npx vite build

# PR #189 — port macOS du compositor (Metal + VideoToolbox).
#
# Compile check on a `macos-14` runner (Apple Silicon). Verifies that the
# scaffold + engine-layer code added by #189 actually compiles for
# `aarch64-apple-darwin` — bindgen + cc on macOS produce the ffmpeg FFI
# bindings + the VideoToolbox context that the Rust crate statically
# references, and the `metal`/`objc`/`block`/`core-foundation` crates need
# their macOS system frameworks (Metal/CoreVideo/CoreMedia) linked.
#
# ffmpeg via Homebrew: this job installs `ffmpeg` from homebrew-core on the
# runner to satisfy bindgen + the cargo:rustc-link-lib lines for avformat/
# avcodec/avutil/swscale/swresample. NB: homebrew's `ffmpeg` is GPL-3.0 (it
# bundles x264/x265/svt-av1 etc.) — that is fine for a CI compile-check, but
# the dev/runtime story is different: `scripts/fetch-ffmpeg.mjs` documents
# that BtbN publishes no macOS build, so a pinned LGPL macOS dylib has to
# land separately before we can ship. The vendored `electron/native/bin/
# darwin-*/` directory is the runtime pin and is empty today.
#
# Why this job runs at all today: every commit on #189 that touches
# compositor_macos.rs / pipeline_macos.rs / mac_frames.rs / shaders.metal /
# d3d_macos.rs / text_macos.rs is unverifiable from Windows (cross-compile
# requires the macOS SDK + headers, which we don't have). This job is the
# only signal that the macOS-side Rust still type-checks.
rust-macos-compositor-check:
name: Rust check (macOS compositor)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --target aarch64-apple-darwin
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install ffmpeg (homebrew-core) and verify headers/libs
run: |
brew update
brew install ffmpeg
ls /opt/homebrew/opt/ffmpeg/include | head -5
ls /opt/homebrew/opt/ffmpeg/lib | head -5
/opt/homebrew/opt/ffmpeg/bin/ffmpeg -hide_banner -version | head -1
- name: cargo check (compositor + napi addon, aarch64-apple-darwin)
env:
MAC_FFMPEG_DIR: /opt/homebrew/opt/ffmpeg
run: |
cd crates
cargo check --target aarch64-apple-darwin -p openscreen-compositor -p compositor-view-napi

semantic-pr:
name: Validate PR title (semantic)
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions crates/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@
[env]
FFMPEG_DIR = { value = "thirdparty/ffmpeg-n8.1.2-win64-lgpl-shared", relative = true }
LIBCLANG_PATH = "C:\\Program Files\\LLVM\\bin"

# macOS : BtbN ne publie pas de build macOS (cf. scripts/fetch-ffmpeg.mjs), donc on
# laisse `crates/compositor/build.rs` chercher MAC_FFMPEG_DIR (env var explicite posée
# par la CI macOS ou par le dev local) ou un répertoire attendu sous `thirdparty/`.
# LIBCLANG_PATH est inutile sur macOS (clang est dans CommandLineTools), on ne le
# pose donc pas.
[target.'cfg(target_os = "macos")'.env]
6 changes: 4 additions & 2 deletions crates/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# dépendance téléchargée : build ffmpeg LGPL-shared BtbN (~160 Mo, voir README)
/thirdparty

# sorties générées (vidéos C*.mp4, PNG, GIF, dumps)
/out
# sorties générées (vidéos C*.mp4, PNG, PPM, GIF, dumps). Le glob couvre les `--out`
# nommés par backend (out-hw/, out-cpu/) : un PPM de preuve pèse 6 Mo et il en sort un
# par cfg et par backend.
/out*
*.raw
*.nv12

Expand Down
142 changes: 131 additions & 11 deletions crates/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions crates/compositor-view-napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "compositor-view-napi"
version.workspace = true
edition.workspace = true
description = "Addon napi-rs : expose openscreen_compositor::live::LiveView (fenêtre D3D enfant) à Electron. C'est CE crate qui produit compositor_view.node, le binaire packagé dans l'app."
description = "Addon napi-rs : expose openscreen_compositor::live::LiveView (vue offscreen multiplateforme) à Electron. C'est CE crate qui produit compositor_view.node, le binaire packagé dans l'app."

[lib]
crate-type = ["cdylib"]
Expand All @@ -14,9 +14,13 @@ napi-derive = "2"
openscreen-compositor.workspace = true
anyhow.workspace = true

[dependencies.windows]
# Le crate n'utilise pas directement l'API Windows — c'est transitif via le
# moteur de composition (qui expose la même surface publique cross-platform via
# la ré-export cfg dans `openscreen_compositor::lib`). On garde la dépendance
# cfg-conditionnelle pour que le crate compile sur macOS.
[target.'cfg(windows)'.dependencies.windows]
version = "0.58"
features = ["Win32_Foundation"]

[build-dependencies]
napi-build = "2"
napi-build = "2"
Loading
Loading