Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ the same reason, gates the cut through the
- [Vendor and trim the WebRTC stack](/quest/m1/webrtc-vendor.md) - str0m, dimpl, `is`, and sctp-proto live in moq-webrtc with unused code removed, so moq-rtc can take rind
- [MoQ on rind](/quest/m1/rind/README.md) - every MoQ crate takes its crypto from rind, a pure-Rust graviola fork, so no build compiles C crypto
- [VAAPI encode and decode](/quest/m1/video-vaapi.md) - H.265 encode and decode, pre-generated bindings, and pooled resize surfaces, including the moq-dev/vaapi release that carries them
- [Read a texture back without an encoder](/quest/m1/video-readback.md) - moq-video copies a wgpu texture into packed RGBA with no encoder probe, for the studio's Linux virtual camera

## Related

Expand Down
30 changes: 30 additions & 0 deletions quest/m1/video-readback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# [S] Read a texture back without an encoder

## Goal

moq-video exposes a public readback that copies a wgpu texture into tightly
packed RGBA rows on the CPU with no encoder behind it, so a consumer that
needs the raw picture reuses the export path's staging buffers, row
unpadding, and mapping lifecycle instead of copying them. A moq-side test
covers it.

## Plan

Decided 2026-11-05 (maintainer, on moq-dev/studio's /quest-plan): the
studio's [Linux virtual camera](https://github.com/moq-dev/studio/blob/main/quest/m0/vcam/linux.md)
([moq-dev/studio#9](https://github.com/moq-dev/studio/pull/9)) reads the
program through this readback rather than a copy of it in the studio, and the
work joins m1 because it is additive and that camera has waited on it since
2026-11-02. The studio bumps its pin in
[its own quest](https://github.com/moq-dev/studio/blob/main/quest/m0/pin-readback.md).

The readback exists: `render/export.rs`'s private `Readback` and its test
`readback_round_trips_and_drops_past_its_depth`. Today it is reachable only
through `Exporter`, whose setup probes for an encoder. Make that type public
and keep one implementation, so `Exporter`'s CPU route still reads through it.

Recommendation, not settled: mirror `Exporter`'s shape, a non-blocking copy
that drops past its depth and returns a pending handle whose wait yields the
RGBA bytes, named by role under `render`. Refuse a texture whose size or
format does not match, as `Exporter::copy` does. Add a `MIGRATE.md` note
under `## Unreleased`.
1 change: 1 addition & 0 deletions quest/m3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ federation) land.
- [Compile time audit](/quest/m3/audit-compile-time.md) - build-time hotspots are measured against the m1 baselines, starting with the transport share now that moq-net compiles once, and the worst are removed, made cheaper, or planned
- [Lint override and deprecation audit](/quest/m3/audit-lints.md) - repeat the suppression and deprecation audit after the release ships, starting with clippy on the macOS and Windows targets
- [Clean ALSA playback onset](/quest/m3/audio-alsa-onset.md) - no onset restarts or clicks over PulseAudio
- [Read a bus source's own samples](/quest/m3/audio-strip-tap.md) - a tap reads one source's samples before its delay with their bus-clock positions, for the studio's clap sync
- [Interop audit](/quest/m3/audit-interop.md) - our interop runner entries match what we ship, and every red interop cell with a moq.dev side is fixed, reported, or noted as down or unsupported
- [moq-hls exposes each rendition's bound source](/quest/m3/hls-rendition-source.md) - playlists and segments report the source path and instance they read, so a cache can key on the source
- [The memory bench finishes at 1 MiB frames](/quest/m3/memory-bench-hang.md) - the allocation mode's park at `size=1048576` is root-caused and fixed
Expand Down
34 changes: 34 additions & 0 deletions quest/m3/audio-strip-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# [S] Read a bus source's own samples

## Goal

A `moq_audio::bus` caller reads one source's samples as they enter the bus,
before its strip's delay, as `Block`s stamped with their position on the bus
clock, so it can time an event in that source against the clock. A tap that
falls behind skips, as a mix's `Reader` does, and never stalls the bus or
another reader.

## Plan

Decided 2026-11-05 (maintainer, on moq-dev/studio's /quest-plan):

- ✅ **A sample tap.** moq-audio exposes the samples and their positions;
the consumer detects whatever event it is timing.
Rejected: an onset detector in moq-audio, which would put clap-specific
DSP and tuning here.
- ✅ **m3**: additive, with a named consumer that is not urgent.

The consumer is the studio's
[clap-to-measure sync delay](https://github.com/moq-dev/studio/blob/main/quest/m0/sync-clap.md):
a clap seen by a camera and heard by a microphone measures how far the
microphone leads, and sets its `Strip::set_delay`. The strip's level meter,
read once a video frame, is too coarse to time that. The tap sits before the
delay because the delay is what is being measured; measuring after it would
include the current setting. The studio bumps its pin in
[its own quest](https://github.com/moq-dev/studio/blob/main/quest/m0/pin-audio-tap.md).

Recommendation, not settled: reuse `Reader` and `Block`, whose `position` is
already the bus clock, rather than a new block type. Taking the samples
before gain and mute too lets a muted microphone be measured. A source with
no tap costs nothing extra. Test with an impulse written at a known point: the
tap reports it at the expected bus position whatever the strip's delay.