76 lines
4.0 KiB
Plaintext
76 lines
4.0 KiB
Plaintext
Rune app (replaces tauri-app)
|
|
|
|
Decided
|
|
- UI framework: rune (github.com/anomalyco/rune, pin a dev rev). gpui is the
|
|
fallback if rune fights back. Decide via a time-boxed spike on the Settings
|
|
screen; it exercises switches, dropdowns, tables and text input.
|
|
- Video: libmpv2 crate (repo kohsine/libmpv-rs, v7.0.1, render feature on by
|
|
default). Requires libmpv >= 2.0 (mpv 0.35+); bundle libmpv-2.dll from the
|
|
shinchiro mpv-winbuild mpv-dev archive, same as we bundle obs.dll.
|
|
- Installers: cargo-packager (CrabNebula), NSIS target. Replaces what the
|
|
Tauri bundler gave us. Revisit plain NSIS or Inno in CI if cargo-packager
|
|
lags.
|
|
|
|
Open question before the spike commits to a render path
|
|
- libmpv2's render API is OpenGL-based (anlumo's example renders to an SDL2
|
|
GL window) and rune/gpui render with wgpu. Options, in order:
|
|
1. software render into an RGBA buffer, upload as a texture each frame;
|
|
need to verify libmpv2 exposes MPV_RENDER_PARAM_SW (its docs only show
|
|
the GL path)
|
|
2. share the GL texture with wgpu (external texture interop, painful)
|
|
3. embed a native child window with --wid and drive mpv over JSON IPC
|
|
(mpvipc crate); this is FFI-free but mpv then owns the video surface
|
|
Spike 1 first, fall back to 3. All recordings are H.264 today
|
|
(jim_nvenc, amd_amf_h264, qsv, x264) so every path can decode them.
|
|
|
|
Initial plan
|
|
Each phase ends with something that runs. Phase 1 doubles as the
|
|
rune-vs-gpui decision: if the Settings screen keeps fighting the
|
|
framework, stop and switch to gpui before writing anything else.
|
|
|
|
1. Skeleton: new app/ crate, rune pinned to one dev rev, window opens
|
|
on Windows and renders headlessly to PNG.
|
|
2. Pipe client: port daemon_ipc.rs, keep the serde types identical to
|
|
record-daemon/src/ipc/protocol.rs. Done when the app reads settings
|
|
and status from a running daemon.
|
|
3. Settings screen: general, recording and audio source tabs; device
|
|
dropdowns from getAudioDevices; volume sliders. Done when changes
|
|
save through updateSettings and survive a daemon restart.
|
|
4. Game history: port get_game_history, list games from the timeline
|
|
JSON in the recordings dir. Done when it matches GameHistory.vue.
|
|
5. Video spike: libmpv2 in a standalone example first, software render
|
|
to RGBA and upload as a texture. Done when a clip plays and
|
|
frame-seeks to a timestamp. Fall back to --wid plus mpvipc if the
|
|
software path is not exposed.
|
|
6. Game review: timeline scrubber with event markers over the video.
|
|
Done when clicking an event seeks the video to that timestamp.
|
|
7. OS integration: tray icon, autostart via the registry Run key,
|
|
single instance, notifications for recording start and end.
|
|
8. Installer: cargo-packager NSIS target with the bundle list below.
|
|
Done when the installer works on a clean Windows VM and the app
|
|
records a real game end to end.
|
|
9. Parity check against tauri-app, then delete it.
|
|
|
|
Stable contracts
|
|
- record-daemon does not change. The IPC protocol (IpcCommand serde types
|
|
over named pipes) is the versioned interface between app and daemon.
|
|
- Port tauri-app/src-tauri/src/daemon_ipc.rs (645 lines, pipe client) into
|
|
app/ nearly as-is; it is plain Rust + tokio.
|
|
- Port the disk-side helpers from src-tauri/src/lib.rs: get_game_history,
|
|
export_clip, find_video_file and the ffmpeg_sidecar download logic.
|
|
- Keep tauri-app/ working until the native app reaches feature parity.
|
|
Build app/ as a separate crate; do not mutate tauri-app in place.
|
|
|
|
Installer contents
|
|
- app exe, record-daemon.exe, obs.dll, ffmpeg sidecar, libmpv-2.dll.
|
|
- NSIS fits our layout (small install, OBS and ffmpeg downloaded at first
|
|
run). MSI would want a self-contained package; skip unless we need AD
|
|
deployment.
|
|
- Code signing: unsigned exes that hook games and open named pipes hit
|
|
SmartScreen. Budget for an EV cert or Azure Trusted Signing before
|
|
shipping installers.
|
|
|
|
OS integration to reimplement (was Tauri plugins)
|
|
- tray icon, launch at Windows startup (registry Run key or Startup folder
|
|
shortcut), single instance, notifications for recording start/end.
|