| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2013 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   96   rtc::CritScope lock(&crit_); |   96   rtc::CritScope lock(&crit_); | 
|   97   if (stats_.ssrc != ssrc) |   97   if (stats_.ssrc != ssrc) | 
|   98     return; |   98     return; | 
|   99   stats_.rtcp_packet_type_counts = packet_counter; |   99   stats_.rtcp_packet_type_counts = packet_counter; | 
|  100 } |  100 } | 
|  101  |  101  | 
|  102 void ReceiveStatisticsProxy::StatisticsUpdated( |  102 void ReceiveStatisticsProxy::StatisticsUpdated( | 
|  103     const webrtc::RtcpStatistics& statistics, |  103     const webrtc::RtcpStatistics& statistics, | 
|  104     uint32_t ssrc) { |  104     uint32_t ssrc) { | 
|  105   rtc::CritScope lock(&crit_); |  105   rtc::CritScope lock(&crit_); | 
|  106   // TODO(pbos): Handle both local and remote ssrcs here and DCHECK that we |  106   // TODO(pbos): Handle both local and remote ssrcs here and RTC_DCHECK that we | 
|  107   // receive stats from one of them. |  107   // receive stats from one of them. | 
|  108   if (stats_.ssrc != ssrc) |  108   if (stats_.ssrc != ssrc) | 
|  109     return; |  109     return; | 
|  110   stats_.rtcp_stats = statistics; |  110   stats_.rtcp_stats = statistics; | 
|  111   report_block_stats_.Store(statistics, ssrc, 0); |  111   report_block_stats_.Store(statistics, ssrc, 0); | 
|  112 } |  112 } | 
|  113  |  113  | 
|  114 void ReceiveStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) { |  114 void ReceiveStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) { | 
|  115   rtc::CritScope lock(&crit_); |  115   rtc::CritScope lock(&crit_); | 
|  116   // TODO(pbos): Handle both local and remote ssrcs here and DCHECK that we |  116   // TODO(pbos): Handle both local and remote ssrcs here and RTC_DCHECK that we | 
|  117   // receive stats from one of them. |  117   // receive stats from one of them. | 
|  118   if (stats_.ssrc != ssrc) |  118   if (stats_.ssrc != ssrc) | 
|  119     return; |  119     return; | 
|  120   stats_.c_name = cname; |  120   stats_.c_name = cname; | 
|  121 } |  121 } | 
|  122  |  122  | 
|  123 void ReceiveStatisticsProxy::DataCountersUpdated( |  123 void ReceiveStatisticsProxy::DataCountersUpdated( | 
|  124     const webrtc::StreamDataCounters& counters, |  124     const webrtc::StreamDataCounters& counters, | 
|  125     uint32_t ssrc) { |  125     uint32_t ssrc) { | 
|  126   rtc::CritScope lock(&crit_); |  126   rtc::CritScope lock(&crit_); | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  168   ++num_samples; |  168   ++num_samples; | 
|  169 } |  169 } | 
|  170  |  170  | 
|  171 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { |  171 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { | 
|  172   if (num_samples < min_required_samples || num_samples == 0) |  172   if (num_samples < min_required_samples || num_samples == 0) | 
|  173     return -1; |  173     return -1; | 
|  174   return sum / num_samples; |  174   return sum / num_samples; | 
|  175 } |  175 } | 
|  176  |  176  | 
|  177 }  // namespace webrtc |  177 }  // namespace webrtc | 
| OLD | NEW |