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

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

Issue 1170723002: Use RtcpPacket classes for SenderReport/ReceiveReport in RTCPSender (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 6 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.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
index 07ce33620ba6e451af9e65c62618ed32b13b0f91..7038532f2e991fa822b364a0e0e2e4327b630c0e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc
@@ -810,13 +810,12 @@ bool SenderReport::Create(uint8_t* packet,
return true;
}
-bool SenderReport::WithReportBlock(ReportBlock* block) {
- assert(block);
+bool SenderReport::WithReportBlock(const ReportBlock& block) {
if (report_blocks_.size() >= kMaxNumberOfReportBlocks) {
LOG(LS_WARNING) << "Max report blocks reached.";
return false;
}
- report_blocks_.push_back(block->report_block_);
+ report_blocks_.push_back(block.report_block_);
sr_.NumberOfReportBlocks = report_blocks_.size();
return true;
}
@@ -834,13 +833,12 @@ bool ReceiverReport::Create(uint8_t* packet,
return true;
}
-bool ReceiverReport::WithReportBlock(ReportBlock* block) {
- assert(block);
+bool ReceiverReport::WithReportBlock(const ReportBlock& block) {
if (report_blocks_.size() >= kMaxNumberOfReportBlocks) {
LOG(LS_WARNING) << "Max report blocks reached.";
return false;
}
- report_blocks_.push_back(block->report_block_);
+ report_blocks_.push_back(block.report_block_);
rr_.NumberOfReportBlocks = report_blocks_.size();
return true;
}
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698