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

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

Issue 1309833002: Send RTCP packets via RtcpPacket callback (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Send RTCP messags directly via callback, refactoring, rebase Created 5 years, 3 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
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 3c34957c361bab8f206791dc7670bd59194a3e48..ead2dc3f85afedb39cb0a95f04221deaee391b43 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h
@@ -81,16 +81,20 @@ class RtcpPacket {
// used, will cause assertion error if fragmentation occurs.
rtc::scoped_ptr<RawPacket> Build() const;
- // Returns true if all calls to Create succeeded. A buffer of size
- // IP_PACKET_SIZE will be allocated and reused between calls to callback.
- bool Build(PacketReadyCallback* callback) const;
-
// Returns true if all calls to Create succeeded. Provided buffer reference
// will be used for all calls to callback.
bool BuildExternalBuffer(uint8_t* buffer,
size_t max_length,
PacketReadyCallback* callback) const;
+ // Same as BuildExternalBuffer, but index pointer is explicitly exposed and
+ // the PacketReadyCallback will not be called prior to returning (so index
+ // must be checked to see if there is something left in the buffer unsent).
+ bool CreateAndAddAppended(uint8_t* packet,
+ size_t* index,
+ size_t max_length,
+ PacketReadyCallback* callback) const;
+
// Size of this packet in bytes (including headers, excluding nested packets).
virtual size_t BlockLength() const = 0;
@@ -117,11 +121,6 @@ class RtcpPacket {
static const size_t kHeaderLength = 4;
private:
- bool CreateAndAddAppended(uint8_t* packet,
- size_t* index,
- size_t max_length,
- PacketReadyCallback* callback) const;
-
std::vector<RtcpPacket*> appended_packets_;
};
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtcp_packet.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtcp_sender.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698