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

@ -99,11 +99,11 @@ class RtcpPacket {
size_t max_length,
PacketReadyCallback* callback) const = 0;
void CreateHeader(uint8_t count_or_format,
uint8_t packet_type,
size_t length,
uint8_t* buffer,
size_t* pos) const;
static void CreateHeader(uint8_t count_or_format,
uint8_t packet_type,
size_t block_length, // Size in 32bit words - 1.
uint8_t* buffer,
size_t* pos);
bool OnBufferFull(uint8_t* packet,
size_t* index,