58 lines
2.2 KiB
C++
58 lines
2.2 KiB
C++
/*
|
|||
|
|
streamer-tools OBS Camera Plugin - core library
|
||
|
|
Copyright (C) 2026 CyberCoveLLC <jknapp85@gmail.com>
|
||
|
|
|
||
|
|
This program is free software; you can redistribute it and/or modify
|
||
|
|
it under the terms of the GNU General Public License as published by
|
||
|
|
the Free Software Foundation; either version 2 of the License, or
|
||
|
|
(at your option) any later version.
|
||
|
|
|
||
|
|
This program is distributed in the hope that it will be useful,
|
||
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
|
GNU General Public License for more details.
|
||
|
|
|
||
|
|
You should have received a copy of the GNU General Public License along
|
||
|
|
with this program. If not, see <https://www.gnu.org/licenses/>
|
||
|
|
*/
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
// C++ API for the core library. Per the design doc
|
||
|
|
// (docs/superpowers/specs/2026-09-06-obs-camera-plugin-design.md in the
|
||
|
|
// streamer-tools repo), this library will eventually own: streamer-tools
|
||
|
|
// API auth, LiveKit FFI session management (connect, subscribe, decode,
|
||
|
|
// reconnect), and frame callbacks -- all with zero OBS dependency, so it
|
||
|
|
// can be built and tested headlessly.
|
||
|
|
//
|
||
|
|
// THIS IS SCAFFOLDING. Nothing below talks to a real server or to
|
||
|
|
// livekit-ffi yet. It exists to prove the core-library/OBS-adapter split
|
||
|
|
// builds, links, and is unit-testable, ahead of a later phase that
|
||
|
|
// implements the real logic.
|
||
|
|
|
||
|
|
namespace stplugin {
|
||
|
|
|
||
|
|
// Returns the core library's version string. Placeholder for a real
|
||
|
|
// version scheme once the library does something.
|
||
|
|
const char *core_version();
|
||
|
|
|
||
|
|
// Minimal connection configuration the future core library will use to
|
||
|
|
// authenticate against the streamer-tools API
|
||
|
|
// (see apps/server/src/rooms/join.routes.ts and
|
||
|
|
// apps/server/src/livekit/tokens.ts in the streamer-tools repo for the
|
||
|
|
// existing read-key-authed token pattern this will follow) and mint a
|
||
|
|
// scoped LiveKit subscriber token. Validation here is intentionally
|
||
|
|
// trivial -- it exists to prove the core library is unit-testable
|
||
|
|
// headlessly, not to implement the real API client.
|
||
|
|
struct ConnectionConfig {
|
||
|
|
std::string server_url;
|
||
|
|
std::string room_slug;
|
||
|
|
std::string read_key;
|
||
|
|
|
||
|
|
bool is_valid() const;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace stplugin
|