Skip to content

4.0 - #234

Open
mjfrank wants to merge 49 commits into
swellweb:mainfrom
mjfrank:4.0
Open

4.0#234
mjfrank wants to merge 49 commits into
swellweb:mainfrom
mjfrank:4.0

Conversation

@mjfrank

@mjfrank mjfrank commented Nov 9, 2026 •

Copy link
Copy Markdown

Changes in 4.0 compared to 3.6.0

Based on upstream 3.6.0 (11b156f): 48 commits, 75 files changed (+7,963 / −160). The 3.6.1 and 3.6.2 maintenance releases are not included in this branch yet.

1. Uncompressed video

Four new options next to Automatic, H.264 and HEVC:

Option Captured Sent and shown Frame rate at 5K
Uncompressed (8-bit) 8-bit 4:2:0 8-bit 4:2:0 60 Hz
Uncompressed, LZ4, lossless (8-bit) 8-bit 4:2:0 8-bit 4:2:0, compressed losslessly 60 Hz
Uncompressed, enhanced (10-bit dithered, experimental) 10-bit 8-bit 4:2:0 with dithering 60 Hz
Uncompressed, full colour (10-bit, experimental) 10-bit 10-bit RGB 4:4:4 about 30 fps for video and scrolling
  • Changed rows only: the Sender uses ScreenCaptureKit's dirty rectangles and sends only the rows that changed. The first frame, size changes and one frame every 5 seconds are sent in full (TBRawRegions.swift, raw_regions.c/.h).
  • Lossless LZ4: changed rows are compressed in parallel chunks on the Sender and decompressed in parallel on the Receiver. The picture stays bit-identical.
  • 10-bit dithered: captured in 10-bit; a GPU shader converts the rows to send to 8-bit 4:2:0 with an ordered 4×4 dither pattern (TBTenBitConverter.swift).
  • Full 10-bit colour: 10-bit RGB at 4 bytes per pixel, with LZ4 while it pays off (desktop content) and raw for video.
  • Parallel data streams: up to 4 extra connections share each frame. The Receiver puts rows back in order and draws a frame only when all of its parts have arrived. Session setting Parallel connections, on by default.
  • 5K60 stream profiles: 5K 60 Uncompressed (8-bit), 5K 60 LZ4, lossless (8-bit), 5K 60 10-bit dithered and 5K 60 Full 10-bit. Automation accepts them as 5k60raw, 5k60lz4, 5k60dither and 5k60full10.
  • Fallbacks: each capability falls back on its own. An older Receiver gets full frames, a Receiver without LZ4 gets uncompressed rows, and without a usable GPU or 10-bit support the Sender uses the next simpler mode.
  • Protocol: only new optional fields and new packet types, so 3.x Receivers keep working with the existing codec modes.

2. Receiver: drawing and performance

  • Own Metal video renderer, now the default for H.264/HEVC and every uncompressed mode (tb_metal_view.m). It fixes the flashing of SDL's Metal mode and is what shows full 10-bit colour. SDL Metal and SDL OpenGL remain available under Performance > Renderer (Expert Settings).
  • The Receiver uploads only the changed rows to the graphics card.
  • Performance submenu:
    • Draw only the newest frame
    • Wake on incoming data
    • Stats overlay: frame rate, skipped frames, draw time, data rate and the share of changed rows
  • Larger receive buffers for the 10-bit streams.

3. Receiver: app and UI

  • App mode: Standard (window and Dock icon), Background (menu bar icon only, no Dock icon) or Faceless (no window or icons). Always show this window at start works in every mode.
  • New bottom bar with the Receiver's checkboxes, the version and the Login Items hint.
  • Fixed the upside-down waiting screen.
  • Sign-in screen mode (experimental): the iMac works as a display while the Mac shows its sign-in window, with nobody logged in. It is installed and uninstalled from the menu bar icon; nothing is installed by default (tb_signin_mode.m).

4. Sender

  • Connect automatically now connects as soon as the Receiver appears: when the cable is plugged in, the Receiver starts or the Sender opens.
  • New Keep alive option (off by default): reconnects after a lost connection, but not after Stop and not after the session was ended on the Receiver.
  • App mode in Settings: Standard, Background or Faceless.
  • Session names are editable, and session settings open in a regular window.
  • The macOS display is named after the session.
  • The default language follows the system, with an English fallback.
  • Version check: Sender and Receiver exchange versions. On a mismatch, both show a notice with a download link (TBVersionCheck.swift, version_check.c).
  • New add-ons: Brightness Keys and Audio Device.

5. Audio

  • TargetBridge Audio output device (new audio driver), selectable as a per-session audio source and present in macOS only while a session is running.
  • The Mac's volume for this device drives the iMac's speaker volume, and the iMac returns to its previous volume when the session ends.
  • Each session can switch to its audio output automatically and returns to the previous output afterwards, with the built-in output as fallback.
  • The audio device can be renamed in Settings > Audio. If the driver needs a restart, the Sender shows the sudo killall coreaudiod hint.

6. Build, CI and signing

  • CI builds the Sender and Receiver for Apple Silicon and Intel, runs the new tests and uploads the apps as downloads.
  • scripts/sign-local.sh signs all downloads in its folder in one go with your own certificate, so macOS keeps Screen Recording, Accessibility and Input Monitoring permissions across updates. Step-by-step guide in docs/Sender-Signing.md.
  • Version set to 4.0.

7. Tests, docs and translations

  • New tests:
    • Sender: changed rows, version check, audio source, preferences
    • Receiver: changed rows (including out-of-order parts and malformed packets) and the version check
  • New and updated docs:
    • Release notes in docs/releases/4.0.md
    • Performance.md, Features.md, Addons.md and audio.md
    • SignIn-Screen-Mode.md
    • README
  • New and updated strings in all five languages (de, en, fr, it, zh).
  • Updated README screenshots.

Validation and known limitations

  • The 8-bit uncompressed modes have been tested on a real Mac-to-iMac Thunderbolt setup.
  • The 10-bit modes were reworked after a first hardware test and still need another hardware test.
  • Full 10-bit colour needs the TargetBridge Metal renderer; with an SDL renderer the Sender uses the dithered mode.
  • Uncompressed modes are not available for headless mirror sessions.

mjfrank and others added 30 commits November 6, 2026 09:31
Add a libASPL loopback driver that appears as an output device in macOS.
Sessions can use it or the existing system audio capture, with the default
set in Settings. The app embeds the driver and can install it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
Follow the system language with an English fallback, and force the dark
appearance in Settings so its text stays readable. Add session names,
auto-connect and an uncompressed option using the raw NV12 pipeline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
Hide the session volume slider for this source because the Mac sets the
level. The receiver returns to the slider level when the session stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
The Receiver saves its volume before a temporary level and restores it on
any session end, including a dropped connection.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
The driver leaves the stream at full level, and the Sender forwards the
device's volume and mute to the Receiver. The Receiver restores its
pre-session volume when any session ends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
The driver stores the name through CoreAudio, so renaming needs no admin
password or restart. Settings shows the manual restart command with any
driver error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
Brightness keys adjust the receiver under the mouse pointer. The audio
device source and its driver controls now need their own bundled add-on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
The Receiver can wait without a window or Dock icon, which makes it easy to
start at login. A session brings the window back until it ends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
The status layout assumed a bottom-left origin on a top-left canvas. The
version and background checkboxes now share a bar at the bottom.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
Draw only the newest decoded frame, wake on incoming data, choose the
Metal renderer, and show per-second stats. All live in a Performance
submenu of the menu bar icon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
The driver adds the device when a session asks for it and removes it when
the session ends or the Sender process goes away. New sessions select the
device automatically.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywxDQfp7oFXTp2wxEh2
With Uncompressed video, the Sender now reads ScreenCaptureKit's dirty
rects and sends only the changed rows of the 4:2:0 picture (packet type
0x24). Rows from frames skipped by the pacer or backpressure stay
pending and go out with the next frame. The first frame, size changes,
frames without dirty-rect data and one frame every 5 seconds are sent
in full.

The new "Uncompressed, LZ4 (lossless)" option compresses the changed
rows with LZ4 in parallel 64-row chunks. The Receiver patches the rows
into its own copy of the picture, decodes chunks in parallel and
uploads only the changed rows to the texture. It advertises
supportsRawRegions and supportsRawLZ4, so older Receivers keep getting
full frames. RAW_REGIONS=0 turns the change off for comparisons, and
the stats overlay shows the share of rows that changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two new video compression options build on Uncompressed with LZ4:

- "Uncompressed, enhanced (10-bit dithered)" captures in 10-bit and
  displays in 8-bit. A Metal shader converts only the rows to send to
  8-bit 4:2:0 (BT.709, video range) with a fixed, position-based TPDF
  dither, so gradients stay smooth at the 8-bit bandwidth.
- "Uncompressed, full colour (10-bit)" sends the captured 10-bit RGB
  unchanged at 4 bytes per pixel (format 2), about 30 fps at 5K for
  video. The Receiver uploads it as an ARGB2101010 texture and its
  stats show whether the renderer keeps 10 bits.

Both open up to 4 extra TCP connections, authenticated with a token
from the Receiver's display profile, and split each frame's changed
rows into parts of similar size (packet type 0x26). The Receiver keeps
a frame sequence per row pair so an older part never overwrites rows a
newer one delivered. Each piece falls back on its own when the GPU or
the Receiver cannot use it.

The existing options are now named "Uncompressed (8-bit)" and
"Uncompressed, LZ4, lossless (8-bit)", and both apps are version 4.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
mjfrank and others added 19 commits November 8, 2026 12:19
Four 5K 60 profiles (Uncompressed 8-bit, LZ4 8-bit, 10-bit dithered,
full 10-bit) set the matching video compression themselves; the
compression picker shows it and is locked while such a profile is
chosen. Automation accepts them as 5k60raw, 5k60lz4, 5k60dither and
5k60full10.

Sender and Receiver now exchange their app versions. On a mismatch the
Sender shows a notice with a download button, and the Receiver shows it
on the picture for 20 seconds and in its menu bar with a download item
until the session ends. Both name the app that should be updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
With TARGETBRIDGE_CODESIGN_P12_BASE64 and _PASSWORD set, the CI jobs
import the certificate like the release workflow, so every build keeps
the same signing identity and macOS keeps privacy permissions across
updates. A self-signed certificate is trusted for code signing on the
throwaway runner. Without the secrets, builds stay ad-hoc as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
The release notes, README and Performance guide now cover the 5K
profiles for the uncompressed modes, the version check and keeping
privacy permissions with a persistent signature.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
No central signing for now: CI builds stay ad-hoc again. Instead,
scripts/sign-local.sh signs the installed Sender and Receiver with a
certificate from the login keychain (nested code first), removes the
download quarantine and verifies the result. Docs/Sender-Signing.md
explains the one-time certificate setup; the README install section and
the 4.0 release notes point to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
Dithered (10-bit captured, 8-bit shown):
- Ordered 4x4 Bayer dither instead of hash noise, so LZ4 compresses again.
- Parts carry their part count (header byte 12); the Receiver draws a frame
  only once all parts arrived (100 ms fallback) and counts skipped frames,
  not parts.

Full 10-bit:
- New Metal view on the Receiver: 10-bit BGR10A2 drawable and texture,
  filled by a GPU blit of the changed rows straight from the page-aligned
  frame memory, drawn into SDL's render pass with overlays on top.
- Receiver offers full 10-bit only with the Metal renderer.
- Sender compresses 10-bit rows only for small changes.
- Metal presents in sync with the display in the uncompressed modes.

Docs, release notes and hints updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
Destroying and recreating the stats texture every second made SDL's Metal
renderer flash the picture once a second. The texture is now created once
and only its pixels are replaced.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
- New default renderer "TargetBridge Metal": SDL keeps the window, waiting
  screen, cursor and overlays; the Metal view draws all video: decoded
  H.264/HEVC (CPU upload), NV12 changed rows and 10-bit RGB (GPU blits
  straight from the page-aligned frame memory, both planes now aligned).
  NV12 is converted to RGB (BT.709, video range) in a shader.
- Performance > Expert settings (for developers): renderer choice
  (TargetBridge Metal, SDL Metal, SDL OpenGL; applies after restart) and
  waiting for the display refresh in uncompressed modes (off by default).
- Stats name the renderer; docs, release notes and hints updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
…text

- Sender: full 10-bit compresses with LZ4 while it pays off (desktop
  content, moving windows) and sends raw for 30 frames after a frame LZ4
  shrank by less than 20 % (video), instead of going raw whenever more than
  a quarter of the screen changed.
- Receiver: receive buffers of up to 16 MiB, set on the listening socket so
  the TCP window scale allows them; a whole frame keeps arriving while the
  previous one is drawn.
- Stats overlay grows with its text and shrinks the font if the line is
  wider than the screen.
- Menu renamed to "Renderer (Expert Settings)".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
…ode within 5K profiles

- New session setting "Parallel connections" (on by default) for all
  uncompressed modes, including 8-bit and LZ4; previously only the 10-bit
  modes used the data streams.
- The four 5K uncompressed profiles no longer lock the video compression:
  they start with their own mode and offer the four uncompressed modes; the
  choice is stored with the session and reset when the profile changes.
- Strings in all five languages, docs and release notes updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
…ve option

- "Connect automatically" now connects when the receiver appears (cable
  plugged in, receiver started, Sender opened), like plugging in a display.
  A session that ends while the receiver stays reachable stays ended.
- New per-session "Keep alive" (off by default) reconnects every 3 s after
  an unexpected loss; not after Stop, a cable test, or a session the
  receiver ended (teardown packet).
- Strings in five languages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
- "--login-window" mode: started by an opt-in LaunchAgent
  (LimitLoadToSessionType LoginWindow) while the iMac shows the sign-in
  window. Window only during a session, at the shielding level and allowed
  before login; no menu bar icon or waiting screen; input control requests
  ignored. Esc, a double-click or Cmd+Q on the iMac send a teardown and end
  the session, and new sessions are refused for 5 minutes. Quits when a user
  logs in.
- Receiver menu "Sign-in screen mode (experimental)": Install… / Uninstall…
  with an administrator prompt; shows whether it is installed.
- Strings in five languages; new docs/SignIn-Screen-Mode.md.
- docs/Sender-Signing.md: step-by-step guide for apps in Applications
  (create the certificate, add it to each Mac, download the script, sign
  after each update, troubleshooting). README and release notes updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
…ng note

- Choosing a 10-bit dithered or full 10-bit profile, or picking one of those
  modes, switches the session's "Parallel connections" on.
- Docs: the sign-in screen mode needs no privacy permissions; signing with
  your own certificate is needed only with the macOS firewall on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
- Sender and Receiver: Standard (window and Dock icon), Background (menu bar
  icon only, no Dock icon) and Faceless (no window or icons). Opening the
  app again (Finder, Dock, Launchpad) shows the window in every mode.
  Receiver: drop-down in the window's bottom bar replaces "Run in
  background", "App mode" submenu in the menu bar icon; "Always show this
  window at start" works in every mode. Sender: picker in Settings.
- Receiver sign-in screen mode never shows statistics.
- sign-local.sh: by default unpacks and signs every app in its own folder
  (Sender and Receiver, arm64 and x86_64), lists which app belongs on which
  Mac and offers to install the ones for this Mac; --applications signs the
  installed apps. Signing guide, README and release notes updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015AiywzXyRsfrH6x9nyNXRQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant