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

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

Issue 2372713005: Revert of Unify rtcp packet setters (Closed)
Patch Set: Created 4 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/bye.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc
index 610dfe36ff6ad750c0c253e534fdd34603845ebe..7b688ab9a4e7cdd04c7c9084c5c8e9ba3dab594c 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc
@@ -9,8 +9,6 @@
*/
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h"
-
-#include <utility>
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
@@ -111,18 +109,18 @@
return true;
}
-bool Bye::SetCsrcs(std::vector<uint32_t> csrcs) {
- if (csrcs.size() > kMaxNumberOfCsrcs) {
- LOG(LS_WARNING) << "Too many CSRCs for Bye packet.";
+bool Bye::WithCsrc(uint32_t csrc) {
+ if (csrcs_.size() >= kMaxNumberOfCsrcs) {
+ LOG(LS_WARNING) << "Max CSRC size reached.";
return false;
}
- csrcs_ = std::move(csrcs);
+ csrcs_.push_back(csrc);
return true;
}
-void Bye::SetReason(std::string reason) {
+void Bye::WithReason(const std::string& reason) {
RTC_DCHECK_LE(reason.size(), 0xffu);
- reason_ = std::move(reason);
+ reason_ = reason;
}
size_t Bye::BlockLength() const {
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/bye_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698