Post content
TelegramMessenger/tgcalls/experimental • b0245de • 3 files, +533/-17 feat: add video support to group calls (CustomImpl + ReferenceImpl) Enable H264 simulcast video in group calls for both GroupInstanceCustomImpl and GroupInstanceReferenceImpl, with reactive channel setup mirroring the real Telegram app's flow. Infrastructure: - DiscardPacketsWithUnknownSsrc field trial prevents outgoing video channel from stealing incoming RTP for unregistered SSRCs - dataChannelMessageReceived callback on GroupInstanceDescriptor forwards Colibri messages (ActiveVideoSsrcs) to the application layer ReferenceImpl video implementation: - Pre-allocate 6 video SSRCs (3 layers x primary + RTX) at construction - SDP munging: replace PeerConnection's auto-generated StreamParams with pre-allocated SSRCs + SIM + FID groups before SetLocalDescription - Video source activated via sender()->SetTrack() (no renegotiation) - Incoming video: recvonly transceivers with explicit remote SSRCs in answer (required because DiscardPacketsWithUnknownSsrc is process-wide) - Video sinks wired explicitly after SetRemoteDescription (OnTrack doesn't fire for locally-created recvonly transceivers) - Colibri ReceiverVideoConstraints sent over data channel to control SFU forwarding; SFU responds with SenderVideoConstraints + proactive PLI Squashed from: - feat: enable DiscardPacketsWithUnknownSsrc field trial for video group calls - feat: add dataChannelMessageReceived callback to GroupInstanceDescriptor - feat(group-ref): store video configuration from descriptor - feat(group-ref): pre-allocate video SSRCs and include in join payload - feat(group-ref): add video encoder/decoder factories to PeerConnectionFactory - feat(group-ref): implement setVideoSource with SDP munging for simulcast SSRCs - feat(group-ref): extend buildRemoteAnswer with video m-line construction - feat(group-ref): forward data channel messages to app for video signaling - feat(group-ref): implement setRequestedVideoChannels with Colibri constraints - feat(group-ref): implement addIncomingVideoOutput with video sink wiring - fix(group-ref): activate outgoing video after join response is applied - feat(group-ref): add video support to GroupInstanceReferenceImpl #tgcalls