Add ability to set rtp header extensions without recreating streams.
Setting the rtp header extensions on the packet delivery thread (currently worker, soon to be network), is now possible without taking the hit of deleting and recreating the receive stream (and rtp receiver and related state). Bug: webrtc:11993 Change-Id: I9bbe306844a25d85d79cd216092ead66eaf68960 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223741 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34953}
This commit is contained in:
@ -80,6 +80,14 @@ RtpHeaderExtensionMap::RtpHeaderExtensionMap(
|
||||
RegisterByUri(extension.id, extension.uri);
|
||||
}
|
||||
|
||||
void RtpHeaderExtensionMap::Reset(
|
||||
rtc::ArrayView<const RtpExtension> extensions) {
|
||||
for (auto& id : ids_)
|
||||
id = kInvalidId;
|
||||
for (const RtpExtension& extension : extensions)
|
||||
RegisterByUri(extension.id, extension.uri);
|
||||
}
|
||||
|
||||
bool RtpHeaderExtensionMap::RegisterByType(int id, RTPExtensionType type) {
|
||||
for (const ExtensionInfo& extension : kExtensions)
|
||||
if (type == extension.type)
|
||||
|
||||
Reference in New Issue
Block a user