Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f14ec38
LiveKit Capture integrated through FFI
ladvoc Jul 29, 2026
8a7309c
dep on libjpeg
stephen-derosa Aug 25, 2026
a0351cc
capture specific releases/builds and tooling. effort to reduce the sc…
stephen-derosa Oct 9, 2026
e24c9ef
packaging tests
stephen-derosa Oct 9, 2026
6ce53e8
build flag LIVEKIT_BUILD_CAPTURE sets LIVEKIT_CAPTURE_ENABLED macro
stephen-derosa Oct 9, 2026
a601993
Fix capture CI dependencies and Windows Cargo path lengths
stephen-derosa Oct 9, 2026
b0517da
address cancelled async future comments
stephen-derosa Oct 9, 2026
bf2a7c0
two step build/test: base sdk, then with capture
stephen-derosa Oct 12, 2026
addbf1b
remove duplicate code
stephen-derosa Oct 12, 2026
b262ba9
Update CMakeLists.txt to trigger rebuild on a changed livekit-capture…
stephen-derosa Oct 12, 2026
93a19a9
amalgamate
stephen-derosa Oct 12, 2026
a192c7f
LIVEKIT_INTERNAL_API bool dropFfiHandle
stephen-derosa Oct 12, 2026
8c7787d
const ref
stephen-derosa Oct 12, 2026
292ab79
Fix default off for capture
alan-george-lk Oct 12, 2026
e967569
dockerfile for testing
stephen-derosa Oct 13, 2026
99bf5db
clang
stephen-derosa Oct 13, 2026
cde4f40
rename
stephen-derosa Oct 13, 2026
76f0972
rust hash points to release
stephen-derosa Oct 13, 2026
00cc97a
client-sdk-cpp base first, then install gstreamer and build capture
stephen-derosa Oct 14, 2026
71d3c36
macOS x86/64 working?
stephen-derosa Oct 14, 2026
6b22057
trim docs
stephen-derosa Oct 14, 2026
aec3e65
mr comments
stephen-derosa Oct 14, 2026
1b9c702
Allow choosing specific backends
ladvoc Oct 13, 2026
529770f
--capture[=list] docs update
stephen-derosa Oct 14, 2026
e3c1f16
pipelines/testing for specific capture sources
stephen-derosa Oct 14, 2026
553f5da
livekit/capture/
stephen-derosa Oct 14, 2026
1d6eaa2
syntax
stephen-derosa Oct 15, 2026
d911416
no capture on intel mac
stephen-derosa Oct 16, 2026
002f3b9
livekit::capture
stephen-derosa Oct 16, 2026
a01fc94
livekit::capture fix
stephen-derosa Oct 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .build-info.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
"cpp_git_commit": "@GIT_COMMIT@",
"rust_submodule_commit": "@RUST_GIT_COMMIT@",
"livekit_ffi_version": "@LIVEKIT_FFI_VERSION@",
"capture_enabled": @LIVEKIT_CAPTURE_ENABLED@,
Comment thread
stephen-derosa marked this conversation as resolved.
"cargo_features": "@LIVEKIT_CARGO_FEATURES@",
"build_date": "@BUILD_DATE@"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
data/welcome.wav filter=lfs diff=lfs merge=lfs -text
build.cmd whitespace=cr-at-eol
CMakePresets.json whitespace=cr-at-eol
74 changes: 74 additions & 0 deletions .github/actions/build-sdk/action.yml
Comment thread
stephen-derosa marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build SDK
description: Configure and build an SDK variant with the repository build scripts.
inputs:
preset:
description: Build script command, such as release-examples or debug-tests.
required: true
capture:
description: Capture sources (ON/all, OFF/none, or gstreamer,pattern,clock).
default: 'OFF'
bundle-dir:
description: Optional installation directory for an SDK bundle.
default: ''
version:
description: Optional SDK version to inject.
default: ''
macos-arch:
description: Optional macOS architecture override.
default: ''
runs:
using: composite
steps:
- name: Build (Unix)
if: runner.os != 'Windows'
shell: bash
env:
SDK_PRESET: ${{ inputs.preset }}
SDK_CAPTURE: ${{ inputs.capture }}
SDK_BUNDLE_DIR: ${{ inputs.bundle-dir }}
SDK_VERSION: ${{ inputs.version }}
SDK_MACOS_ARCH: ${{ inputs.macos-arch }}
run: |
args=(./build.sh "$SDK_PRESET")
case "$SDK_CAPTURE" in
ON|all) args+=(--capture) ;;
OFF|none|"") args+=(--no-capture) ;;
*) args+=(--capture="$SDK_CAPTURE") ;;
esac
if [[ -n "$SDK_BUNDLE_DIR" ]]; then args+=(--bundle --prefix "$SDK_BUNDLE_DIR"); fi
if [[ -n "$SDK_VERSION" ]]; then args+=(--version "$SDK_VERSION"); fi
if [[ -n "$SDK_MACOS_ARCH" ]]; then args+=(--macos-arch "$SDK_MACOS_ARCH"); fi
"${args[@]}"
- name: Build (Windows)
if: runner.os == 'Windows'
shell: pwsh
env:
SDK_PRESET: ${{ inputs.preset }}
SDK_CAPTURE: ${{ inputs.capture }}
SDK_BUNDLE_DIR: ${{ inputs.bundle-dir }}
SDK_VERSION: ${{ inputs.version }}
run: |
$buildArgs = @($env:SDK_PRESET)
switch ([string]$env:SDK_CAPTURE) {
{ $_ -in @('ON', 'all') } { $buildArgs += '--capture'; break }
{ $_ -in @('OFF', 'none', '') } { $buildArgs += '--no-capture'; break }
default { $buildArgs += "--capture=$($env:SDK_CAPTURE)" }
}
if ($env:SDK_BUNDLE_DIR) { $buildArgs += @('--bundle', '--prefix', $env:SDK_BUNDLE_DIR) }
if ($env:SDK_VERSION) { $buildArgs += @('--version', $env:SDK_VERSION) }
& .\build.cmd @buildArgs
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
26 changes: 26 additions & 0 deletions .github/actions/cargo-target-root/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Set Cargo output root
description: Use a short Cargo root on Windows and the submodule target directory elsewhere.
runs:
using: composite
steps:
- shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "CARGO_TARGET_DIR=$(cygpath -m "$RUNNER_TEMP")/lk-rust" >> "$GITHUB_ENV"
else
echo "CARGO_TARGET_DIR=$GITHUB_WORKSPACE/client-sdk-rust/target" >> "$GITHUB_ENV"
fi
34 changes: 34 additions & 0 deletions .github/actions/check-sdk-symbols/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check SDK exported symbols
description: Reject private dependency symbols exported by an installed SDK.
inputs:
bundle-dir:
description: SDK installation directory relative to the workspace.
required: true
runs:
using: composite
steps:
- shell: bash
env:
SDK_BUNDLE_DIR: ${{ inputs.bundle-dir }}
run: |
case "$RUNNER_OS" in
Windows) lib="$SDK_BUNDLE_DIR/bin/livekit.dll" ;;
macOS) lib="$SDK_BUNDLE_DIR/lib/liblivekit.dylib" ;;
Linux) lib="$SDK_BUNDLE_DIR/lib/liblivekit.so" ;;
*) echo "Unsupported runner OS: $RUNNER_OS" >&2; exit 1 ;;
esac
python .github/scripts/check_no_private_symbols.py "$lib"
86 changes: 86 additions & 0 deletions .github/actions/setup-capture/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Set up capture dependencies
description: Install additional build and runtime dependencies for capture-enabled SDK builds.
runs:
using: composite
steps:
- name: Install GStreamer (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
# Request the distro unwinder explicitly so apt can replace conflicting
# LLVM unwinder development packages on Ubuntu 22.04 runners.
sudo apt-get install -y libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
- name: Install GStreamer (macOS)
if: runner.os == 'macOS'
env:
GSTREAMER_MACOS_VERSION: "1.28.5"
GSTREAMER_MACOS_RUNTIME_SHA256: "0a8fc7a1cf8d7bac833ca0ebe2fd196a199c2465e810cd5b1e4b4f720c258f43"
GSTREAMER_MACOS_DEVEL_SHA256: "6f7b55e8fb86dcc615c9cae46b79b7785851e5c77f79a938648a81dfa2603729"
shell: bash
run: |
set -euo pipefail
# Official universal packages cover both x86_64 and arm64. Homebrew
# no longer produces Intel bottles and may compile its dependency tree.
base_url="https://gstreamer.freedesktop.org/data/pkg/osx/$GSTREAMER_MACOS_VERSION"
installer_dir="$RUNNER_TEMP/gstreamer-installers"
runtime_pkg="gstreamer-1.0-$GSTREAMER_MACOS_VERSION-universal.pkg"
devel_pkg="gstreamer-1.0-devel-$GSTREAMER_MACOS_VERSION-universal.pkg"
mkdir -p "$installer_dir"

for package in "$runtime_pkg" "$devel_pkg"; do
expected_hash="$GSTREAMER_MACOS_RUNTIME_SHA256"
if [[ "$package" == "$devel_pkg" ]]; then
expected_hash="$GSTREAMER_MACOS_DEVEL_SHA256"
fi
curl --fail --location --retry 3 --connect-timeout 30 --max-time 600 \
"$base_url/$package" --output "$installer_dir/$package"
printf '%s %s\n' "$expected_hash" "$installer_dir/$package" | shasum -a 256 -c -
done

# Verify both downloads before installing either package.
sudo installer -pkg "$installer_dir/$runtime_pkg" -target /
sudo installer -pkg "$installer_dir/$devel_pkg" -target /

framework="/Library/Frameworks/GStreamer.framework/Versions/1.0"
echo "$framework/bin" >> "$GITHUB_PATH"
export PATH="$framework/bin:$PATH"
export PKG_CONFIG_PATH="$framework/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
# The framework dylibs use @rpath. Rust sys-crate linker arguments do
# not propagate to the final FFI dylib, so set its runtime search path.
echo "RUSTFLAGS=${RUSTFLAGS:+$RUSTFLAGS }-C link-arg=-Wl,-rpath,$framework/lib" >> "$GITHUB_ENV"
pkg-config --modversion gstreamer-1.0 gstreamer-app-1.0
gst-inspect-1.0 --version
- name: Install GStreamer (Windows)
if: runner.os == 'Windows'
env:
GSTREAMER_WINDOWS_VERSION: "1.28.5"
GSTREAMER_WINDOWS_SHA256: "51ee5eaec33008e8409d8cf6f6884457f22aa3bd515f8856f993a3eaab903530"
shell: pwsh
run: |
$installer = Join-Path $env:RUNNER_TEMP "gstreamer-installer.exe"
$installDir = Join-Path $env:RUNNER_TEMP "gstreamer"
$uri = "https://gstreamer.freedesktop.org/data/pkg/windows/$env:GSTREAMER_WINDOWS_VERSION/msvc/gstreamer-1.0-msvc-x86_64-$env:GSTREAMER_WINDOWS_VERSION.exe"

Invoke-WebRequest -Uri $uri -OutFile $installer
$actualHash = (Get-FileHash -Algorithm SHA256 $installer).Hash.ToLowerInvariant()
if ($actualHash -ne $env:GSTREAMER_WINDOWS_SHA256) {
throw "GStreamer installer SHA-256 mismatch: expected $env:GSTREAMER_WINDOWS_SHA256, got $actualHash"
}

$process = Start-Process -FilePath $installer -ArgumentList @(
"/TYPE=devel",
"/DIR=$installDir",
"/CURRENTUSER",
"/VERYSILENT",
"/NORESTART"
) -Wait -PassThru
if ($process.ExitCode -ne 0) {
throw "GStreamer installer failed with exit code $($process.ExitCode)"
}

"$installDir\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"PKG_CONFIG_PATH=$installDir\lib\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
72 changes: 72 additions & 0 deletions .github/actions/setup-sdk-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Set up base SDK dependencies
description: Install base SDK packages and the build compiler, without capture dependencies.
inputs:
vcpkg-commit:
description: Pinned vcpkg revision for Windows builds.
default: fb87e2bb3fe69e16c224989acb5a61349166c782
linux-extra-packages:
description: Optional space-separated Linux packages to install with the base dependencies.
default: ''
runs:
using: composite
steps:
- name: Setup vcpkg (Windows only)
if: runner.os == 'Windows'
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: ${{ inputs.vcpkg-commit }}

- name: Install base deps (Ubuntu)
if: runner.os == 'Linux'
shell: bash
env:
SDK_EXTRA_PACKAGES: ${{ inputs.linux-extra-packages }}
run: |
set -eux
extra_packages=()
if [[ -n "$SDK_EXTRA_PACKAGES" ]]; then
read -r -a extra_packages <<< "$SDK_EXTRA_PACKAGES"
fi
sudo apt-get update
sudo apt-get install -y \
build-essential cmake ninja-build pkg-config \
llvm-dev libclang-dev clang \
libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \
libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \
libxrandr-dev libxi-dev libxkbcommon-dev \
libasound2-dev libpulse-dev \
libssl-dev \
libprotobuf-dev protobuf-compiler \
libabsl-dev \
libcurl4-openssl-dev \
libwayland-dev libdecor-0-dev \
"${extra_packages[@]}"

# libwebrtc ships hermetic libc++ headers that require a newer clang than
# Ubuntu provides. The submodule script exports CC/CXX for later steps.
- name: Install clang for libwebrtc
if: runner.os == 'Linux'
shell: bash
run: client-sdk-rust/.github/scripts/install-clang.sh

- name: Install base deps (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
set -eux
brew update
brew install cmake ninja protobuf abseil
Loading
Loading