moq-video: Media Foundation survives threads cpal left in a COM STA

Aperta
#10,285 0 commenti 0 reazioni 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
53/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start with rs/moq-video/src/mf.rs and rs/moq-video/src/capture/mod.rs; trace the ComGuard calls and the blocking Media Foundation listings. Then inspect the audio-device initialization path and add the described regression test using a current_thread runtime. Done means listing audio devices before cameras succeeds on the first launch.

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

Descrizione

ComGuard::new (rs/moq-video/src/mf.rs) calls CoInitializeEx(COINIT_MULTITHREADED) on tokio blocking-pool threads. It fails with RPC_E_CHANGED_MODE once cpal 0.18's WASAPI host has initialized that thread as an STA, which cpal keeps until the thread exits. In an app that lists audio devices first, the camera then shows as unavailable on first launch.

Recommended: run moq-video's Media Foundation work (the blocking listings in capture/mod.rs, and anything else built on ComGuard) on threads moq-video owns. Add a test that lists audio devices and then cameras on a current_thread runtime. Alternatives considered: accepting the STA (risky for capture with no message pump), or fixing only moq-audio (any other STA user still breaks it).

Found by https://github.com/moq-dev/studio/pull/295.

(Written by Claude Opus 5.5 with high)

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.