Negotiate use of RTCP loss notification feedback (LNTF)
When the LossNotifications field trial is in effect, LNTF should
be offered/accepted in the SDP message, not assumed to be configured
on both sides equally.
Bug: webrtc:10662
Change-Id: Ibd827779bd301821cbb4196857f6baebfc9e7dc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138079
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28056}
diff --git a/pc/rtp_parameters_conversion.cc b/pc/rtp_parameters_conversion.cc
index cf9e6e1..b7fb691 100644
--- a/pc/rtp_parameters_conversion.cc
+++ b/pc/rtp_parameters_conversion.cc
@@ -39,6 +39,13 @@
}
return cricket::FeedbackParam(cricket::kRtcpFbParamCcm,
cricket::kRtcpFbCcmParamFir);
+ case RtcpFeedbackType::LNTF:
+ if (feedback.message_type) {
+ LOG_AND_RETURN_ERROR(
+ RTCErrorType::INVALID_PARAMETER,
+ "Didn't expect message type in LNTF RtcpFeedback.");
+ }
+ return cricket::FeedbackParam(cricket::kRtcpFbParamLntf);
case RtcpFeedbackType::NACK:
if (!feedback.message_type) {
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_PARAMETER,
@@ -253,6 +260,14 @@
<< cricket_feedback.param();
return absl::nullopt;
}
+ } else if (cricket_feedback.id() == cricket::kRtcpFbParamLntf) {
+ if (cricket_feedback.param().empty()) {
+ return RtcpFeedback(RtcpFeedbackType::LNTF);
+ } else {
+ RTC_LOG(LS_WARNING) << "Unsupported parameter for LNTF RTCP feedback: "
+ << cricket_feedback.param();
+ return absl::nullopt;
+ }
} else if (cricket_feedback.id() == cricket::kRtcpFbParamNack) {
if (cricket_feedback.param().empty()) {
return RtcpFeedback(RtcpFeedbackType::NACK,