You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -290,7 +292,7 @@ For complete CLI documentation, see [CLI Tool Guide](./docs/content/cli.md).
290
292
## Examples
291
293
292
294
| Example | Description | Language | Platform |
293
-
|---------|-------------|----------|----------|
295
+
|-------|-----------|--------|--------|
294
296
| [0-print_camera](./examples/desktop/0-print_camera.cpp) / [0-print_camera_c](./examples/desktop/0-print_camera_c.c) | List available cameras | C++ / C | Desktop |
295
297
| [1-minimal_example](./examples/desktop/1-minimal_example.cpp) / [1-minimal_example_c](./examples/desktop/1-minimal_example_c.c) | Basic frame capture | C++ / C | Desktop |
296
298
| [2-capture_grab](./examples/desktop/2-capture_grab.cpp) / [2-capture_grab_c](./examples/desktop/2-capture_grab_c.c) | Continuous capture | C++ / C | Desktop |
Copy file name to clipboardExpand all lines: bindings/rust/README.md
+10-19Lines changed: 10 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ If you want the crate name in code to be `ccap` (recommended), set it explicitly
31
31
ccap = { package = "ccap-rs", version = "<latest>" }
32
32
```
33
33
34
-
> Tip: Replace `<latest>` with the latest version shown on https://crates.io/crates/ccap-rs
34
+
> Tip: Replace `<latest>` with the latest version shown on <https://crates.io/crates/ccap-rs>
35
35
36
36
### Basic Usage
37
37
@@ -94,12 +94,8 @@ cargo run --example capture_callback
94
94
95
95
This crate supports two build modes:
96
96
97
-
-**Distribution mode (default):**`build-source`
98
-
- Builds the native C/C++ implementation via the `cc` crate.
99
-
- Intended for crates.io users.
100
-
-**Development mode:**`static-link`
101
-
- Links against a pre-built native library from a CameraCapture checkout (e.g. `build/Debug/libccap.a`).
102
-
- Intended for developing this repository.
97
+
-**Distribution mode (default):**`build-source` — Builds the native C/C++ implementation via the `cc` crate (intended for crates.io users).
98
+
-**Development mode:**`static-link` — Links against a pre-built native library from a CameraCapture checkout (e.g. `build/Debug/libccap.a`) (intended for developing this repository).
103
99
104
100
### Prerequisites
105
101
@@ -142,21 +138,16 @@ An ASan-instrumented `libccap.a` requires the ASan runtime at link/run time.
142
138
143
139
- When using `static-link`, `build.rs` will **only** link the ASan runtime **if it detects** ASan symbols inside the prebuilt `libccap.a`.
144
140
- This does **not** affect the default crates.io build (`build-source`).
145
-
- You can disable the auto-link behavior by setting:
146
-
-`CCAP_RUST_NO_ASAN_LINK=1`
141
+
- You can disable the auto-link behavior by setting `CCAP_RUST_NO_ASAN_LINK=1`.
147
142
148
143
## Feature flags
149
144
150
145
-`build-source` (default): build the C/C++ ccap sources during `cargo build` (best for crates.io usage).
151
-
-`static-link`: link against a pre-built static library from a CameraCapture checkout (best for development).
152
-
- If you use this mode, make sure you have built the C/C++ project first, and set `CCAP_SOURCE_DIR` when needed.
146
+
-`static-link`: link against a pre-built static library from a CameraCapture checkout (best for development). If you use this mode, make sure you have built the C/C++ project first, and set `CCAP_SOURCE_DIR` when needed.
153
147
154
148
## Platform notes
155
149
156
-
- Camera capture:
157
-
- Windows: DirectShow
158
-
- macOS/iOS: AVFoundation
159
-
- Linux: V4L2
150
+
- Camera capture: Windows (DirectShow), macOS/iOS (AVFoundation), Linux (V4L2)
160
151
- Video file playback support depends on the underlying C/C++ library backend (currently Windows/macOS only).
161
152
162
153
## API Documentation
@@ -193,12 +184,12 @@ match provider.grab_frame(3000) { // 3 second timeout
python3 -c "import sys, json; data = json.load(sys.stdin); pkgs = data.get('packages', []); pkg = next((p for p in pkgs if p.get('name') == 'ccap-rs'), None); print(pkg.get('version') if pkg else 'unknown')"2>/dev/null ||echo"unknown")
0 commit comments