Skip to main content

Module recording_compose

Module recording_compose 

Source
Expand description

RecordingCompose — single-threaded wisp render + wgpu readback pump for M-PIX.5 of M-RECORD-EXPORT-REAL-PIXELS.

Owns the wisp Application + Renderer + RecordingScene + the BGRA RenderTexture target. On each tick:

  1. Pull the latest BGRA from the camera + screen crate::recording::FrameSlots (latest-frame-wins).
  2. Upload to the scene’s VideoTextures.
  3. Renderer::render_stage into the BGRA RenderTexture.
  4. RenderTexture::read_pixels to pull the composed BGRA bytes back to CPU (handles the staging buffer + row-stride math).

Wgpu objects all live on this single thread — no Send / Sync gymnastics. The thread that owns RecordingCompose is also the thread that pushes frames into the encoder (M-PIX.6); the two steps are fused so there’s no inter-thread channel between “BGRA produced” and “BGRA encoded.”

Structs§

ComposedFrame
Result of a single compose tick. bytes is BGRA8 packed (no row padding) sized exactly width * height * 4.
RecordingCompose
Owner of the wisp + wgpu pipeline. Single-thread. Construct on the encoder feed thread + call Self::compose_frame once per frame.