Skip to content

Commit 092816e

Browse files
--capture[=list] docs update
1 parent 00f73ec commit 092816e

3 files changed

Lines changed: 36 additions & 14 deletions

File tree

‎docs/building.md‎

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ CMake/vcpkg flows.
2727

2828
### Additional capture dependencies
2929

30-
Standard SDK builds do not require GStreamer. Capture-enabled builds
31-
(`--capture`) require GStreamer development libraries at build time and
32-
GStreamer libraries at runtime, including when using pattern or clock sources.
33-
The SDK does not redistribute these libraries or plugins. Install the runtime
34-
plugins required by your GStreamer pipeline too.
30+
GStreamer is required only when the selected sources include `gstreamer`.
31+
This includes `--capture` / `--capture=all` and release `-capture` bundles,
32+
which enable all three sources. Standard SDK builds and builds selecting only
33+
`pattern`, `clock`, or both do not require GStreamer.
34+
35+
For builds that include `gstreamer`, install GStreamer development libraries
36+
at build time and GStreamer libraries at runtime. The SDK does not redistribute
37+
these libraries or plugins. Install the runtime plugins required by your
38+
pipeline too. Pattern and clock sources need a compatible GPU adapter at runtime.
3539

3640
**macOS:** Install both the official universal runtime and development packages
3741
from the [GStreamer downloads page](https://gstreamer.freedesktop.org/download/#macos).
@@ -59,7 +63,8 @@ sudo apt install -y pkg-config libunwind-dev \
5963
Add the installation's `bin` directory to `PATH` and its `lib/pkgconfig`
6064
directory to `PKG_CONFIG_PATH`.
6165

62-
Development files must be discoverable through `pkg-config`. You can verify
66+
For GStreamer builds, development files must be discoverable through
67+
`pkg-config`. You can verify
6368
that they are available with:
6469

6570
```bash
@@ -398,11 +403,13 @@ The SDK places Rust FFI outputs in `client-sdk-rust/target/cpp-<feature-hash>/`.
398403
Deep checkout paths can make WebRTC header paths exceed the Windows path limit.
399404
Set `CARGO_TARGET_DIR` to a short absolute path before building, for example
400405
`set CARGO_TARGET_DIR=C:\lk-rust` in Command Prompt. The SDK appends the
401-
feature directory so capture-enabled and disabled outputs remain separate.
406+
feature directory so different source selections have separate outputs.
402407
Windows CI uses this setting for builds, tests, and release bundles.
403408
`clean-all` removes the default Rust target directory; remove a custom root
404409
separately when it is no longer needed.
405410

411+
<a id="capture-sources"></a>
412+
406413
## Capture sources
407414

408415
Capture is disabled by default. Select sources with `-DLIVEKIT_CAPTURE=<value>`
@@ -422,15 +429,21 @@ Special values: `none` / `OFF` / empty (disabled), `all` / `ON` (every source).
422429

423430
```bash
424431
./build.sh release --capture --bundle --prefix sdk-out/livekit-sdk-capture
432+
./build.sh release --capture=pattern,clock --bundle --prefix sdk-out/livekit-sdk-pixel
433+
./build.sh release --capture=gstreamer --bundle --prefix sdk-out/livekit-sdk-gstreamer
425434
```
426435

427436
On Windows, use `build.cmd release --capture --bundle --prefix sdk-out\livekit-sdk-capture`.
428-
Custom CMake configurations can set `LIVEKIT_BUILD_CAPTURE=ON`. The build
429-
enables `capture-gstreamer`, `capture-pattern`, and `capture-clock` in the
430-
Rust FFI.
437+
Windows also accepts source lists, for example `build.cmd release --capture=pattern,clock`.
438+
Custom CMake configurations use `LIVEKIT_CAPTURE=all` or a source list such as
439+
`LIVEKIT_CAPTURE=pattern,clock`.
431440

432-
The build scripts set `LIVEKIT_BUILD_CAPTURE`. The generated numeric
441+
The build scripts set `LIVEKIT_CAPTURE`. The generated numeric
433442
`LIVEKIT_CAPTURE_ENABLED` macro (0 or 1) supports `#if` checks in consumers.
443+
It indicates whether any source was compiled in; it does not identify which
444+
sources are available. Check `cargo_features` in `share/livekit/build-info.json`
445+
for the selected backends. Creating a source omitted from the SDK build fails
446+
through the returned future with `CaptureSourceError`.
434447
Direct inclusion of `livekit/capture_source.h` fails at compile time in standard
435448
SDK builds. `livekit/livekit.h` includes capture declarations only when enabled.
436449
`share/livekit/build-info.json` in an installed bundle describes the same build
@@ -445,7 +458,7 @@ See [Additional capture dependencies](#additional-capture-dependencies) before
445458
building or running a capture-enabled SDK.
446459

447460
Rust artifacts are stored under `client-sdk-rust/target/cpp-<feature-hash>/`,
448-
with separate directories for capture-enabled and disabled builds. Generated
461+
with separate directories for each normalized source selection. Generated
449462
`build.h` files live in each CMake build directory, so feature metadata follows
450463
the installed SDK instead of another configuration's most recent build.
451464

‎docs/capture-sources.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ The SDK supports three source configurations:
1010
| `ClockVideoSourceConfig` | GPU-rendered local time with millisecond precision | Compatible GPU adapter |
1111
| `GstreamerVideoSourceConfig` | Pre-encoded video from a GStreamer pipeline | GStreamer runtime and the pipeline's plugins |
1212

13+
A custom SDK build can include all sources or a subset selected with
14+
`--capture=pattern,clock` or `--capture=gstreamer`. Release `-capture` bundles
15+
include all sources. `LIVEKIT_CAPTURE_ENABLED` indicates that at least one
16+
source is enabled; creating a source omitted from the build reports
17+
`CaptureSourceError` through the returned future. Pattern/clock-only builds do
18+
not require GStreamer.
19+
1320
Native camera device capture and device enumeration are not part of this API.
1421

1522
## Build and release bundles

‎docs/testing.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ labels and a 30-second timeout. It checks the bundle's capture metadata and
106106
creates a GStreamer VP8 source through the installed library when capture is
107107
enabled. Configuration checks that direct inclusion of `livekit/capture_source.h`
108108
succeeds for capture bundles and fails for standard bundles. Both variants must
109-
still compile with `livekit/livekit.h`. It needs no LiveKit server; capture-enabled
110-
runs require GStreamer and the pipeline's plugins.
109+
still compile with `livekit/livekit.h`. It needs no LiveKit server. The current
110+
capture-enabled packaging test exercises GStreamer, so it requires that backend
111+
and the pipeline's plugins; it does not validate pattern/clock-only bundles or
112+
prove that unselected sources were excluded.
111113
The consumer also checks `share/livekit/build-info.json`. Release jobs pass
112114
`LIVEKIT_EXPECT_VERSION` to check version metadata and the recorded Rust commit
113115
and FFI version through this same project.

0 commit comments

Comments
 (0)