Skip to content

Commit fc289a1

Browse files
Updated to latest method signatures
1 parent 839e38f commit fc289a1

18 files changed

Lines changed: 406 additions & 46 deletions

File tree

CMakeLists.txt

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,41 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2121
# Make "include(LiveKitSDK)" search in ./cmake
2222
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
2323

24-
set(LIVEKIT_SDK_VERSION "latest" CACHE STRING "LiveKit C++ SDK version (e.g. 0.2.0 or latest)")
24+
set(LIVEKIT_SDK_VERSION "" CACHE STRING
25+
"LiveKit C++ SDK release version (e.g. 0.3.4 or latest). Empty when LIVEKIT_SDK_COMMIT is used.")
26+
# Temporary pin: tracks an unreleased commit on `livekit/client-sdk-cpp@main`
27+
# that contains the unified-method-style guide changes (PR #127). Switch back
28+
# to LIVEKIT_SDK_VERSION once a tagged release ships those changes.
29+
set(LIVEKIT_SDK_COMMIT "f7a8df1b72207d0a81390e64e73f4eb5a4811c56" CACHE STRING
30+
"LiveKit C++ SDK commit hash on main (uses Builds workflow artifacts; ~7d retention).")
2531
set(LIVEKIT_LOCAL_SDK_DIR "" CACHE PATH "Path to a local LiveKit SDK install prefix (skips download)")
2632

2733
if(LIVEKIT_LOCAL_SDK_DIR)
2834
message(STATUS "Using local LiveKit SDK: ${LIVEKIT_LOCAL_SDK_DIR}")
2935
list(PREPEND CMAKE_PREFIX_PATH "${LIVEKIT_LOCAL_SDK_DIR}")
3036
else()
3137
include(LiveKitSDK)
32-
livekit_sdk_setup(
33-
VERSION "${LIVEKIT_SDK_VERSION}"
34-
SDK_DIR "${CMAKE_BINARY_DIR}/_deps/livekit-sdk"
35-
GITHUB_TOKEN "$ENV{GITHUB_TOKEN}"
36-
)
38+
if(LIVEKIT_SDK_COMMIT AND LIVEKIT_SDK_VERSION)
39+
message(FATAL_ERROR
40+
"Set either LIVEKIT_SDK_COMMIT or LIVEKIT_SDK_VERSION, not both.\n"
41+
"Got LIVEKIT_SDK_COMMIT='${LIVEKIT_SDK_COMMIT}' and LIVEKIT_SDK_VERSION='${LIVEKIT_SDK_VERSION}'.")
42+
endif()
43+
if(LIVEKIT_SDK_COMMIT)
44+
livekit_sdk_setup(
45+
COMMIT "${LIVEKIT_SDK_COMMIT}"
46+
SDK_DIR "${CMAKE_BINARY_DIR}/_deps/livekit-sdk"
47+
GITHUB_TOKEN "$ENV{GITHUB_TOKEN}"
48+
)
49+
else()
50+
if(NOT LIVEKIT_SDK_VERSION)
51+
set(LIVEKIT_SDK_VERSION "latest")
52+
endif()
53+
livekit_sdk_setup(
54+
VERSION "${LIVEKIT_SDK_VERSION}"
55+
SDK_DIR "${CMAKE_BINARY_DIR}/_deps/livekit-sdk"
56+
GITHUB_TOKEN "$ENV{GITHUB_TOKEN}"
57+
)
58+
endif()
3759
endif()
3860
find_package(LiveKit CONFIG REQUIRED)
3961

basic_room/capture_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ using namespace livekit;
3030

3131
// Test utils to run a capture loop to publish noisy audio frames to the room
3232
void runNoiseCaptureLoop(const std::shared_ptr<AudioSource>& source, std::atomic<bool>& running_flag) {
33-
const int sample_rate = source->sample_rate();
34-
const int num_channels = source->num_channels();
33+
const int sample_rate = source->sampleRate();
34+
const int num_channels = source->numChannels();
3535
const int frame_ms = 10;
3636
const int samples_per_channel = sample_rate * frame_ms / 1000;
3737

basic_room/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int main(int argc, char* argv[]) {
112112
options.dynacast = false;
113113

114114
std::cout << "Connecting to: " << url << "\n";
115-
if (!room->Connect(url, token, options)) {
115+
if (!room->connect(url, token, options)) {
116116
std::cerr << "Failed to connect\n";
117117
livekit::shutdown();
118118
return 1;

0 commit comments

Comments
 (0)