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

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

Issue 2234783002: Cleaned out candidateSet member from TMMBRHelp class (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove now unused include Created 4 years, 4 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/source/rtcp_receiver.cc ('k') | webrtc/modules/rtp_rtcp/source/tmmbr_help.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 23da9cac9586304c2de204a3916dbeaba62f4684..5365d19abb7627d606368b5d6018798b982fc93e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -589,22 +589,20 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBR(
// * If the sender is an owner of the TMMBN -> send TMMBR
// * If not an owner but the TMMBR would enter the TMMBN -> send TMMBR
- TMMBRHelp tmmbr_help;
// get current bounding set from RTCP receiver
bool tmmbrOwner = false;
- // store in candidateSet, allocates one extra slot
- TMMBRSet* candidateSet = tmmbr_help.CandidateSet();
+ TMMBRSet candidates;
// holding critical_section_rtcp_sender_ while calling RTCPreceiver which
// will accuire criticalSectionRTCPReceiver_ is a potental deadlock but
// since RTCPreceiver is not doing the reverse we should be fine
int32_t lengthOfBoundingSet =
- ctx.feedback_state_.module->BoundingSet(&tmmbrOwner, candidateSet);
+ ctx.feedback_state_.module->BoundingSet(&tmmbrOwner, &candidates);
if (lengthOfBoundingSet > 0) {
for (int32_t i = 0; i < lengthOfBoundingSet; i++) {
- if (candidateSet->Tmmbr(i) == tmmbr_send_ &&
- candidateSet->PacketOH(i) == packet_oh_send_) {
+ if (candidates.Tmmbr(i) == tmmbr_send_ &&
+ candidates.PacketOH(i) == packet_oh_send_) {
// Do not send the same tuple.
return nullptr;
}
@@ -612,11 +610,12 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBR(
if (!tmmbrOwner) {
// use received bounding set as candidate set
// add current tuple
- candidateSet->SetEntry(lengthOfBoundingSet, tmmbr_send_, packet_oh_send_,
- ssrc_);
+ candidates.SetEntry(lengthOfBoundingSet, tmmbr_send_, packet_oh_send_,
+ ssrc_);
// find bounding set
- std::vector<rtcp::TmmbItem> bounding = tmmbr_help.FindTMMBRBoundingSet();
+ std::vector<rtcp::TmmbItem> bounding =
+ TMMBRHelp::FindBoundingSet(std::move(candidates));
tmmbrOwner = TMMBRHelp::IsOwner(bounding, ssrc_);
if (!tmmbrOwner) {
// Did not enter bounding set, no meaning to send this request.
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/modules/rtp_rtcp/source/tmmbr_help.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698