feat: Implement subprocess streaming architecture for separated control/data planes#385
Draft
feat: Implement subprocess streaming architecture for separated control/data planes#385
Conversation
- Add IPC protocol definitions (ipc_protocol.h) - Implement cross-platform named pipe IPC (ipc_pipe.h/cpp) - Add subprocess configuration (subprocess_config.h/cpp) - Implement subprocess lifecycle management (subprocess_manager.h/cpp) - Add subprocess module initialization (subprocess.h/cpp) - Update CMake to include subprocess module files Co-authored-by: ShadowLemoon <119576779+ShadowLemoon@users.noreply.github.com>
- Create sender_main.cpp with IPC message handling - Add CMakeLists.txt for building sunshine-sender - Create logging wrapper for subprocess module compatibility - Integrate sender build into Windows and Linux targets - Implement basic message routing for control commands Co-authored-by: ShadowLemoon <119576779+ShadowLemoon@users.noreply.github.com>
- Add missing <unordered_map> include to subprocess_manager.h - Use raw string literal for Windows pipe name - Fix Unix pipe path to use /tmp directory - Change 'using namespace std::literals' to 'using namespace std::chrono_literals' Co-authored-by: ShadowLemoon <119576779+ShadowLemoon@users.noreply.github.com>
Co-authored-by: ShadowLemoon <119576779+ShadowLemoon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor streaming architecture for reduced latency
feat: Implement subprocess streaming architecture for separated control/data planes
Dec 22, 2025
728df07 to
33745c6
Compare
029ba99 to
eba4145
Compare
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.
Implements architecture separating control plane (main process/SYSTEM) from data plane (subprocess/User) to reduce latency by eliminating cross-process memory copies and enabling direct WGC/WASAPI access from user session.
IPC Infrastructure (
src/subprocess/)ipc_protocol.h: Binary message protocol with session init, socket handover (Windows WSADuplicateSocket), control commands (IDR/bitrate/ref-frame invalidation), status reporting, heartbeatipc_pipe.h/cpp: Cross-platform named pipes - Windows CreateNamedPipe with overlapped I/O, Linux FIFO in/tmpsubprocess_manager.h/cpp: Worker lifecycle, socket transfer, heartbeat monitoring, status callbackssubprocess_logging.h: Compile-time switch between Boost.Log (main) and stderr (subprocess)Subprocess Sender (
src/sender/)sender_main.cpp: Standalone executable - IPC connect, config receive, control message routing, Windows socket recreation fromWSAPROTOCOL_INFOBuild Integration
cmake/targets/cmake/compile_definitions/common.cmakeUsage Pattern
Note: This PR establishes the framework. Actual capture/encode/send integration into the subprocess is a follow-up.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.