Skip to content

Commit 6f21ec7

Browse files
committed
docs: refresh Windows backend messaging
1 parent 35c1c1e commit 6f21ec7

11 files changed

Lines changed: 28 additions & 27 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
[English](./README.md) | [中文](./README.zh-CN.md)
1515

16-
A high-performance, lightweight cross-platform camera capture library with hardware-accelerated pixel format conversion, supporting both camera capture and video file playback (Windows/macOS). Provides complete C++ and pure C interfaces, plus Rust bindings.
16+
A high-performance, lightweight cross-platform camera capture library with hardware-accelerated pixel format conversion, supporting both camera capture and video file playback (Windows/macOS). On Windows, ccap now fully supports both DirectShow and Media Foundation, with DirectShow remaining the default for strong virtual-camera compatibility. Provides complete C++ and pure C interfaces, plus Rust bindings.
1717

1818
> 🌐 **Official Website:** [ccap.work](https://ccap.work)
1919
@@ -33,8 +33,8 @@ A high-performance, lightweight cross-platform camera capture library with hardw
3333

3434
- **High Performance**: Hardware-accelerated pixel format conversion with up to 10x speedup (AVX2, Apple Accelerate, NEON)
3535
- **Lightweight**: No third-party dependencies - uses only system frameworks
36-
- **Cross Platform**: Windows (DirectShow by default with optional Media Foundation), macOS/iOS (AVFoundation), Linux (V4L2)
37-
- **Windows Dual Backends**: DirectShow is the default on Windows for compatibility with OBS Virtual Camera and other virtual devices, while Media Foundation stays available through explicit opt-in
36+
- **Cross Platform**: Windows (dual backends: DirectShow by default, Media Foundation fully supported), macOS/iOS (AVFoundation), Linux (V4L2)
37+
- **Windows Dual Backends**: DirectShow stays the default on Windows for compatibility with OBS Virtual Camera and other virtual devices, while Media Foundation is also fully supported through `auto`, environment overrides, and explicit backend selection
3838
- **Multiple Formats**: RGB, BGR, YUV (NV12/I420) with automatic conversion
3939
- **Dual Language APIs**: ✨ **Complete Pure C Interface** - Both modern C++ API and traditional C99 interface for various project integration and language bindings
4040
- **Video File Playback**: 🎬 Play video files (MP4, AVI, MOV, etc.) using the same API as camera capture - supports Windows and macOS
@@ -300,7 +300,7 @@ For complete CLI documentation, see [CLI Tool Guide](./docs/content/cli.md).
300300
301301
| Platform | Compiler | System Requirements |
302302
| -------- | -------- | ------------------- |
303-
| **Windows** | MSVC 2019+ (including 2026) / MinGW-w64 | DirectShow (default) + Media Foundation opt-in |
303+
| **Windows** | MSVC 2019+ (including 2026) / MinGW-w64 | DirectShow (default) + Media Foundation support |
304304
| **macOS** | Xcode 11+ | macOS 10.13+ |
305305
| **iOS** | Xcode 11+ | iOS 13.0+ |
306306
| **Linux** | GCC 7+ / Clang 6+ | V4L2 (Linux 2.6+) |

README.zh-CN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
[English](./README.md) | [中文](./README.zh-CN.md)
1515

16-
高性能、轻量级的跨平台相机捕获库,支持硬件加速的像素格式转换,同时支持相机捕获和视频文件播放(Windows/macOS),提供完整的 C++ / 纯 C 语言接口,并提供 Rust bindings。
16+
高性能、轻量级的跨平台相机捕获库,支持硬件加速的像素格式转换,同时支持相机捕获和视频文件播放(Windows/macOS)。在 Windows 上,ccap 现在完整支持 DirectShow 与 Media Foundation 双后端,其中 DirectShow 继续作为默认路径以保证虚拟摄像头兼容性。项目同时提供完整的 C++ / 纯 C 语言接口,并提供 Rust bindings。
1717

1818
> 🌐 **官方网站:** [ccap.work](https://ccap.work)
1919
@@ -33,8 +33,8 @@
3333

3434
- **高性能**:硬件加速的像素格式转换,提升高达 10 倍性能(AVX2、Apple Accelerate、NEON)
3535
- **轻量级**:无第三方库依赖,仅使用系统框架
36-
- **跨平台**:Windows(默认 DirectShow,可选 Media Foundation)、macOS/iOS(AVFoundation)、Linux(V4L2)
37-
- **Windows 双后端**:Windows 默认使用 DirectShow,以更好兼容 OBS Virtual Camera 等虚拟摄像头;如果需要,也可以显式切换到 Media Foundation
36+
- **跨平台**:Windows(双后端:默认 DirectShow,完整支持 Media Foundation)、macOS/iOS(AVFoundation)、Linux(V4L2)
37+
- **Windows 双后端**:Windows 默认使用 DirectShow,以更好兼容 OBS Virtual Camera 等虚拟摄像头;同时也完整支持 Media Foundation,可通过 `auto`、环境变量覆盖或显式后端选择启用
3838
- **多种格式**:RGB、BGR、YUV(NV12/I420)及自动转换
3939
- **双语言接口**:✨ **新增完整纯 C 接口**,同时提供现代化 C++ API 和传统 C99 接口,支持各种项目集成和语言绑定
4040
- **视频文件播放**:🎬 使用与相机相同的 API 播放视频文件(MP4、AVI、MOV 等)- 支持 Windows 和 macOS
@@ -267,7 +267,7 @@ cmake --build .
267267
268268
| 平台 | 编译器 | 系统要求 |
269269
|------|--------|----------|
270-
| **Windows** | MSVC 2019+(包括 2026)/ MinGW-w64 | DirectShow(默认)+ Media Foundation 可选启用 |
270+
| **Windows** | MSVC 2019+(包括 2026)/ MinGW-w64 | DirectShow(默认)+ Media Foundation 支持 |
271271
| **macOS** | Xcode 11+ | macOS 10.13+ |
272272
| **iOS** | Xcode 11+ | iOS 13.0+ |
273273
| **Linux** | GCC 7+ / Clang 6+ | V4L2 (Linux 2.6+) - 相机捕获支持,视频播放暂不支持 |

bindings/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
rust-version = "1.65"
66
authors = ["wysaid <this@wysaid.org>"]
77
license = "MIT"
8-
description = "Rust bindings for ccap — high-performance, cross-platform webcam/camera capture with hardware-accelerated pixel format conversion (DirectShow/AVFoundation/V4L2), including common RGB/YUV workflows and video file input/playback support"
8+
description = "Rust bindings for ccap — high-performance, cross-platform webcam/camera capture with hardware-accelerated pixel format conversion, dual Windows backends (DirectShow + Media Foundation), common RGB/YUV workflows, and video file input/playback support"
99
homepage = "https://ccap.work"
1010
repository = "https://github.com/wysaid/CameraCapture"
1111
documentation = "https://docs.rs/ccap-rs"

bindings/rust/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
[![Documentation](https://docs.rs/ccap-rs/badge.svg)](https://docs.rs/ccap-rs)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66

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).
88

99
> Note: The published *package* name on crates.io is `ccap-rs`, but the *crate name in code* is `ccap`.
1010
1111
## Features
1212

1313
- **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)
1515
- **Multiple Formats**: RGB, BGR, YUV (NV12/I420) with automatic conversion
1616
- **Zero Dependencies**: Uses only system frameworks
1717
- **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.
149149

150150
## Platform notes
151151

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)
153153
- Video file playback support depends on the underlying C/C++ library backend (currently Windows/macOS only).
154154

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"`.
156156

157157
## API Documentation
158158

@@ -190,7 +190,7 @@ match provider.grab_frame(3000) { // 3 second timeout
190190

191191
| Platform | Backend | Status |
192192
| --- | --- | --- |
193-
| Windows | DirectShow default, Media Foundation opt-in | ✅ Supported |
193+
| Windows | DirectShow default + Media Foundation support | ✅ Supported |
194194
| macOS | AVFoundation | ✅ Supported |
195195
| iOS | AVFoundation | ✅ Supported |
196196
| Linux | V4L2 | ✅ Supported |

docs/content/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ if (provider.open("/path/to/video.mp4", true)) {
220220

221221
### Windows
222222

223-
Uses DirectShow for camera access by default on Windows to preserve compatibility with OBS Virtual Camera and other virtual cameras. Media Foundation remains available when you explicitly request `msmf`, or as a secondary path when `auto` needs to recover from a DirectShow open failure. Requires MSVC 2019 or later.
223+
Uses DirectShow for camera access by default on Windows to preserve compatibility with OBS Virtual Camera and other virtual cameras. Media Foundation is also fully supported: you can request it explicitly with `msmf`, and `auto` mode can route devices across both backends when needed. Requires MSVC 2019 or later.
224224

225225
For most Windows applications, `auto` mode is the recommended choice. ccap merges device enumeration across both backends and keeps the public capture API, frame orientation handling, and output pixel-format conversion aligned so callers usually do not need backend-specific branching.
226226

docs/content/documentation.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ if (provider.open("/path/to/video.mp4", true)) {
219219

220220
### Windows
221221

222-
在现代 Windows 上默认使用 Media Foundation 访问相机,并在旧系统或不兼容设备上自动回退到 DirectShow。需要 MSVC 2019 或更高版本。
222+
Windows 上默认使用 DirectShow 访问相机,以保持对 OBS Virtual Camera 等虚拟摄像头的兼容性;同时也完整支持 Media Foundation,可在需要时显式选择,`auto` 模式也会在两个后端之间自动路由设备。需要 MSVC 2019 或更高版本。
223223

224224
如果你需要在 Windows 上强制选择某个相机后端,可以在支持 `extraInfo` 的构造接口中传入 `auto``msmf``dshow``backend=<value>`,也可以为当前进程设置 `CCAP_WINDOWS_BACKEND=auto|msmf|dshow`
225225

docs/content/implementation-details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Or use the script:
216216
### Windows
217217

218218
**Media Foundation Backend:**
219-
- Opt-in backend on Windows when callers explicitly request `msmf`
219+
- Fully supported Windows camera backend that can be selected explicitly with `msmf`
220220
- Uses Source Reader for frame delivery and format negotiation
221221
- When backend selection is `auto`, `Provider::open()` first checks which backend enumerated the requested device and routes to a compatible backend automatically
222222
- If a device is visible in both Windows backends, `auto` prefers DirectShow for compatibility and keeps Media Foundation as the secondary fallback

docs/content/implementation-details.zh.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,12 @@ cmake --build build
199199
### Windows
200200

201201
**Media Foundation 后端:**
202-
- 现代 Windows 上的首选后端
202+
- Windows 上完整支持的相机后端之一,可通过 `msmf` 显式选择
203203
- 使用 Source Reader 完成取帧与格式协商
204-
- 当 Media Foundation 不可用或设备打开失败时,会自动回退到 DirectShow
204+
- `auto` 模式下,遇到仅 MSMF 可见的设备时会直接走该后端
205205

206206
**DirectShow 后端:**
207+
- Windows 默认相机后端
207208
- 成熟、稳定的 API
208209
- 良好的驱动兼容性
209210
- 已知问题:某些 VR 头盔在枚举时崩溃

docs/content/rust-bindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ If needed, set:
7676

7777
Camera capture backends:
7878

79-
- Windows: DirectShow by default with optional Media Foundation
79+
- Windows: dual backends, with DirectShow by default and Media Foundation fully supported
8080
- macOS/iOS: AVFoundation
8181
- Linux: V4L2
8282

83-
On Windows, camera capture defaults to DirectShow because virtual cameras such as OBS Virtual Camera are exposed there more reliably. You can opt into Media Foundation by setting `CCAP_WINDOWS_BACKEND=msmf`, or by using the Rust APIs `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`.
83+
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. You can select `auto`, `msmf`, or `dshow` via `CCAP_WINDOWS_BACKEND`, or pass the same values into the Rust APIs `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`.
8484

8585
Video file playback support depends on the underlying C/C++ backend (currently Windows/macOS only).
8686

docs/content/rust-bindings.zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ fn main() -> Result<()> {
7777

7878
相机捕获后端:
7979

80-
- Windows:Media Foundation,必要时回退到 DirectShow
80+
- Windows:双后端,默认 DirectShow,同时完整支持 Media Foundation
8181
- macOS/iOS:AVFoundation
8282
- Linux:V4L2
8383

84-
在 Windows 上,你可以通过设置环境变量 `CCAP_WINDOWS_BACKEND=auto|msmf|dshow` 强制选择后端,也可以使用 Rust API `Provider::with_device_name_and_extra_info``Provider::with_device_and_extra_info``Provider::open_device_with_extra_info``Provider::open_with_index_and_extra_info`
84+
在 Windows 上,DirectShow 仍然是默认后端,以更好兼容 OBS Virtual Camera 等虚拟摄像头;Media Foundation 也已经是正式支持的后端。你可以通过设置环境变量 `CCAP_WINDOWS_BACKEND=auto|msmf|dshow` 选择后端,也可以使用 Rust API `Provider::with_device_name_and_extra_info``Provider::with_device_and_extra_info``Provider::open_device_with_extra_info``Provider::open_with_index_and_extra_info` 并传入相同的后端字符串
8585

8686
视频文件播放是否可用取决于底层 C/C++ 后端(目前 Windows/macOS 支持,Linux 暂不支持)。
8787

0 commit comments

Comments
 (0)