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

Đang mở
#10,285 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
53/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
audio-video-rtc

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)

Ngôn ngữ chính
Rust
Star
1.6k
Fork
251
Merge trung bình
10 giờ 10 phút
Pull request đã merge (30 ngày)
832

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của moq-dev/moq

Tất cả issue của moq-dev/moq

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.