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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc

Issue 1513303003: [rtp_rtcp] fixed lint errors in rtp_rtcp module that are not fixed in other CLs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 638
639 // get current bounding set from RTCP receiver 639 // get current bounding set from RTCP receiver
640 bool tmmbrOwner = false; 640 bool tmmbrOwner = false;
641 // store in candidateSet, allocates one extra slot 641 // store in candidateSet, allocates one extra slot
642 TMMBRSet* candidateSet = tmmbr_help_.CandidateSet(); 642 TMMBRSet* candidateSet = tmmbr_help_.CandidateSet();
643 643
644 // holding critical_section_rtcp_sender_ while calling RTCPreceiver which 644 // holding critical_section_rtcp_sender_ while calling RTCPreceiver which
645 // will accuire criticalSectionRTCPReceiver_ is a potental deadlock but 645 // will accuire criticalSectionRTCPReceiver_ is a potental deadlock but
646 // since RTCPreceiver is not doing the reverse we should be fine 646 // since RTCPreceiver is not doing the reverse we should be fine
647 int32_t lengthOfBoundingSet = 647 int32_t lengthOfBoundingSet =
648 ctx.feedback_state_.module->BoundingSet(tmmbrOwner, candidateSet); 648 ctx.feedback_state_.module->BoundingSet(&tmmbrOwner, candidateSet);
649 649
650 if (lengthOfBoundingSet > 0) { 650 if (lengthOfBoundingSet > 0) {
651 for (int32_t i = 0; i < lengthOfBoundingSet; i++) { 651 for (int32_t i = 0; i < lengthOfBoundingSet; i++) {
652 if (candidateSet->Tmmbr(i) == tmmbr_send_ && 652 if (candidateSet->Tmmbr(i) == tmmbr_send_ &&
653 candidateSet->PacketOH(i) == packet_oh_send_) { 653 candidateSet->PacketOH(i) == packet_oh_send_) {
654 // Do not send the same tuple. 654 // Do not send the same tuple.
655 return nullptr; 655 return nullptr;
656 } 656 }
657 } 657 }
658 if (!tmmbrOwner) { 658 if (!tmmbrOwner) {
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 for (const ReportFlag& flag : report_flags_) { 1070 for (const ReportFlag& flag : report_flags_) {
1071 if (flag.is_volatile) 1071 if (flag.is_volatile)
1072 return false; 1072 return false;
1073 } 1073 }
1074 return true; 1074 return true;
1075 } 1075 }
1076 1076
1077 bool RTCPSender::SendFeedbackPacket(const rtcp::TransportFeedback& packet) { 1077 bool RTCPSender::SendFeedbackPacket(const rtcp::TransportFeedback& packet) {
1078 class Sender : public rtcp::RtcpPacket::PacketReadyCallback { 1078 class Sender : public rtcp::RtcpPacket::PacketReadyCallback {
1079 public: 1079 public:
1080 Sender(Transport* transport) 1080 explicit Sender(Transport* transport)
1081 : transport_(transport), send_failure_(false) {} 1081 : transport_(transport), send_failure_(false) {}
1082 1082
1083 void OnPacketReady(uint8_t* data, size_t length) override { 1083 void OnPacketReady(uint8_t* data, size_t length) override {
1084 if (!transport_->SendRtcp(data, length)) 1084 if (!transport_->SendRtcp(data, length))
1085 send_failure_ = true; 1085 send_failure_ = true;
1086 } 1086 }
1087 1087
1088 Transport* const transport_; 1088 Transport* const transport_;
1089 bool send_failure_; 1089 bool send_failure_;
1090 } sender(transport_); 1090 } sender(transport_);
1091 1091
1092 uint8_t buffer[IP_PACKET_SIZE]; 1092 uint8_t buffer[IP_PACKET_SIZE];
1093 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && 1093 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) &&
1094 !sender.send_failure_; 1094 !sender.send_failure_;
1095 } 1095 }
1096 1096
1097 } // namespace webrtc 1097 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698