Skip to content

Comments

livekit_bridge: An ergonomic interface into the Livekit C++ SDK#58

Open
stephen-derosa wants to merge 19 commits intolivekit:mainfrom
stephen-derosa:feat/livekit_cpp_bridge.sdd
Open

livekit_bridge: An ergonomic interface into the Livekit C++ SDK#58
stephen-derosa wants to merge 19 commits intolivekit:mainfrom
stephen-derosa:feat/livekit_cpp_bridge.sdd

Conversation

@stephen-derosa
Copy link

@stephen-derosa stephen-derosa commented Feb 13, 2026

Overview

An ergonomic library providing simple usage of the C++ SDK.

Building

This library is attached to the build system of the core C++ SDK library. Use build.sh as is.

Testing

The bridge/examples/ directory has simulated human and robot tests. There are 4 files:

  • robot.cpp: publishes video and audio from a webcam and microphone. This requires a webcam and microphone to be available.
  • robot_stub.cpp: publishes stubbed audio and video. This exists to exemplify simplicity.
  • human.cpp: receives and renders video to the screen, receives and plays audio through the speaker.
  • human_stub.cpp: receives video and audio and prints that it was received. This exists to exemplify simplicity.

These have been tested manually.

Unit tests

  1. CallbackKey hashing/equality,
  2. BridgeAudioTrack/BridgeVideoTrack state management, and
  3. LiveKitBridge pre-connection behaviour (callback registration, error handling).

Limitations

The bridge is designed for simplicity and currently only supports limited audio and video features. It does not expose:

  • E2EE configuration
  • RPC / data channels / data tracks
  • Simulcast tuning
  • Video format selection (RGBA is the default; no format option yet)
  • Custom RoomOptions or TrackPublishOptions

For advanced use cases, use the full client-sdk-cpp API directly, or expand the bridge to support your use case.

TODOs before merge

  • multiple video/audio streams
  • ❓ what other tests should we require here to ensure we have a good infrastructure moving forward?
  • ❓ Other general LiveKit reqs?

@stephen-derosa stephen-derosa self-assigned this Feb 13, 2026
@stephen-derosa stephen-derosa added the enhancement New feature or request label Feb 13, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Collaborator

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work, that is a large PR, I will need more time to review it.

some initial questions to get a clearer picture on the design.

…s. livekit_bridge.cpp: disconnect() if cerr, but continue with disconnect
…ing_ flag to guard against calling connect() more than once
instead of calling stopThread() before creating, we do cleanup after calling start.
examples/robot.cpp for sends webcam/mic and sim video/audio feeds to the human participant. examples/human.cpp takes in human input to switch between real/sim streams
@stephen-derosa stephen-derosa force-pushed the feat/livekit_cpp_bridge.sdd branch 2 times, most recently from f7ef724 to 1f5e7fd Compare February 19, 2026 19:27
@stephen-derosa stephen-derosa force-pushed the feat/livekit_cpp_bridge.sdd branch from 1f5e7fd to baf78ba Compare February 19, 2026 19:27
Copy link
Collaborator

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

LGTM with some suggestions offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants