| OLD | NEW |
| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 candidateSet->PacketOH(i) == packet_oh_send_) { | 607 candidateSet->PacketOH(i) == packet_oh_send_) { |
| 608 // Do not send the same tuple. | 608 // Do not send the same tuple. |
| 609 return nullptr; | 609 return nullptr; |
| 610 } | 610 } |
| 611 } | 611 } |
| 612 if (!tmmbrOwner) { | 612 if (!tmmbrOwner) { |
| 613 // use received bounding set as candidate set | 613 // use received bounding set as candidate set |
| 614 // add current tuple | 614 // add current tuple |
| 615 candidateSet->SetEntry(lengthOfBoundingSet, tmmbr_send_, packet_oh_send_, | 615 candidateSet->SetEntry(lengthOfBoundingSet, tmmbr_send_, packet_oh_send_, |
| 616 ssrc_); | 616 ssrc_); |
| 617 int numCandidates = lengthOfBoundingSet + 1; | |
| 618 | 617 |
| 619 // find bounding set | 618 // find bounding set |
| 620 TMMBRSet* boundingSet = nullptr; | 619 std::vector<rtcp::TmmbItem> bounding = tmmbr_help.FindTMMBRBoundingSet(); |
| 621 int numBoundingSet = tmmbr_help.FindTMMBRBoundingSet(boundingSet); | 620 tmmbrOwner = TMMBRHelp::IsOwner(bounding, ssrc_); |
| 622 if (numBoundingSet > 0 || numBoundingSet <= numCandidates) | |
| 623 tmmbrOwner = tmmbr_help.IsOwner(ssrc_, numBoundingSet); | |
| 624 if (!tmmbrOwner) { | 621 if (!tmmbrOwner) { |
| 625 // Did not enter bounding set, no meaning to send this request. | 622 // Did not enter bounding set, no meaning to send this request. |
| 626 return nullptr; | 623 return nullptr; |
| 627 } | 624 } |
| 628 } | 625 } |
| 629 } | 626 } |
| 630 | 627 |
| 631 if (!tmmbr_send_) | 628 if (!tmmbr_send_) |
| 632 return nullptr; | 629 return nullptr; |
| 633 | 630 |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 // but we can't because of an incorrect warning (C4822) in MVS 2013. | 1052 // but we can't because of an incorrect warning (C4822) in MVS 2013. |
| 1056 } sender(transport_, event_log_); | 1053 } sender(transport_, event_log_); |
| 1057 | 1054 |
| 1058 RTC_DCHECK_LE(max_payload_length_, static_cast<size_t>(IP_PACKET_SIZE)); | 1055 RTC_DCHECK_LE(max_payload_length_, static_cast<size_t>(IP_PACKET_SIZE)); |
| 1059 uint8_t buffer[IP_PACKET_SIZE]; | 1056 uint8_t buffer[IP_PACKET_SIZE]; |
| 1060 return packet.BuildExternalBuffer(buffer, max_payload_length_, &sender) && | 1057 return packet.BuildExternalBuffer(buffer, max_payload_length_, &sender) && |
| 1061 !sender.send_failure_; | 1058 !sender.send_failure_; |
| 1062 } | 1059 } |
| 1063 | 1060 |
| 1064 } // namespace webrtc | 1061 } // namespace webrtc |
| OLD | NEW |