organize examples#13
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes and (re)introduces multiple LiveKit C++ examples into a clearer folder structure (e.g., logging_levels/basic_usage, hello_livekit/sender, ping_pong/ping) and updates the root build to include them via add_subdirectory(<src> <binary_dir>).
Changes:
- Add new example implementations for
simple_joystick,ping_pong,hello_livekit, andlogging_levels. - Add per-example
CMakeLists.txtfiles that build dedicated executables (and small support static libs where needed). - Update the top-level
CMakeLists.txtto reference the new on-disk directory layout.
Reviewed changes
Copilot reviewed 1 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | Switches several examples to add_subdirectory(<nested path> <binary dir>) to match reorganized layout. |
| simple_joystick/sender/CMakeLists.txt | Builds SimpleJoystickSender plus a small support static library. |
| simple_joystick/sender/main.cpp | Sender example: connects to a room and sends joystick RPC commands based on keyboard input. |
| simple_joystick/sender/utils.h | Declares CLI parsing helper for URL/token. |
| simple_joystick/sender/utils.cpp | Implements CLI parsing with flags/positional/env fallbacks. |
| simple_joystick/sender/json_utils.h | Declares joystick command struct + JSON serialize/deserialize helpers. |
| simple_joystick/sender/json_utils.cpp | Implements JSON serialization/deserialization using nlohmann/json. |
| simple_joystick/receiver/CMakeLists.txt | Builds SimpleJoystickReceiver plus a small support static library. |
| simple_joystick/receiver/main.cpp | Receiver example: registers an RPC method and prints received joystick commands. |
| simple_joystick/receiver/utils.h | Declares CLI parsing helper for URL/token. |
| simple_joystick/receiver/utils.cpp | Implements CLI parsing with flags/positional/env fallbacks. |
| simple_joystick/receiver/json_utils.h | Declares joystick command struct + JSON serialize/deserialize helpers. |
| simple_joystick/receiver/json_utils.cpp | Implements JSON serialization/deserialization using nlohmann/json. |
| ping_pong/ping/CMakeLists.txt | Builds PingPongPing plus a small support static library. |
| ping_pong/ping/main.cpp | Ping participant: publishes “ping” frames, listens for “pong”, logs latency metrics. |
| ping_pong/ping/utils.h | Common helpers (env, time, payload conversions) for ping participant. |
| ping_pong/ping/messages.h | Defines ping/pong message structs and latency metrics struct. |
| ping_pong/ping/constants.h | Shared constants for track names, identities, JSON keys, and timing. |
| ping_pong/ping/json_converters.h | Declares JSON conversion functions for ping/pong messages. |
| ping_pong/ping/json_converters.cpp | Implements JSON conversion for ping/pong messages using nlohmann/json. |
| ping_pong/pong/CMakeLists.txt | Builds PingPongPong plus a small support static library. |
| ping_pong/pong/main.cpp | Pong participant: listens for “ping” frames and responds on “pong”. |
| ping_pong/pong/utils.h | Common helpers (env, time, payload conversions) for pong participant. |
| ping_pong/pong/messages.h | Defines ping/pong message structs and latency metrics struct. |
| ping_pong/pong/constants.h | Shared constants for track names, identities, JSON keys, and timing. |
| ping_pong/pong/json_converters.h | Declares JSON conversion functions for ping/pong messages. |
| ping_pong/pong/json_converters.cpp | Implements JSON conversion for ping/pong messages using nlohmann/json. |
| logging_levels/basic_usage/CMakeLists.txt | Builds the LoggingLevelsBasicUsage executable. |
| logging_levels/basic_usage/main.cpp | Demonstrates SDK log-level control and custom log callbacks. |
| logging_levels/custom_sinks/CMakeLists.txt | Builds the LoggingLevelsCustomSinks executable. |
| logging_levels/custom_sinks/main.cpp | Demonstrates custom log sinks (file, JSON, ROS2-stub) using setLogCallback. |
| hello_livekit/sender/CMakeLists.txt | Builds the HelloLivekitSender executable. |
| hello_livekit/sender/main.cpp | Publishes synthetic video and a data track. |
| hello_livekit/receiver/CMakeLists.txt | Builds the HelloLivekitReceiver executable. |
| hello_livekit/receiver/main.cpp | Subscribes to sender video + data track and logs frame counts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
alan-george-lk
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.