Add a ParseHeader method to RtcpPacket, for parsing common RTCP header.

Also refactor TransportFeedback to use this.

BUG=

Review URL: https://codereview.webrtc.org/1307663004

Cr-Commit-Position: refs/heads/master@{#9935}
This commit is contained in:
sprang
2015-09-14 12:50:39 -07:00
committed by Commit bot
parent 1cb121dea4
commit 73a93e8257
6 changed files with 249 additions and 169 deletions

View File

@ -743,7 +743,7 @@ void RtcpPacket::CreateHeader(
uint8_t packet_type,
size_t length,
uint8_t* buffer,
size_t* pos) const {
size_t* pos) {
assert(length <= 0xffff);
const uint8_t kVersion = 2;
AssignUWord8(buffer, pos, (kVersion << 6) + count_or_format);