@@ -23,6 +23,49 @@ CMake/vcpkg flows.
2323| Linux | GCC 9+ or Clang 10+ | ` apt ` / ` dnf ` (or vcpkg) |
2424| macOS | Xcode 12+ (macOS 12.3+ for ScreenCaptureKit) | Homebrew (or vcpkg) |
2525
26+ <a id =" additional-capture-dependencies " ></a >
27+
28+ ### Additional capture dependencies
29+
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.
35+
36+ ** macOS:** Install both the official universal runtime and development packages
37+ from the [ GStreamer downloads page] ( https://gstreamer.freedesktop.org/download/#macos ) .
38+ These packages support both x86_64 and arm64. Configure the framework paths:
39+
40+ ``` bash
41+ export PATH=" /Library/Frameworks/GStreamer.framework/Versions/1.0/bin:$PATH "
42+ export PKG_CONFIG_PATH=" /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig${PKG_CONFIG_PATH: +: $PKG_CONFIG_PATH } "
43+ ```
44+
45+ Use one GStreamer installation method per machine to keep libraries and plugins
46+ consistent.
47+
48+ ** Ubuntu / Debian:** Install the development packages and runtime plugins:
49+
50+ ``` bash
51+ sudo apt install -y pkg-config libunwind-dev \
52+ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
53+ gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
54+ gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
55+ ```
56+
57+ ** Windows:** Install the MSVC x86_64 runtime and development components from the
58+ [ GStreamer downloads page] ( https://gstreamer.freedesktop.org/download/#windows ) .
59+ Add the installation's ` bin ` directory to ` PATH ` and its ` lib/pkgconfig `
60+ directory to ` PKG_CONFIG_PATH ` .
61+
62+ Development files must be discoverable through ` pkg-config ` . You can verify
63+ that they are available with:
64+
65+ ``` bash
66+ pkg-config --modversion gstreamer-1.0 gstreamer-app-1.0
67+ ```
68+
2669## Clone the repository
2770
2871The SDK depends on the [ ` client-sdk-rust ` ] ( https://github.com/livekit/rust-sdks )
@@ -378,6 +421,8 @@ Rust FFI.
378421
379422The build scripts set ` LIVEKIT_BUILD_CAPTURE ` . The generated numeric
380423` LIVEKIT_CAPTURE_ENABLED ` macro (0 or 1) supports ` #if ` checks in consumers.
424+ Direct inclusion of ` livekit/capture_source.h ` fails at compile time in standard
425+ SDK builds. ` livekit/livekit.h ` includes capture declarations only when enabled.
381426` share/livekit/build-info.json ` in an installed bundle describes the same build
382427features; neither value tests whether a GPU or a requested GStreamer plugin is
383428available at runtime.
@@ -386,23 +431,8 @@ Release downloads with `-capture` in their names include these features, for
386431example ` livekit-sdk-macos-arm64-capture-<version>.tar.gz ` . Standard release
387432bundles have capture disabled.
388433
389- Building a capture-enabled SDK requires GStreamer development libraries
390- accessible to ` pkg-config ` . On macOS, install both the official universal
391- runtime and development packages from the
392- [ GStreamer downloads page] ( https://gstreamer.freedesktop.org/download/#macos ) .
393- Add ` /Library/Frameworks/GStreamer.framework/Versions/1.0/bin ` to the front of
394- ` PATH ` and ` /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig `
395- to the front of ` PKG_CONFIG_PATH ` . These packages support both x86_64 and arm64.
396- Use one GStreamer installation method per machine to keep its libraries and
397- plugins consistent. On Ubuntu, install ` libgstreamer1.0-dev ` and
398- ` libgstreamer-plugins-base1.0-dev ` , plus the runtime plugins your pipeline
399- uses. On Windows, install the MSVC runtime and development packages from the
400- [ GStreamer downloads page] ( https://gstreamer.freedesktop.org/download/ ) and put
401- the installation's ` bin ` directory on ` PATH ` and ` lib/pkgconfig ` directory on
402- ` PKG_CONFIG_PATH ` .
403-
404- Capture bundles require GStreamer at runtime, including when using pattern or
405- clock sources. The SDK does not redistribute GStreamer libraries or plugins.
434+ See [ Additional capture dependencies] ( #additional-capture-dependencies ) before
435+ building or running a capture-enabled SDK.
406436
407437Rust artifacts are stored under ` client-sdk-rust/target/cpp-<feature-hash>/ ` ,
408438with separate directories for capture-enabled and disabled builds. Generated
@@ -411,67 +441,6 @@ the installed SDK instead of another configuration's most recent build.
411441
412442See [ Capture sources] ( capture-sources.md ) for dependencies and usage.
413443
414- ## Build in a Linux container
415-
416- You can test a clean Linux build and its dependency tree from a macOS or Linux
417- host with ` docker/linux.Dockerfile ` . The container is a build check, not
418- a development environment. The image uses Ubuntu 24.04 with the same packages
419- as the Linux CI jobs. It also includes GStreamer for ` --capture ` builds and
420- the stable Rust toolchain.
421-
422- The container bind-mounts the source paths that the build reads from the host
423- into ` /work ` . Changes on the host show up in the container immediately. The
424- ` /work ` directory itself is the ` lk-cpp-work ` volume, so build outputs such as
425- ` build-* ` , ` local-install ` , and ` sdk-out ` stay in the container. Host build
426- directories and ` .git ` data are not mounted.
427-
428- 1 . From the repository root, build the image. The ` client-sdk-rust ` submodule
429- must be checked out, because the image copies its clang install script.
430-
431- ``` bash
432- docker build -f docker/linux.Dockerfile -t livekit-cpp-build .
433- ```
434-
435- To install gstreamer:
436- ``` bash
437- docker build -f docker/linux.Dockerfile \
438- --build-arg INSTALL_GSTREAMER=1 \
439- -t livekit-cpp-build .
440- ```
441-
442- The build context is the repository root. The file
443- ` docker/linux.Dockerfile.dockerignore ` limits the context to the
444- clang install script, so Docker does not send build outputs or ` .git ` .
445-
446- 2 . From the repository root, start the container:
447-
448- ``` bash
449- docker run -d --name lk-cpp --network host \
450- -v lk-cpp-work:/work \
451- -v lk-cargo-target:/cargo-target \
452- -v lk-cargo-registry:/opt/cargo/registry \
453- -v " $( pwd) /build.sh:/work/build.sh" \
454- -v " $( pwd) /CMakeLists.txt:/work/CMakeLists.txt" \
455- -v " $( pwd) /CMakePresets.json:/work/CMakePresets.json" \
456- -v " $( pwd) /build.h.in:/work/build.h.in" \
457- -v " $( pwd) /.build-info.json.in:/work/.build-info.json.in" \
458- -v " $( pwd) /cmake:/work/cmake" \
459- -v " $( pwd) /include:/work/include" \
460- -v " $( pwd) /src:/work/src" \
461- -v " $( pwd) /scripts:/work/scripts" \
462- -v " $( pwd) /client-sdk-rust:/work/client-sdk-rust" \
463- -v lk-rust-source-target:/work/client-sdk-rust/target \
464- -v " $( pwd) /cpp-example-collection:/work/cpp-example-collection" \
465- livekit-cpp-build sleep infinity
466- ```
467-
468- 3 . Open a shell in the container:
469-
470- ``` bash
471- docker exec -it lk-cpp bash
472- ```
473- For a fully clean build, run ` ./build.sh clean-all ` in the container, or remove the volumes.
474-
475444## Support
476445
477446- GitHub Issues: < https://github.com/livekit/client-sdk-cpp/issues >
0 commit comments