Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet.h

Issue 1175263002: Add packetization and coding/decoding of feedback message format. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make size constants unsigned Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d212497edde322b73fe252b1b92c0e33af8602b2..c5432de9d6030544f4d6ea91405950d1712cbce6 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h
@@ -92,18 +92,27 @@ class RtcpPacket {
PacketReadyCallback* callback) const;
protected:
- RtcpPacket() : kHeaderLength(4) {}
+ RtcpPacket() {}
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;
+
bool OnBufferFull(uint8_t* packet,
size_t* index,
RtcpPacket::PacketReadyCallback* callback) const;
- const size_t kHeaderLength;
+ virtual size_t BlockLength() const = 0;
+ size_t HeaderLength() const;
+
+ static const size_t kHeaderLength = 4;
private:
bool CreateAndAddAppended(uint8_t* packet,
@@ -114,6 +123,8 @@ class RtcpPacket {
std::vector<RtcpPacket*> appended_packets_;
};
+// TODO(sprang): Move RtcpPacket subclasses out to separate files.
+
class Empty : public RtcpPacket {
public:
Empty() : RtcpPacket() {}
@@ -126,6 +137,8 @@ class Empty : public RtcpPacket {
size_t max_length,
RtcpPacket::PacketReadyCallback* callback) const override;
+ size_t BlockLength() const override;
+
private:
DISALLOW_COPY_AND_ASSIGN(Empty);
};
@@ -651,6 +664,8 @@ class Nack : public RtcpPacket {
size_t max_length,
RtcpPacket::PacketReadyCallback* callback) const override;
+ size_t BlockLength() const override;
+
private:
RTCPUtility::RTCPPacketRTPFBNACK nack_;
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698