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

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

Issue 1430013003: rtcp::Bye packet moved to own file and got a Parse function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
index 792caa7b8b701f96886ab3c529ed94c1150510ca..dcb61584eadad017d23ff01e558af884026fd5c4 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
@@ -233,28 +233,6 @@ void CreateSdes(const std::vector<Sdes::Chunk>& chunks,
}
}
-// Bye packet (BYE) (RFC 3550).
-//
-// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// |V=2|P| SC | PT=BYE=203 | length |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// | SSRC/CSRC |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// : ... :
-// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-// (opt) | length | reason for leaving ...
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-void CreateBye(const RTCPPacketBYE& bye,
- const std::vector<uint32_t>& csrcs,
- uint8_t* buffer,
- size_t* pos) {
- AssignUWord32(buffer, pos, bye.SenderSSRC);
- for (uint32_t csrc : csrcs)
- AssignUWord32(buffer, pos, csrc);
-}
-
// Application-Defined packet (APP) (RFC 3550).
//
// 0 1 2 3
@@ -876,29 +854,6 @@ size_t Sdes::BlockLength() const {
return length;
}
-bool Bye::Create(uint8_t* packet,
- size_t* index,
- size_t max_length,
- RtcpPacket::PacketReadyCallback* callback) const {
- while (*index + BlockLength() > max_length) {
- if (!OnBufferFull(packet, index, callback))
- return false;
- }
- size_t length = HeaderLength();
- CreateHeader(length, PT_BYE, length, packet, index);
- CreateBye(bye_, csrcs_, packet, index);
- return true;
-}
-
-bool Bye::WithCsrc(uint32_t csrc) {
- if (csrcs_.size() >= kMaxNumberOfCsrcs) {
- LOG(LS_WARNING) << "Max CSRC size reached.";
- return false;
- }
- csrcs_.push_back(csrc);
- return true;
-}
-
bool App::Create(uint8_t* packet,
size_t* index,
size_t max_length,

Powered by Google App Engine
This is Rietveld 408576698