moq-video: WGC delivers up to twice the asked frame rate

Aperta
#10,332 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Read rs/moq-video/src/capture/win32.rs, wgc/native.rs, and capture/channel.rs to trace how Pace and FrameChannel::repeating schedule frames. Start by reproducing the reported 1 fps case with changing desktop content, then add a mocked clock or Xvfb test to verify the stream stays within its requested rate when a new frame and repeat are due together.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A Windows Graphics Capture stream asked for 1 fps delivers about 1.5 fps: windows_picture_cost (rs/moq-video/src/capture/win32.rs, from https://github.com/moq-dev/moq/pull/10316) read 15 frames in 10 seconds from a 2560x1440 display.

Two independent clocks hand out frames:

  • wgc/native.rs paces new frames with Pace, at most one per interval.
  • FrameChannel::repeating (capture/channel.rs) repeats the held frame once the interval passes without a new one.

Neither knows about the other, so when both come due together, a repeat goes out and the paced new frame follows a moment later. On a desktop that changes now and then (a clock, the cursor), a reader gets up to twice the asked rate.

Fix direction: one clock decides when a frame is due. For example, the channel could treat the next repeat as the next pacing slot, so a new frame takes the repeat's place rather than following it. An Xvfb or unit test with a mocked clock can pin the rate.

(Written by Claude Opus 5.5)

Lingua principale
Rust
Stelle
1.6k
Fork
251
Merge medio
10h 10m
PR unite (30g)
832

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di moq-dev/moq

Tutte le issue di moq-dev/moq

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.