Delete helper to parse rtcp packet into rtp header
The only user of that function is only interested in the type of the first rtcp message in the packet, which can be extracted in a simpler way Bug: None Change-Id: I96aeb8ed66099f94d506aa7d8d0d07378f6c952e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226543 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34515}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
5b088a0949
commit
1ccc5a55e1
@ -130,33 +130,6 @@ bool RtpHeaderParser::RTCP() const {
|
||||
}
|
||||
}
|
||||
|
||||
bool RtpHeaderParser::ParseRtcp(RTPHeader* header) const {
|
||||
RTC_DCHECK(header);
|
||||
|
||||
const ptrdiff_t length = _ptrRTPDataEnd - _ptrRTPDataBegin;
|
||||
if (length < kRtcpMinParseLength) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint8_t V = _ptrRTPDataBegin[0] >> 6;
|
||||
if (V != kRtcpExpectedVersion) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const uint8_t PT = _ptrRTPDataBegin[1];
|
||||
const size_t len = (_ptrRTPDataBegin[2] << 8) + _ptrRTPDataBegin[3];
|
||||
const uint8_t* ptr = &_ptrRTPDataBegin[4];
|
||||
|
||||
uint32_t SSRC = ByteReader<uint32_t>::ReadBigEndian(ptr);
|
||||
ptr += 4;
|
||||
|
||||
header->payloadType = PT;
|
||||
header->ssrc = SSRC;
|
||||
header->headerLength = 4 + (len << 2);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RtpHeaderParser::Parse(RTPHeader* header,
|
||||
const RtpHeaderExtensionMap* ptrExtensionMap,
|
||||
bool header_only) const {
|
||||
|
||||
@ -37,7 +37,6 @@ class RtpHeaderParser {
|
||||
|
||||
ABSL_DEPRECATED("Use IsRtpPacket or IsRtcpPacket")
|
||||
bool RTCP() const;
|
||||
bool ParseRtcp(RTPHeader* header) const;
|
||||
bool Parse(RTPHeader* parsedPacket,
|
||||
const RtpHeaderExtensionMap* ptrExtensionMap = nullptr,
|
||||
bool header_only = false) const;
|
||||
|
||||
Reference in New Issue
Block a user