Index: webrtc/modules/rtp_rtcp/source/rtcp_packet.h |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h |
index c5432de9d6030544f4d6ea91405950d1712cbce6..601e6366f132ea2daa6dc5aa4a260f03708afffd 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h |
@@ -94,16 +94,29 @@ class RtcpPacket { |
protected: |
RtcpPacket() {} |
+ struct CommonHeader { |
+ CommonHeader(); |
+ |
+ uint8_t count_or_format; |
+ uint8_t payload_type; |
+ uint32_t payload_size_bytes; |
+ }; |
+ |
virtual bool Create(uint8_t* packet, |
size_t* index, |
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); |
+ |
+ static bool ParseHeader(const uint8_t* packet, |
+ size_t index, |
+ size_t max_length, |
+ CommonHeader* header); |
bool OnBufferFull(uint8_t* packet, |
size_t* index, |