| Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.cc
|
| diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.cc
|
| index 8f5afd5dd176e8a6c1426d77a924b1ef98809254..eead45d37018b75fb4629cfc1a9a138a560d1f73 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.cc
|
| @@ -10,18 +10,33 @@
|
|
|
| #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h"
|
|
|
| +#include "webrtc/base/checks.h"
|
| +
|
| namespace webrtc {
|
| namespace rtcp {
|
|
|
| +void CompoundPacket::Append(RtcpPacket* packet) {
|
| + RTC_CHECK(packet);
|
| + appended_packets_.push_back(packet);
|
| +}
|
| +
|
| bool CompoundPacket::Create(uint8_t* packet,
|
| size_t* index,
|
| size_t max_length,
|
| RtcpPacket::PacketReadyCallback* callback) const {
|
| + for (RtcpPacket* appended : appended_packets_) {
|
| + if (!appended->Create(packet, index, max_length, callback))
|
| + return false;
|
| + }
|
| return true;
|
| }
|
|
|
| size_t CompoundPacket::BlockLength() const {
|
| - return 0;
|
| + size_t block_length = 0;
|
| + for (RtcpPacket* appended : appended_packets_) {
|
| + block_length += appended->BlockLength();
|
| + }
|
| + return block_length;
|
| }
|
|
|
| } // namespace rtcp
|
|
|