Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.cc |
index 829f3a9db98aa8f6c6e1c8a0c24507c9780242ba..03689b374d0ceb14d68701c037c522389d22e884 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/sli.cc |
@@ -13,11 +13,11 @@ |
#include "webrtc/base/checks.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
- |
-using webrtc::RTCPUtility::RtcpCommonHeader; |
+#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h" |
namespace webrtc { |
namespace rtcp { |
+constexpr uint8_t Sli::kFeedbackMessageType; |
// RFC 4585: Feedback format. |
// |
// Common packet format: |
@@ -58,24 +58,24 @@ void Sli::Macroblocks::Create(uint8_t* buffer) const { |
ByteWriter<uint32_t>::WriteBigEndian(buffer, item_); |
} |
-bool Sli::Parse(const RtcpCommonHeader& header, const uint8_t* payload) { |
- RTC_DCHECK(header.packet_type == kPacketType); |
- RTC_DCHECK(header.count_or_format == kFeedbackMessageType); |
+bool Sli::Parse(const CommonHeader& packet) { |
+ RTC_DCHECK_EQ(packet.type(), kPacketType); |
+ RTC_DCHECK_EQ(packet.fmt(), kFeedbackMessageType); |
- if (header.payload_size_bytes < |
+ if (packet.payload_size_bytes() < |
kCommonFeedbackLength + Macroblocks::kLength) { |
LOG(LS_WARNING) << "Packet is too small to be a valid SLI packet"; |
return false; |
} |
size_t number_of_items = |
- (header.payload_size_bytes - kCommonFeedbackLength) / |
+ (packet.payload_size_bytes() - kCommonFeedbackLength) / |
Macroblocks::kLength; |
- ParseCommonFeedback(payload); |
+ ParseCommonFeedback(packet.payload()); |
items_.resize(number_of_items); |
- const uint8_t* next_item = payload + kCommonFeedbackLength; |
+ const uint8_t* next_item = packet.payload() + kCommonFeedbackLength; |
for (Macroblocks& item : items_) { |
item.Parse(next_item); |
next_item += Macroblocks::kLength; |