Draft
Conversation
…264/Opus depacketization, HTTP server body parsing, and model integration Co-authored-by: eerimoq <176810+eerimoq@users.noreply.github.com>
… parameters Co-authored-by: eerimoq <176810+eerimoq@users.noreply.github.com>
… creation Co-authored-by: eerimoq <176810+eerimoq@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add WHIP server ingest for video and audio tracks
Implement WHIP server ingest
Feb 13, 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.
Adds a WHIP server for receiving WebRTC streams (H.264 video + Opus audio) into the app, reusing the existing
HttpServerinfrastructure.HTTP server enhancements (
HttpServer.swift)Content-LengthContent-Typeand headers201 Created/204 No Contentstatus codesDELETE /whip/{id}WebRTC receive path (
WhipServerClient.swift)rtcSetTrackCallback+rtcSetMessageCallbackto receive RTP on incoming tracksCMVideoFormatDescription→ hardware decode viaVideoDecoderAVAudioConverterdecode to PCM Int16 →CMSampleBufferWHIP protocol (
WhipServer.swift)POST /whip— SDP offer/answer exchange, returns201withLocationheaderDELETE /whip/{id}— client teardownWhipServerClientinstances keyed by UUIDSettings & model integration
SettingsWhipServer/SettingsWhipServerStreaminSettingsIngests.swiftDatabase.whipServerwith encode/decodeModelWhipServer.swiftimplementsWhipServerDelegate, routes decoded video/audio into the buffered media pipeline viaappendBufferedVideoSampleBuffer/appendBufferedAudioSampleBufferwhipCamera()/isWhipCameraOrMic()helpers inCommonUtils.swiftWHIP endpoint usage
A WHIP client (e.g. OBS, ffmpeg, GStreamer) sends an SDP offer:
Server responds with the SDP answer and a session URL for teardown:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.