Merge pull request 'Two July fixes that were never merged: rpm FFmpeg modules + the released-pointer double cursor' (#71) from worktree-july-rpm-and-cursor into main
android / android (push) Canceled after 0s
apple / swift (push) Canceled after 0s
apple / screenshots (push) Canceled after 0s
arch / build-publish (push) Canceled after 0s
ci / rust (push) Canceled after 0s
ci / rust-arm64 (push) Canceled after 0s
ci / web (push) Canceled after 0s
ci / docs-site (push) Canceled after 0s
deb / build-publish (push) Canceled after 0s
deb / build-publish-host (push) Canceled after 0s
deb / build-publish-client-arm64 (push) Canceled after 0s
docker / builders (--build-arg FEDORA_VERSION=44, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm, -f44) (push) Canceled after 0s
docker / builders (ci/android-ci.Dockerfile, punktfunk-android-ci) (push) Canceled after 0s
docker / builders (ci/arch-ci.Dockerfile, punktfunk-arch-ci) (push) Canceled after 0s
docker / builders (ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Canceled after 0s
docker / builders (ci/rust-ci-noble.Dockerfile, punktfunk-rust-ci-noble) (push) Canceled after 0s
docker / builders (ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Canceled after 0s
docker / builders-arm64cross (push) Canceled after 0s
docker / apps (., web/Dockerfile, punktfunk-web) (push) Canceled after 0s
docker / apps (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Canceled after 0s
docker / deploy-docs (push) Canceled after 0s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Canceled after 0s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Canceled after 0s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 3m56s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Successful in 3m48s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 1m14s
release / apple (push) Successful in 9m31s
flatpak / build-publish (push) Successful in 10m3s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 2m17s

Reviewed-on: #71
This commit was merged in pull request #71.
This commit is contained in:
2026-08-06 13:13:33 +00:00
3 changed files with 42 additions and 12 deletions
@@ -538,14 +538,25 @@ public final class StreamLayerView: NSView {
}
}
/// Tell the host who renders the pointer (the §8 mid-stream render flip): we draw it only
/// while the DESKTOP model is engaged (the local OS cursor wears the host shape); under
/// the capture model and while released the host composites it into the video (full
/// fidelity, the pre-channel look). One edge-detected reconciler, called from every
/// Tell the host who renders the pointer (the §8 mid-stream render flip). The host may
/// composite one into the video ONLY while we are holding a grabbed, hidden pointer the
/// capture model, engaged. That is the one state with no local cursor on screen.
///
/// Every other state leaves a normal OS cursor visible over the video: the desktop model
/// draws it wearing the host's shape, and a RELEASED view shows the plain arrow. A
/// host-composited pointer then appears *underneath* it as a second cursor and, because a
/// released view forwards no motion, one that never moves. On glass that reads as a frozen
/// duplicate stuck wherever the host pointer was last left (verified: `client_draws=false
/// blended=true live=(-1, 622)` parked on the streamed output's left edge while the user
/// moved their own cursor around freely).
///
/// So "released" counts as WE draw it: the host stops compositing, the client keeps
/// receiving shape/state over the channel (the forwarder only ticks on this side of the
/// flip), and re-engaging is seamless. One edge-detected reconciler, called from every
/// transition (chord, engage/release, session start).
private func reconcileCursorRender() {
guard cursorChannelActive, let connection else { return }
let clientDraws = captured && desktopMouse
let clientDraws = !captured || desktopMouse
guard sentClientDraws != clientDraws else { return }
sentClientDraws = clientDraws
connection.setCursorRender(clientDraws: clientDraws)
+16 -7
View File
@@ -1049,15 +1049,24 @@ fn run_inner(mut opts: SessionOpts, mut mode: ModeCtl) -> Result<Option<Outcome>
.as_ref()
.is_some_and(|cap| cap.captured() && cap.desktop());
chan.pump(c, &mouse, desktop_active, fit_scale);
// §8 mid-stream render flip: tell the host who renders the pointer whenever
// the local model changes. Desktop-active = we draw it (host excludes +
// forwards); anything else — the capture model OR a released pointer — the
// host composites it into the video (full fidelity, the pre-channel look).
// §8 mid-stream render flip: tell the host who renders the pointer whenever the
// local model changes. The host may composite one ONLY while we hold a grabbed,
// hidden pointer — the capture model, engaged — because that is the one state
// with no local cursor on screen. Note this is deliberately NOT `desktop_active`:
// a RELEASED pointer leaves the ordinary window cursor visible over the video,
// and a host-composited pointer then sits UNDER it as a second cursor that never
// moves (released forwards no motion), which reads on glass as a frozen
// duplicate. Released therefore counts as "we draw it" — the host stops
// compositing and keeps forwarding shape/state, so re-engaging is seamless.
// One edge-detected reconciler covers the chord, the M3 auto-flip, and
// engage/release alike.
if chan.negotiated() && st.sent_client_draws != Some(desktop_active) {
st.sent_client_draws = Some(desktop_active);
let _ = c.set_cursor_render(desktop_active);
let client_draws = match st.capture.as_ref() {
Some(cap) => !cap.captured() || cap.desktop(),
None => true,
};
if chan.negotiated() && st.sent_client_draws != Some(client_draws) {
st.sent_client_draws = Some(client_draws);
let _ = c.set_cursor_render(client_draws);
}
}
// M3 — host-driven mode flip: `relative_hint` set = a host app grabbed/hid the
+10
View File
@@ -83,9 +83,19 @@ BuildRequires: pkgconfig(opus)
# FFmpeg dev headers with NVENC — from RPM Fusion (ffmpeg-devel), NOT ffmpeg-free.
# Version-agnostic: ffmpeg-sys-next auto-detects the installed FFmpeg, so this builds
# against FFmpeg 7.x (libavcodec 61, e.g. Fedora 43 / Bazzite) or 8.x (libavcodec 62).
# ALL SEVEN modules, not just the three we call directly: `ffmpeg-next` is pulled with default
# features, so its `-sys` build script pkg-config-probes codec/device/filter/format/util/
# resampling/scaling and panics on the first one missing. RPM Fusion's ffmpeg-devel ships the lot
# in one package, which hid the gap — on a box where these resolve to Fedora's split
# libav*-free-devel packages instead, dnf installed only the three named here and the build died
# in ffmpeg-sys-next's build.rs on `libavfilter`.
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavdevice)
BuildRequires: pkgconfig(libavfilter)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswresample)
BuildRequires: pkgconfig(libswscale)
# Zero-copy GPU path: src/zerocopy/ links libGL + libgbm (mesa) via hand-rolled FFI.
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(gbm)