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: Iad5508c53d29d1e7d54c825da1ab56069cdd89b7
RTP header extensions are only processed, and unknown ones stripped, if
at least one side of the call negotiated header extensions through
`a=extmap` attributes. Otherwise RTP is forwarded untouched, including
any header extensions an endpoint may include without having announced
them.
Add a `force strip extmap` flag which selects header extension
processing for all streams of a call regardless of whether any
extensions were negotiated, so that unannounced header extensions are
removed. This is useful when forwarding media from sources that always
include header extensions towards endpoints that do not cope with them.
Change-Id: I57e14389c3610550a6859ac08e65ad866283554f
Define types of packetizers, with dedicated init and destroy functions,
and move maintenance of sample stream into encoder
Change-Id: I992f696c2b986485a89582909e299b2f6d462e5b