| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2015 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 62 } | 62 } | 
| 63 | 63 | 
| 64 void PacketLossStats::ComputeLossCounts( | 64 void PacketLossStats::ComputeLossCounts( | 
| 65     int* out_single_loss_count, | 65     int* out_single_loss_count, | 
| 66     int* out_multiple_loss_event_count, | 66     int* out_multiple_loss_event_count, | 
| 67     int* out_multiple_loss_packet_count) const { | 67     int* out_multiple_loss_packet_count) const { | 
| 68   *out_single_loss_count = single_loss_historic_count_; | 68   *out_single_loss_count = single_loss_historic_count_; | 
| 69   *out_multiple_loss_event_count = multiple_loss_historic_event_count_; | 69   *out_multiple_loss_event_count = multiple_loss_historic_event_count_; | 
| 70   *out_multiple_loss_packet_count = multiple_loss_historic_packet_count_; | 70   *out_multiple_loss_packet_count = multiple_loss_historic_packet_count_; | 
| 71   if (lost_packets_buffer_.empty()) { | 71   if (lost_packets_buffer_.empty()) { | 
| 72     DCHECK(lost_packets_wrapped_buffer_.empty()); | 72     RTC_DCHECK(lost_packets_wrapped_buffer_.empty()); | 
| 73     return; | 73     return; | 
| 74   } | 74   } | 
| 75   uint16_t last_num = 0; | 75   uint16_t last_num = 0; | 
| 76   int sequential_count = 0; | 76   int sequential_count = 0; | 
| 77   std::vector<const std::set<uint16_t>*> buffers; | 77   std::vector<const std::set<uint16_t>*> buffers; | 
| 78   buffers.push_back(&lost_packets_buffer_); | 78   buffers.push_back(&lost_packets_buffer_); | 
| 79   buffers.push_back(&lost_packets_wrapped_buffer_); | 79   buffers.push_back(&lost_packets_wrapped_buffer_); | 
| 80   for (auto buffer : buffers) { | 80   for (auto buffer : buffers) { | 
| 81     for (auto it = buffer->begin(); it != buffer->end(); ++it) { | 81     for (auto it = buffer->begin(); it != buffer->end(); ++it) { | 
| 82       uint16_t current_num = *it; | 82       uint16_t current_num = *it; | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 128   } | 128   } | 
| 129   // Continue pruning if the wrapped buffer is beyond a threshold and there are | 129   // Continue pruning if the wrapped buffer is beyond a threshold and there are | 
| 130   // things left in the pre-wrapped buffer. | 130   // things left in the pre-wrapped buffer. | 
| 131   if (!lost_packets_wrapped_buffer_.empty() && | 131   if (!lost_packets_wrapped_buffer_.empty() && | 
| 132       *(lost_packets_wrapped_buffer_.rbegin()) > 0x4000) { | 132       *(lost_packets_wrapped_buffer_.rbegin()) > 0x4000) { | 
| 133     PruneBuffer(); | 133     PruneBuffer(); | 
| 134   } | 134   } | 
| 135 } | 135 } | 
| 136 | 136 | 
| 137 }  // namespace webrtc | 137 }  // namespace webrtc | 
| OLD | NEW | 
|---|