RtpTransceiverInterface: introduce HeaderExtensionsNegotiated.
This changes adds exposure of a new transceiver method for accessing header extensions that have been negotiated, following spec details in https://w3c.github.io/webrtc-extensions/#rtcrtptransceiver-interface. The change contains unit tests testing the functionality. Note: support for signalling directionality of header extensions in the SDP isn't implemented yet. https://chromestatus.com/feature/5680189201711104. Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/65YdUi02yZk Bug: chromium:1051821 Change-Id: If963beed37e96eed2dff3a2822db4e30caaea4a0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198126 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32860}
This commit is contained in:
committed by
Commit Bot
parent
d95a47d08f
commit
5932fe1392
@ -12,12 +12,14 @@
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/algorithm/container.h"
|
||||
#include "api/rtp_parameters.h"
|
||||
#include "pc/channel_manager.h"
|
||||
#include "pc/rtp_media_utils.h"
|
||||
#include "pc/rtp_parameters_conversion.h"
|
||||
#include "pc/session_description.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
@ -455,6 +457,17 @@ RtpTransceiver::HeaderExtensionsToOffer() const {
|
||||
return header_extensions_to_offer_;
|
||||
}
|
||||
|
||||
std::vector<RtpHeaderExtensionCapability>
|
||||
RtpTransceiver::HeaderExtensionsNegotiated() const {
|
||||
if (!channel_)
|
||||
return {};
|
||||
std::vector<RtpHeaderExtensionCapability> result;
|
||||
for (const auto& ext : channel_->GetNegotiatedRtpHeaderExtensions()) {
|
||||
result.emplace_back(ext.uri, ext.id, RtpTransceiverDirection::kSendRecv);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RTCError RtpTransceiver::SetOfferedRtpHeaderExtensions(
|
||||
rtc::ArrayView<const RtpHeaderExtensionCapability>
|
||||
header_extensions_to_offer) {
|
||||
|
||||
Reference in New Issue
Block a user