Owner sign-off: replace root LICENSE with Apache License 2.0, add a root NOTICE file, and swap the GPL-2.0 boilerplate header in every first-party core/ and obs-adapter/ source file for a short Apache-2.0 notice. This resolves review finding C2 (GPLv2 top-level LICENSE vs. the vendored Apache-2.0 LiveKit SDK is a license-compatibility violation): the whole repo is now Apache-2.0, matching LiveKit, so there's no GPL/Apache clash left. Updated the README Status gate and the CI workflow comment to reflect that C2 is resolved, while leaving the C1 WebRTC/OpenH264 patent/royalty gate untouched -- that question is still open and still blocks release. third_party/ stays under its own upstream licenses; only this project's own code changed hands. All 6 CTest suites still pass after the header swap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
58 lines
2.0 KiB
C++
58 lines
2.0 KiB
C++
/*
|
|
streamer-tools OBS Camera Plugin - LiveKit SDK link smoke test
|
|
Copyright (C) 2026 CyberCoveLLC <jknapp85@gmail.com>
|
|
|
|
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
|
|
*/
|
|
|
|
// Proves the pinned client-sdk-cpp release is genuinely linked and callable:
|
|
// the SDK's own global init/shutdown runs in-process without crashing, and
|
|
// the header-reported build version matches the version CMake pinned.
|
|
//
|
|
// This does NOT touch the network -- livekit::initialize() only sets up
|
|
// global SDK state and log routing.
|
|
|
|
#include <cstdio>
|
|
#include <cstring>
|
|
|
|
#include <livekit/build.h>
|
|
#include <livekit/livekit.h>
|
|
#include <livekit/logging.h>
|
|
|
|
#include "test_util.h"
|
|
|
|
int main()
|
|
{
|
|
// The pin CMake resolved is passed in as a define; the SDK's own
|
|
// generated build.h reports what was actually unpacked. A mismatch means
|
|
// a stale extracted SDK directory is being reused.
|
|
ST_ASSERT_EQ(std::string(LIVEKIT_BUILD_VERSION), std::string(STPLUGIN_EXPECTED_LIVEKIT_VERSION));
|
|
|
|
// initialize() returns true when this call performed the init, false if
|
|
// the SDK was already initialized. Either way it must not crash, and a
|
|
// second call must report "already initialized".
|
|
bool first = livekit::initialize(livekit::LogLevel::Error);
|
|
ST_ASSERT(first);
|
|
|
|
bool second = livekit::initialize(livekit::LogLevel::Error);
|
|
ST_ASSERT(!second);
|
|
|
|
// Log level round-trips through the SDK's global state.
|
|
livekit::setLogLevel(livekit::LogLevel::Warn);
|
|
ST_ASSERT(livekit::getLogLevel() == livekit::LogLevel::Warn);
|
|
|
|
livekit::shutdown();
|
|
|
|
// The SDK documents that initialize() may be called again after
|
|
// shutdown(); exercise that so a half-torn-down global state would show
|
|
// up here rather than in OBS.
|
|
ST_ASSERT(livekit::initialize(livekit::LogLevel::Error));
|
|
livekit::shutdown();
|
|
|
|
return st_test_report("livekit_smoke");
|
|
}
|