Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- src/**
- include/**
- cpp-example-collection/**
- bridge/**
- client-sdk-rust/**
- cmake/**
- scripts/**
Expand All @@ -28,7 +27,6 @@ on:
- src/**
- include/**
- cpp-example-collection/**
- bridge/**
- client-sdk-rust/**
- cmake/**
- scripts/**
Expand Down Expand Up @@ -58,7 +56,7 @@ env:
# failing the build.
SCCACHE_GHA_ENABLED: "true"
# Pinned commit for cpp-example-collection smoke build (https://github.com/livekit-examples/cpp-example-collection)
CPP_EXAMPLE_COLLECTION_REF: 56815733a71c14692569e8adf2916a56a14d4882
CPP_EXAMPLE_COLLECTION_REF: 402e6fbcc3cb8b2b2aaf80e21b289f27a9060dc6
# vcpkg binary caching for Windows
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-md
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
paths:
- src/**
- include/**
- bridge/**
- client-sdk-rust/**
- CMakeLists.txt
- build.sh
Expand Down Expand Up @@ -90,7 +89,7 @@ jobs:
fi

case "${path}" in
docker/Dockerfile.sdk|src/*|include/*|bridge/*|client-sdk-rust/*|cmake/*|data/*|CMakeLists.txt|build.sh|build.cmd|build.h.in|.build-info.json.in|CMakePresets.json)
docker/Dockerfile.sdk|src/*|include/*|client-sdk-rust/*|cmake/*|data/*|CMakeLists.txt|build.sh|build.cmd|build.h.in|.build-info.json.in|CMakePresets.json)
sdk_changed=true
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

env:
# Pinned commit for cpp-example-collection smoke build (https://github.com/livekit-examples/cpp-example-collection)
CPP_EXAMPLE_COLLECTION_REF: 56815733a71c14692569e8adf2916a56a14d4882
CPP_EXAMPLE_COLLECTION_REF: 402e6fbcc3cb8b2b2aaf80e21b289f27a9060dc6

jobs:
validate-x64:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
set -euo pipefail

search_dirs=()
for dir in src include bridge cpp-example-collection; do
for dir in src include cpp-example-collection; do
if [[ -d "$dir" ]]; then
search_dirs+=("$dir")
fi
Expand Down
6 changes: 0 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ Be sure to update the directory layout in this file if the directory layout chan
| `src/` | Implementation files and internal-only headers (`ffi_client.h`, `lk_log.h`, etc.) |
| `src/tests/` | Google Test integration and stress tests |
| `examples/` | In-tree example applications |
| `bridge/` | **Deprecated** C-style bridge layer — do not add new functionality |
| `client-sdk-rust/` | Git submodule holding the Rust core of the SDK|
| `client-sdk-rust/livekit-ffi/protocol/*.proto` | FFI contract (protobuf definitions, read-only reference) |
| `cmake/` | Build helpers (`protobuf.cmake`, `spdlog.cmake`, `LiveKitConfig.cmake.in`) |
Expand Down Expand Up @@ -368,11 +367,6 @@ When adding new client facing functionality, add benchmarking to understand the
- Declare all data objects at the smallest possible level of scope
- Each calling function must check the return value of nonvoid functions, and each called function must check the validity of all parameters provided by the caller


## Deprecated / Out of Scope

- **`bridge/`** (`livekit_bridge`) is deprecated. Do not add new functionality to it.

## Common Pitfalls

- A `Room` with `auto_subscribe = false` will never receive remote audio/video frames — this is almost never what you want.
Expand Down
38 changes: 26 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ project(livekit VERSION ${LIVEKIT_PROJECT_VERSION} LANGUAGES C CXX)
set(LIVEKIT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIVEKIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(warnings)

option(LIVEKIT_BUILD_EXAMPLES "Build LiveKit examples" OFF)
option(LIVEKIT_BUILD_TESTS "Build LiveKit tests" OFF)
Expand Down Expand Up @@ -113,17 +114,28 @@ if(TARGET protobuf::libprotobuf)
else()
message(FATAL_ERROR "No protobuf library target found (expected protobuf::libprotobuf)")
endif()
target_include_directories(livekit_proto PRIVATE
"${PROTO_BINARY_DIR}"
${Protobuf_INCLUDE_DIRS}
)
target_link_libraries(livekit_proto PRIVATE ${LIVEKIT_PROTOBUF_TARGET})
set(LIVEKIT_PROTOBUF_DEP_INCLUDE_DIRS ${Protobuf_INCLUDE_DIRS})
if(TARGET absl::base)
get_target_property(_absl_inc absl::base INTERFACE_INCLUDE_DIRECTORIES)
livekit_get_interface_includes(absl::base _absl_inc)
if(_absl_inc)
target_include_directories(livekit_proto PRIVATE ${_absl_inc})
list(APPEND LIVEKIT_PROTOBUF_DEP_INCLUDE_DIRS ${_absl_inc})
endif()
endif()
set(LIVEKIT_SYSTEM_INCLUDE_DIRS)
if(TARGET spdlog::spdlog)
livekit_get_interface_includes(spdlog::spdlog _spdlog_inc)
if(_spdlog_inc)
list(APPEND LIVEKIT_SYSTEM_INCLUDE_DIRS ${_spdlog_inc})
endif()
endif()
target_include_directories(livekit_proto SYSTEM PRIVATE
"${PROTO_BINARY_DIR}"
)
target_include_directories(livekit_proto PRIVATE
${LIVEKIT_PROTOBUF_DEP_INCLUDE_DIRS}
)
target_link_libraries(livekit_proto PRIVATE ${LIVEKIT_PROTOBUF_TARGET})
livekit_disable_warnings(livekit_proto)

# Manually generate protobuf files to avoid path prefix issues
set(PROTO_SRCS)
Expand Down Expand Up @@ -432,8 +444,13 @@ target_include_directories(livekit
PRIVATE
${LIVEKIT_ROOT_DIR}/src
${LIVEKIT_ROOT_DIR}/src/trace
${RUST_ROOT}/livekit-ffi/include
${PROTO_BINARY_DIR}
${LIVEKIT_PROTOBUF_DEP_INCLUDE_DIRS}
)

target_include_directories(livekit SYSTEM PRIVATE
${RUST_ROOT}/livekit-ffi/include
${PROTO_BINARY_DIR}
${LIVEKIT_SYSTEM_INCLUDE_DIRS}
)

target_link_libraries(livekit
Expand Down Expand Up @@ -748,9 +765,6 @@ install(FILES

# ------------------------------------------------------------------------

# Build the LiveKit C++ bridge before examples (human_robot depends on it)
add_subdirectory(bridge)

if(LIVEKIT_BUILD_EXAMPLES)
include(cpp-example-collection)
livekit_configure_cpp_example_collection()
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,9 @@ lk token create \
--grant '{"canPublish":true,"canSubscribe":true,"canPublishData":true}'
```

## Deprecation

- livekit_bridge (bridge/ folder) is deprecated. Avoid using it. Migrate to the base SDK. This will be removed on 06/01/2026.
- setOn*FrameCallback with TrackSource is deprecated. Use track name instead. This will be removed on 06/01/2026.
- All public headers that do not follow `camelBack()` case. This will be removed on 06/01/2026.
# Deprecation
> NOTE: With the official 1.0.0 release we have introduced breaking changes to previous unofficial versions in order
to align with other LiveKit client SDKs. See [PR #143](https://github.com/livekit/client-sdk-cpp/pull/143) for the source code changes.

<!--BEGIN_REPO_NAV-->
<br/><table>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/data_track_throughput/consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ int main(int argc, char* argv[]) {
throw std::runtime_error("Failed to connect to LiveKit room");
}

auto* local_participant = room.localParticipant();
auto local_participant = room.localParticipant().lock();
if (local_participant == nullptr) {
throw std::runtime_error("Local participant unavailable after connect");
}
Expand Down
10 changes: 6 additions & 4 deletions benchmarks/data_track_throughput/producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@ std::string waitForConsumerIdentity(Room& room, const std::string& requested_ide
const auto deadline = std::chrono::steady_clock::now() + timeout;
while (g_running.load() && std::chrono::steady_clock::now() < deadline) {
if (!requested_identity.empty()) {
if (room.remoteParticipant(requested_identity) != nullptr) {
if (!room.remoteParticipant(requested_identity).expired()) {
return requested_identity;
}
} else {
const auto participants = room.remoteParticipants();
if (participants.size() == 1 && participants.front() != nullptr) {
return participants.front()->identity();
if (participants.size() == 1) {
if (auto participant = participants.front().lock()) {
return participant->identity();
}
}
}

Expand Down Expand Up @@ -316,7 +318,7 @@ int main(int argc, char* argv[]) {
throw std::runtime_error("Failed to connect to LiveKit room");
}

auto* local_participant = room.localParticipant();
auto local_participant = room.localParticipant().lock();
if (local_participant == nullptr) {
throw std::runtime_error("Local participant unavailable after connect");
}
Expand Down
65 changes: 0 additions & 65 deletions bridge/CMakeLists.txt

This file was deleted.

Loading
Loading