Skip to content

Commit 9c7edbe

Browse files
alan-george-lkstephen-derosa
authored andcommitted
Fix default off for capture
1 parent 66090c6 commit 9c7edbe

6 files changed

Lines changed: 26 additions & 30 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ jobs:
588588
- name: Configure (linux-debug-tests preset + coverage flags)
589589
run: |
590590
cmake --preset linux-debug-tests \
591+
-DLIVEKIT_BUILD_CAPTURE=ON \
591592
-DCMAKE_C_FLAGS="-Wno-deprecated-declarations --coverage" \
592593
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations --coverage" \
593594
-DCMAKE_EXE_LINKER_FLAGS="--coverage" \

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ The build scripts set `LIVEKIT_BUILD_CAPTURE`. The generated
132132
`LIVEKIT_CAPTURE_ENABLED` macro is 0 or 1 and supports `#if` checks in consumers.
133133

134134
Both build scripts accept `--capture` to enable GStreamer, pattern, and clock
135-
sources, and `--no-capture` to disable them. Test/all presets enable capture by
136-
default; normal and example presets disable it. Capture-enabled builds need
137-
GStreamer development and runtime libraries. Release workflows publish separate
135+
sources, and `--no-capture` to disable them explicitly. Capture is disabled by
136+
default for every preset. Capture-enabled builds need GStreamer development and
137+
runtime libraries. Release workflows publish separate
138138
`-capture` bundles and validate creation through the installed SDK using the standalone CTest project in
139139
`src/tests/packaging/`.
140140

‎CMakePresets.json‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
}
1515
},
1616
{
17-
"name": "capture-tests",
17+
"name": "tests",
1818
"hidden": true,
1919
"cacheVariables": {
20-
"LIVEKIT_BUILD_CAPTURE": "ON",
2120
"LIVEKIT_BUILD_TESTS": "ON"
2221
}
2322
},
@@ -234,7 +233,7 @@
234233
"displayName": "Windows x64 Release with Tests + Examples",
235234
"description": "Build for Windows x64 Release with tests and examples",
236235
"inherits": [
237-
"capture-tests",
236+
"tests",
238237
"windows-base"
239238
],
240239
"binaryDir": "${sourceDir}/build-release",
@@ -248,7 +247,7 @@
248247
"displayName": "Windows x64 Debug with Tests + Examples",
249248
"description": "Build for Windows x64 Debug with tests and examples",
250249
"inherits": [
251-
"capture-tests",
250+
"tests",
252251
"windows-base"
253252
],
254253
"binaryDir": "${sourceDir}/build-debug",
@@ -262,7 +261,7 @@
262261
"displayName": "Windows x64 Release with Tests",
263262
"description": "Build for Windows x64 Release with test suite",
264263
"inherits": [
265-
"capture-tests",
264+
"tests",
266265
"windows-base"
267266
],
268267
"binaryDir": "${sourceDir}/build-release",
@@ -276,7 +275,7 @@
276275
"displayName": "Windows x64 Debug with Tests",
277276
"description": "Build for Windows x64 Debug with test suite",
278277
"inherits": [
279-
"capture-tests",
278+
"tests",
280279
"windows-base"
281280
],
282281
"binaryDir": "${sourceDir}/build-debug",
@@ -290,7 +289,7 @@
290289
"displayName": "Linux Release with Tests + Examples",
291290
"description": "Build for Linux Release with tests and examples",
292291
"inherits": [
293-
"capture-tests",
292+
"tests",
294293
"linux-base"
295294
],
296295
"binaryDir": "${sourceDir}/build-release",
@@ -304,7 +303,7 @@
304303
"displayName": "Linux Debug with Tests + Examples",
305304
"description": "Build for Linux Debug with tests and examples",
306305
"inherits": [
307-
"capture-tests",
306+
"tests",
308307
"linux-base"
309308
],
310309
"binaryDir": "${sourceDir}/build-debug",
@@ -318,7 +317,7 @@
318317
"displayName": "Linux Release with Tests",
319318
"description": "Build for Linux Release with test suite",
320319
"inherits": [
321-
"capture-tests",
320+
"tests",
322321
"linux-base"
323322
],
324323
"binaryDir": "${sourceDir}/build-release",
@@ -332,7 +331,7 @@
332331
"displayName": "Linux Debug with Tests",
333332
"description": "Build for Linux Debug with test suite",
334333
"inherits": [
335-
"capture-tests",
334+
"tests",
336335
"linux-base"
337336
],
338337
"binaryDir": "${sourceDir}/build-debug",
@@ -346,7 +345,7 @@
346345
"displayName": "macOS Release with Tests + Examples",
347346
"description": "Build for macOS Release with tests and examples",
348347
"inherits": [
349-
"capture-tests",
348+
"tests",
350349
"macos-base"
351350
],
352351
"binaryDir": "${sourceDir}/build-release",
@@ -360,7 +359,7 @@
360359
"displayName": "macOS Debug with Tests + Examples",
361360
"description": "Build for macOS Debug with tests and examples",
362361
"inherits": [
363-
"capture-tests",
362+
"tests",
364363
"macos-base"
365364
],
366365
"binaryDir": "${sourceDir}/build-debug",
@@ -374,7 +373,7 @@
374373
"displayName": "macOS Release with Tests",
375374
"description": "Build for macOS Release with test suite",
376375
"inherits": [
377-
"capture-tests",
376+
"tests",
378377
"macos-base"
379378
],
380379
"binaryDir": "${sourceDir}/build-release",
@@ -388,7 +387,7 @@
388387
"displayName": "macOS Debug with Tests",
389388
"description": "Build for macOS Debug with test suite",
390389
"inherits": [
391-
"capture-tests",
390+
"tests",
392391
"macos-base"
393392
],
394393
"binaryDir": "${sourceDir}/build-debug",

‎build.cmd‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set "BUILD_TYPE=Release"
88
set "PRESET=windows-release"
99
set "LIVEKIT_VERSION="
1010
set "CMAKE_EXTRA_ARGS="
11-
set "CAPTURE_OVERRIDE="
11+
set "CAPTURE_OVERRIDE=OFF"
1212
set "BUILD_PARALLEL_JOBS="
1313
set "DO_BUNDLE="
1414
set "PREFIX="
@@ -144,7 +144,7 @@ if defined LIVEKIT_VERSION (
144144
set "CMAKE_EXTRA_ARGS=-DLIVEKIT_VERSION=%LIVEKIT_VERSION%"
145145
echo ==^> Injecting LIVEKIT_VERSION=%LIVEKIT_VERSION%
146146
)
147-
if defined CAPTURE_OVERRIDE set "CMAKE_EXTRA_ARGS=%CMAKE_EXTRA_ARGS% -DLIVEKIT_BUILD_CAPTURE=%CAPTURE_OVERRIDE%"
147+
set "CMAKE_EXTRA_ARGS=%CMAKE_EXTRA_ARGS% -DLIVEKIT_BUILD_CAPTURE=%CAPTURE_OVERRIDE%"
148148
goto dispatch
149149

150150
:dispatch
@@ -229,7 +229,7 @@ echo help Show this help
229229
echo.
230230
echo Options (for debug / release):
231231
echo --capture Enable all capture sources ^(requires GStreamer^)
232-
echo --no-capture Disable capture sources, overriding the preset
232+
echo --no-capture Explicitly disable capture sources ^(the default^)
233233
echo --bundle Install the SDK bundle using cmake --install
234234
echo --prefix ^<dir^> Install prefix for --bundle ^(default: .\sdk-out\livekit-sdk^)
235235
echo.

‎build.sh‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARCHIVE_NAME=""
1414
GENERATOR=""
1515
MACOS_ARCH=""
1616
LIVEKIT_VERSION=""
17-
CAPTURE_OVERRIDE=""
17+
CAPTURE_OVERRIDE="OFF"
1818

1919
# Detect OS for preset selection
2020
detect_os() {
@@ -48,7 +48,7 @@ Commands:
4848
4949
Options (for debug / release):
5050
--capture Enable all capture sources (requires GStreamer)
51-
--no-capture Disable capture sources, overriding the preset
51+
--no-capture Explicitly disable capture sources (the default)
5252
--bundle Install the SDK bundle using 'cmake --install'
5353
--prefix <dir> Install prefix for --bundle
5454
(default: ./sdk-out/livekit-sdk)
@@ -146,10 +146,7 @@ parse_opts() {
146146

147147
configure() {
148148
echo "==> Configuring CMake (${BUILD_TYPE}) using preset ${PRESET}..."
149-
local -a extra_args=()
150-
if [[ -n "${CAPTURE_OVERRIDE:-}" ]]; then
151-
extra_args+=("-DLIVEKIT_BUILD_CAPTURE=${CAPTURE_OVERRIDE}")
152-
fi
149+
local -a extra_args=("-DLIVEKIT_BUILD_CAPTURE=${CAPTURE_OVERRIDE}")
153150
if [[ -n "${LIVEKIT_VERSION}" ]]; then
154151
echo "==> Injecting LIVEKIT_VERSION=${LIVEKIT_VERSION}"
155152
extra_args+=("-DLIVEKIT_VERSION=${LIVEKIT_VERSION}")

‎docs/building.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ cmake --build build
201201
| `LIVEKIT_USE_SYSTEM_PROTOBUF` | OFF | Use system Protobuf instead of vcpkg's |
202202
| `LIVEKIT_LOG_LEVEL` | `TRACE` | Compile-time log threshold (see [logging.md](logging.md)) |
203203
| `LIVEKIT_VERSION` | repo-derived | SDK version string baked into the binary |
204-
| `LIVEKIT_BUILD_CAPTURE` | preset-dependent | Enable GStreamer, pattern, and clock capture sources in the Rust FFI |
204+
| `LIVEKIT_BUILD_CAPTURE` | OFF | Enable GStreamer, pattern, and clock capture sources in the Rust FFI |
205205

206206
## Build output
207207

@@ -362,14 +362,13 @@ separately when it is no longer needed.
362362

363363
## Capture sources
364364

365-
Only the repository's `*-tests` and `*-all` presets enable capture by default.
366-
The `debug`, `release`, and `*-examples` presets disable it. Use `--capture`
365+
Capture is disabled by default for every repository preset. Use `--capture`
367366
with any build command to enable all three sources (GStreamer, GPU pattern, and
368367
GPU wall clock), or `--no-capture` to disable them explicitly:
369368

370369
```bash
371370
./build.sh release --capture --bundle --prefix sdk-out/livekit-sdk-capture
372-
./build.sh debug-tests --no-capture
371+
./build.sh debug-tests
373372
```
374373

375374
On Windows, use `build.cmd release --capture --bundle --prefix sdk-out\livekit-sdk-capture`.

0 commit comments

Comments
 (0)