feat: add media capture APIs, wasm example, and CI coverage#27
Conversation
Implement Phase 1 Media Capture from the roadmap: camera (open/close, RGBA frames, dimensions), microphone (mono f32 ring buffer, sample rate, read_samples), primary-display screenshot (RGBA + dimensions), and api_media_pipeline_stats (camera frame count + mic ring depth). Host (oxide-browser): - New module media_capture.rs registering imports under oxide; HostState gains media_capture: Arc<Mutex<MediaCaptureState>>. - Use nokhwa (input-native + camera-sync-impl for Send), cpal for input, screenshots for display capture; rfd dialogs before hardware access. - pub(crate) write_guest_bytes for guest memory writes from media_capture. SDK (oxide-sdk): - FFI + safe wrappers: camera_*, microphone_*, screen_capture*, media_pipeline_stats; crate docs table updated. Example (examples/media-capture): - PNG-encode RGBA for canvas_image (host decodes encoded images only). - UI: camera preview, mic level meter, screenshot thumbnail, pipeline footer. Other: - examples/index: Media Capture card linking to media_capture.wasm. - CI: libv4l-dev (Linux camera); wasm32 check for media-capture example. - ROADMAP: mark Media Capture items complete.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 32 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implement Phase 1 Media Capture from the roadmap: camera (open/close, RGBA frames, dimensions), microphone (mono f32 ring buffer, sample rate, read_samples), primary-display screenshot (RGBA + dimensions), and api_media_pipeline_stats (camera frame count + mic ring depth).
Host (oxide-browser):
SDK (oxide-sdk):
Example (examples/media-capture):
Other: