- Call CoInitializeEx(MTA) at start of captureThread() and CoUninitialize() on exit
- Windows 11 enforces per-thread COM initialization more strictly than Win10,
causing GetBuffer/GetNextPacketSize to fail silently without this
- Add HRESULT error logging for WASAPI capture failures (GetNextPacketSize, GetBuffer)
- Hardened IPC with safety guards for all webContents.send calls
- Scrubbed sensitive absolute paths from caption logs
- Realigned Windows artifact naming logic
The WGC capture session uses Direct3D11CaptureFramePool::CreateFreeThreaded,
which dispatches FrameArrived callbacks on thread pool threads concurrently.
MFEncoder::writeFrame() accesses non-thread-safe resources (ID3D11DeviceContext,
IMFSinkWriter, shared staging texture and NV12 buffer) without synchronization,
causing MP4 container corruption when callbacks overlap at high frame rates.
Add a mutex to serialize writeFrame() and finalize() calls, preventing
concurrent access to the D3D context and Media Foundation sink writer.
Fixes#96
- Use getRecordingsDir() instead of hardcoded RECORDINGS_DIR
- Fix stop order: video first, then audio save, then mux via new
mux-wgc-recording IPC
- Explicitly stop MediaStream tracks for audio resource cleanup
- Add native WASAPI audio capture (system loopback + mic) in C++ process
for sample-accurate sync; browser audio APIs crash with WGC
- Add window capture support (CreateForWindow) with window: source prefix
- Kill WGC capture process on app before-quit
- Add even-dimension guard in MFEncoder
- Fix ffmpeg asar path backslash handling on Windows
- Remove dead browser-side WGC audio code (storeWgcAudio IPC,
ScriptProcessorNode refs, stopWgcAudioCapture)
Uses Windows.Graphics.Capture to record the screen without the OS cursor
or the yellow capture border. Falls back to Electron capture on older Windows
or when the helper exe isn't available.