|
4 | 4 | [](https://docs.rs/ccap-rs) |
5 | 5 | [](https://opensource.org/licenses/MIT) |
6 | 6 |
|
7 | | -Safe Rust bindings for [CameraCapture (ccap)](https://github.com/wysaid/CameraCapture) — a high-performance, lightweight, cross-platform **webcam/camera capture** library with **hardware-accelerated pixel format conversion** (Windows DirectShow by default with optional Media Foundation, macOS/iOS AVFoundation, Linux V4L2). |
| 7 | +Safe Rust bindings for [CameraCapture (ccap)](https://github.com/wysaid/CameraCapture) — a high-performance, lightweight, cross-platform **webcam/camera capture** library with **hardware-accelerated pixel format conversion** and full Windows dual-backend support (DirectShow by default, Media Foundation also supported; macOS/iOS AVFoundation, Linux V4L2). |
8 | 8 |
|
9 | 9 | > Note: The published *package* name on crates.io is `ccap-rs`, but the *crate name in code* is `ccap`. |
10 | 10 |
|
11 | 11 | ## Features |
12 | 12 |
|
13 | 13 | - **High Performance**: Hardware-accelerated pixel format conversion with up to 10x speedup (AVX2, Apple Accelerate, NEON) |
14 | | -- **Cross Platform**: Windows (DirectShow by default with optional Media Foundation), macOS/iOS (AVFoundation), Linux (V4L2) |
| 14 | +- **Cross Platform**: Windows (dual backends: DirectShow by default, Media Foundation fully supported), macOS/iOS (AVFoundation), Linux (V4L2) |
15 | 15 | - **Multiple Formats**: RGB, BGR, YUV (NV12/I420) with automatic conversion |
16 | 16 | - **Zero Dependencies**: Uses only system frameworks |
17 | 17 | - **Memory Safe**: Safe Rust API with automatic resource management |
@@ -149,10 +149,10 @@ An ASan-instrumented `libccap.a` requires the ASan runtime at link/run time. |
149 | 149 |
|
150 | 150 | ## Platform notes |
151 | 151 |
|
152 | | -- Camera capture: Windows (DirectShow by default with optional Media Foundation), macOS/iOS (AVFoundation), Linux (V4L2) |
| 152 | +- Camera capture: Windows (dual backends: DirectShow by default, Media Foundation fully supported), macOS/iOS (AVFoundation), Linux (V4L2) |
153 | 153 | - Video file playback support depends on the underlying C/C++ library backend (currently Windows/macOS only). |
154 | 154 |
|
155 | | -On Windows, camera capture defaults to DirectShow because virtual cameras such as OBS Virtual Camera are exposed there more reliably. To opt into Media Foundation, set `CCAP_WINDOWS_BACKEND=msmf`, or use `Provider::with_device_name_and_extra_info`, `Provider::with_device_and_extra_info`, `Provider::open_device_with_extra_info`, and `Provider::open_with_index_and_extra_info` with `"msmf"`. |
| 155 | +On Windows, camera capture defaults to DirectShow because virtual cameras such as OBS Virtual Camera are exposed there more reliably. Media Foundation is also a first-class supported backend: use `CCAP_WINDOWS_BACKEND=auto|msmf|dshow` for process-wide selection, or call `Provider::with_device_name_and_extra_info`, `Provider::with_device_and_extra_info`, `Provider::open_device_with_extra_info`, and `Provider::open_with_index_and_extra_info` with `"auto"`, `"msmf"`, or `"dshow"`. |
156 | 156 |
|
157 | 157 | ## API Documentation |
158 | 158 |
|
@@ -190,7 +190,7 @@ match provider.grab_frame(3000) { // 3 second timeout |
190 | 190 |
|
191 | 191 | | Platform | Backend | Status | |
192 | 192 | | --- | --- | --- | |
193 | | -| Windows | DirectShow default, Media Foundation opt-in | ✅ Supported | |
| 193 | +| Windows | DirectShow default + Media Foundation support | ✅ Supported | |
194 | 194 | | macOS | AVFoundation | ✅ Supported | |
195 | 195 | | iOS | AVFoundation | ✅ Supported | |
196 | 196 | | Linux | V4L2 | ✅ Supported | |
|
0 commit comments