Use ArrayView in the IncomingRtcpPacket function.
The lowest level and some of the highest levels of this function are
already using ArrayView. Make this consistent throughout.
Use deprecation for the old API rather than deleting it, since upstream
may be using it.
Bug: webrtc:14870
Change-Id: If5e1a6e9802ecf7e8e3ec27befb5167ca9985517
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291706
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39241}
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
index 31dd149..565e1ea 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
+++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc
@@ -143,10 +143,10 @@
return absl::nullopt;
}
-void ModuleRtpRtcpImpl2::IncomingRtcpPacket(const uint8_t* rtcp_packet,
- const size_t length) {
+void ModuleRtpRtcpImpl2::IncomingRtcpPacket(
+ rtc::ArrayView<const uint8_t> rtcp_packet) {
RTC_DCHECK_RUN_ON(&rtcp_thread_checker_);
- rtcp_receiver_.IncomingPacket(rtcp_packet, length);
+ rtcp_receiver_.IncomingPacket(rtcp_packet);
}
void ModuleRtpRtcpImpl2::RegisterSendPayloadFrequency(int payload_type,