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

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

Issue 1579213005: [rtp_rtcp] rtcp::Xr moved into own file and renamed to ExtendedReports on the way (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 f1fc7175faf6be9e6878d67dc9970cdfbf2cd88c..949ea39fc7e05bfb111a52936141bbba2ab36a26 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.h
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.h
@@ -12,16 +12,12 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_PACKET_H_
-#include <map>
#include <string>
#include <vector>
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
-#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/dlrr.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.h"
-#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rrtr.h"
-#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/voip_metric.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
#include "webrtc/typedefs.h"
@@ -306,70 +302,6 @@ class Rpsi : public RtcpPacket {
RTC_DISALLOW_COPY_AND_ASSIGN(Rpsi);
};
-// From RFC 3611: RTP Control Protocol Extended Reports (RTCP XR).
-//
-// Format for XR packets:
-//
-// 0 1 2 3
-// 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|reserved | PT=XR=207 | length |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// | SSRC |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// : report blocks :
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-class Xr : public RtcpPacket {
- public:
- typedef std::vector<RTCPUtility::RTCPPacketXRDLRRReportBlockItem> DlrrBlock;
- Xr() : RtcpPacket() {
- memset(&xr_header_, 0, sizeof(xr_header_));
- }
-
- virtual ~Xr() {}
-
- void From(uint32_t ssrc) {
- xr_header_.OriginatorSSRC = ssrc;
- }
-
- // Max 50 items of each of {Rrtr, Dlrr, VoipMetric} allowed per Xr.
- bool WithRrtr(Rrtr* rrtr);
- bool WithDlrr(Dlrr* dlrr);
- bool WithVoipMetric(VoipMetric* voip_metric);
-
- protected:
- bool Create(uint8_t* packet,
- size_t* index,
- size_t max_length,
- RtcpPacket::PacketReadyCallback* callback) const override;
-
- private:
- static const int kMaxNumberOfRrtrBlocks = 50;
- static const int kMaxNumberOfDlrrBlocks = 50;
- static const int kMaxNumberOfVoipMetricBlocks = 50;
-
- size_t BlockLength() const {
- const size_t kXrHeaderLength = 8;
- return kXrHeaderLength + RrtrLength() + DlrrLength() + VoipMetricLength();
- }
-
- size_t RrtrLength() const { return Rrtr::kLength * rrtr_blocks_.size(); }
-
- size_t DlrrLength() const;
-
- size_t VoipMetricLength() const {
- return VoipMetric::kLength * voip_metric_blocks_.size();
- }
-
- RTCPUtility::RTCPPacketXR xr_header_;
- std::vector<Rrtr> rrtr_blocks_;
- std::vector<Dlrr> dlrr_blocks_;
- std::vector<VoipMetric> voip_metric_blocks_;
-
- RTC_DISALLOW_COPY_AND_ASSIGN(Xr);
-};
-
// Class holding a RTCP packet.
//
// Takes a built rtcp packet.
« 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