Enable padding bit in TransportFeedback packets

Set padding bit if the TransportFeedback packet contains zero padding.
Also write number of padding elements at the last position of the packet.

Bug: webrtc:10263
Change-Id: I8d17bc0e889f658ac383dec64ddcb95d438c9702
Reviewed-on: https://webrtc-review.googlesource.com/c/122240
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26646}
This commit is contained in:
Johannes Kron
2019-02-12 10:51:18 +01:00
committed by Commit Bot
parent 2ce0cb0e00
commit 99b9149cee
5 changed files with 100 additions and 32 deletions

View File

@ -87,6 +87,13 @@ class RtcpPacket {
uint8_t* buffer,
size_t* pos);
static void CreateHeader(size_t count_or_format,
uint8_t packet_type,
size_t block_length, // Payload size in 32bit words.
bool padding, // True if there are padding bytes.
uint8_t* buffer,
size_t* pos);
bool OnBufferFull(uint8_t* packet,
size_t* index,
PacketReadyCallback callback) const;