Skip to content

Latest commit

 

History

History
110 lines (92 loc) · 15.1 KB

README.md

File metadata and controls

110 lines (92 loc) · 15.1 KB

pb-mapper docs

Each page owns one part of pb-mapper: what it does, its limits and what a change must keep. Start with the user guide; contributor rules are in AGENTS.md. Pages marked 中文 are written in Chinese.

Use

Page Covers
User guide · 中文 install, every command and flag, direct connections, credentials, the app, environment variables
Docker the relay as a container: environment, the auth volume, tags
systemd units the relay, register and connect as services
Changelog what each release changed, and what an upgrade needs

SDKs

Page Covers
Rust SDK tunnels, administration, diagnostics, and the remote desktop behind the desktop feature
Node SDK the same client for Node.js and Bun
Relay library the relay embedded in your own process

Remote desktop

Page Covers
Remote desktop the app, gestures, keys and input methods, sharing a Mac, remote resolution, the Windows helper, the SDK, platforms, the video pipeline and each viewer's decoder, measurements
Validation records device and acceptance runs, by build
Overhaul notes 中文; the redesign's working notes: designs, performance priorities, work plan

Paths, relay and recovery

Page Covers
Direct connections 中文; direct first with relay fallback: design and implementation
Direct validation 中文; the acceptance record of direct connections
NAT traversal validation 中文; multi-layer NAT, IPv6 and port mapping
QUIC relay 中文; the optional QUIC carrier to the relay
Weak-network recovery how register, connect and the relay recover when a route returns
UDP datagram forwarding why UDP is framed, and how to validate it
Benchmarks the QUIC measurements, the refactor's performance pass its build times and the open-items passes (credential store, relay, desktop), the remote desktop's data paths before and after every platform and the M3 Pro hardware run
Multi-device control benchmark host_send_bench before and after multi-viewer desktop rooms and coloured peer cursors
Desktop pipeline measurements host_send_bench and the slow-link suite before and after armed capture ticks and the receipt-rate estimator, and the A/B runs behind the withdrawn hand-off and thread-priority changes
Capture pacing measurements host_send_bench before and after present-anchored capture pacing, and the Windows and Mac device runs its effect still needs
Windows host kept awake what a capture call's keep-awake touch costs, and the device checks still outstanding
Rate-model latch measurements the slow-link suite, with an encoder that budgets per second, before and after the rate-model latch read the last 2 s of QoS ticks instead of two 3 s windows
Viewer fps cap measurements the slow-link suite, three runs before and after the viewer's fps cap measured its decoder, raised in steps scaled to the ceiling and drained a backlog instead of freezing until the IDR
Shared direct cooldown measurements connect_tcp's time to the first byte inside a direct pause, before and after one client's calls share it
Mac viewer decoder stats the macOS viewer's new decode time and decoder-thread CPU, read by the acceptance tool at 1080p and 4K, against a paced VideoToolbox harness on the same clips
Native pointer shape measurements ui/tool/pointer_latency.dart on the macOS runner: a pointer shape change through a rebuild and the post-frame pass, against the direct system cursor and runner bitmap calls the cursor session makes, and how long a painted pointer took to draw after a mouse move
Arrival time and keyframe seq measurements the slow-link suite, three runs before and after receipts and probe echoes carried the viewer's arrival times and keyframe requests named the last seq read, with a queue on the viewer's uplink, the bandwidth-limit case 16 times before and 35 after (and 32 on the same build timing round trips), and host_send_bench before and after, with the rejected header-stamp variant's split TLS record
Receipt-driven rate control measurements the slow-link suite, five runs before and after receipts cut bits per frame within a round trip and the frame rate only from the delivery rate at the preset's floor, with new cases for a 3 Mbit/s limit, a drop to 5 Mbit/s, a longer route and recurring stalls, the 1 Mbit/s case ten more times each on the builds before and after the review fixes, and host_send_bench before and after
Reconnect start rate measurements the slow-link suite's reconnect on a 1 Mbit/s link, five runs before and after a session started at the rate the last one its transport ended had ended at, and five on a first version whose lowered start climbed back only at the receipts' plain raise: the time to the reconnect's first picture, its IDR's bytes, its startup queue and pace, and how long a later viewer on a fast link took to climb
Pointer cadence measurements host_send_bench's new shape and host-pointer cases before and after the 2 ms shape look and the pace-driven pointer clock, and ui/tool/hover_frames.dart on the macOS runner: frames drawn while the mouse sweeps over a still picture, before and after the cursor layer stopped repainting for a hover that paints nothing
Viewer pixel snap measurements the contrast a 1-pixel stroke keeps through the viewer's picture transform, before and after keeping a 1:1 picture on device pixels and showing a near-1 fit at exactly 1:1
Mac desktop check reuse what the session and geometry check around each Mac capture and pointer read costs thread C and WindowServer, back to back and paced at 60 FPS, before and after reusing a passing one for 16 ms
Mac VideoToolbox submit thread what a VideoToolbox submit costs a Mac host's thread C and an input queued meanwhile, and VideoToolbox's dwell with four and two units in flight, before and after the encoder's own submit thread
Mac VideoToolbox rate control what low-latency VideoToolbox drops with and without a QP bound of 51, how soon a dropped last picture after an IDR arrives with and without sending it again, its rate model under a pace that follows QoS, low latency against standard rate control at 120 FPS, and a bitrate cut
Mac capture cadence what finding a display costs ScreenCaptureKit with every window and with the on-screen windows only, and reading a display's refresh, on a Mac whose screen was locked, and the device runs the capture cadence, a held-back change, the pause, the start, the kept capture and the filled frame still need
Windows encoder settings the VideoToolbox and hand-built SPS samples behind the H.264 SPS rewrite, Core Media building a decoder's format from each rewrite, and the device runs the High profile, quality against speed, the display-remoting scenario and the GPU priority still need
Windows capture conversion the rotation, display-mode size and odd-edge crop geometry tested on every platform, a type-check of the Windows host from a Mac, and the device runs direct conversion, rotated displays, the crop, the video processor's GPU geometry test and its quality still need
Still refinement the refinement policy's tests and a type-check of the Windows host, a VideoToolbox run showing why a Mac host has no burst (it sharpened sooner but converged no sooner), and the Windows device runs that decide which encoders refine
Mac VideoToolbox padded capture the parameter sets VideoToolbox writes at padded sizes and their crop, the same bytes a session at the content's size writes, Core Media and VideoToolbox's decoder reading the crop at the content's size, VideoToolbox's dwell, units a second and encode call with the content coded at its own size, padded to a multiple of 16, and on buffers that say they extend to one, at five sizes, both codecs and two paces, and the ScreenCaptureKit check a device still needs
Mac viewer layer presenter the macOS viewer's opt-in Core Animation layer presenter against Flutter's texture: decode, commit and CPU in acceptance replays at 1080p, 1440p and 4K with the display asleep, the layer's colours, grey still and snapshot rendered offscreen, and the runner's points of interest in a trace
Viewer display refresh a loopback session whose viewer is told its window's display went to 60 Hz and back: how soon the host paces at the new rate on Smooth and Balanced, and the app, Windows and Linux runs it still needs
Encoder throughput cap the slow-link case lan_rtt_keeps_120, three 40-second runs before and after a host capped the pace at its encoder's measured throughput, with a synthetic encoder serving a unit each 11 ms one at a time and one keeping each 45 ms but taking many; the whole slow-link suite after; host_send_bench before and after; a first version's runs, whose probes refilled the encoder every 6 s; and the Windows device runs it still needs
Host direct congestion control Cubic against BBR for the host's direct video over a lossy, delayed or policed loopback hop: direct_cc_bench's open-loop grid of round trips, losses, policers and rates, and three runs of the real session with its receipts setting the rate; why the host keeps Cubic, and the WAN runs still needed
Mac viewer picture enhancement the macOS viewer's Sharpen enlarged picture, run with the runner's own code: each GPU pass's time at 1080p, 1440p and 4K enlarged to Retina and 4K sizes and at 1:1, colour, ringing and sharpness against Core Animation's linear filter with crops, the metal layer's placement on whole pixels, the decoder thread's hand-off and the presenter thread's presents in a window, and an acceptance replay with the display asleep
Linux plane scaling the Linux video plane's area-averaged shrinking and Sharpen enlarged picture, its GL code run on a Mac's OpenGL 4.1 core: each filter against a CPU reference, SSIM against Lanczos-3 and edge contrast with crops, the GPU time of each filter from the plane's own timer queries, and its GLSL ES 1.00 shaders compiled in WebGL; nothing on a Linux device
Standby session measurements ten runs each over an in-process relay: a live path that holds every byte while its standby's lives (to the promoted session's picture and input, and the IDRs), the same without a standby at the base commit and on this branch (to the read timeout, and a timed reconnect), and a relayed session moving to direct (to the direct route, the IDRs, the longest gap, and what the relay standby beside it carries); and the NAT and firewall runs a device still needs

Security

Page Covers
Authentication and protocol v2 · 中文 the administrator key, temporary credentials, namespaces, persistence, the first flight
Data encryption --codec, per-leg negotiation and rolling upgrades

App

Page Covers
UI design the pages, the galaxy, the design system, how the app reaches the relay, tests and previews
Updates and mobile releases the signed self-update per platform
Building the app the FFI boundary, the app's architecture, building and running
macOS signing 中文; signing a macOS release

Project

Page Covers
Architecture the code map: every crate and module, the layering, the app's pages and FFI, building and testing
Rust engineering guide how Rust is written here: crates, types, errors, async, processes, wire formats, tests and lints
Refactor open items what the 2026-11 refactor and its fixes left on purpose: compatibility breaks, large changes, upstream dependencies, trade-offs kept
Bugfix notes · 中文 how recurring problems were found and fixed
Claude code review the pull-request review workflow
Introduction 中文; why the project exists and how it grew
Shared mutability and locks 中文; when a data structure needs a lock, from the timing wheel's rewrite
Video script 中文; coding from anywhere with HAPI and pb-mapper

Historical

Kept for design intent; each describes an implementation that has since changed.

Page Covers
UI as a CLI a 2025 design, from before the unified binary
Send, Sync, Pin and async 中文; why forwarding futures must be Send + 'static
VibeVoice integration 中文; an integration on the removed Rinf architecture