mirror of https://github.com/sipwise/rtpengine.git
A controlling agent feeding media into a WebRTC SFU needs to know the SSRC of the incoming stream before it can bind a receiver to it, and the SFU needs that SSRC to stay put for the life of the call. With `fixed egress SSRC` set, rtpengine picks an SSRC for each media at signalling time and returns the chosen values in the offer or answer response, one entry per m= section along with its index and media type. The value is recorded as the ingress entry's `ssrc_map_out`, which is already the mapping every consumer reads: the egress entry is keyed off it, RTCP rewriting uses it, and the kernel module is handed it as `ssrc_out`. Because one egress entry then stands in for every ingress SSRC, it outlives a change of source, so `seq_diff` carries across on its own. All that is left is re-basing it once at the changeover, taking the last sequence number from the counter shared with the kernel module so that it is still right while the stream is offloaded. The substitution itself goes in the plain passthrough handler rather than the SSRC passthrough one, so that it applies to builds without transcoding support as well. Those builds compile the kernel side regardless, so leaving the userspace half out would have meant the original SSRC being forwarded until the stream was offloaded and the fixed one afterwards. Change-Id: Iad5508c53d29d1e7d54c825da1ab56069cdd89b7master
parent
579097e812
commit
7674d8529c
Loading…
Reference in new issue