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

Side by Side Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1406903002: Expose codec implementation names in stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix 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
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { 73 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
74 rtc::CritScope lock(&crit_); 74 rtc::CritScope lock(&crit_);
75 return stats_; 75 return stats_;
76 } 76 }
77 77
78 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) { 78 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) {
79 rtc::CritScope lock(&crit_); 79 rtc::CritScope lock(&crit_);
80 stats_.current_payload_type = payload_type; 80 stats_.current_payload_type = payload_type;
81 } 81 }
82 82
83 void ReceiveStatisticsProxy::OnDecoderImplementationName(
84 const char* implementation_name) {
85 rtc::CritScope lock(&crit_);
86 stats_.decoder_implementation_name = implementation_name;
87 }
83 void ReceiveStatisticsProxy::OnIncomingRate(unsigned int framerate, 88 void ReceiveStatisticsProxy::OnIncomingRate(unsigned int framerate,
84 unsigned int bitrate_bps) { 89 unsigned int bitrate_bps) {
85 rtc::CritScope lock(&crit_); 90 rtc::CritScope lock(&crit_);
86 stats_.network_frame_rate = framerate; 91 stats_.network_frame_rate = framerate;
87 stats_.total_bitrate_bps = bitrate_bps; 92 stats_.total_bitrate_bps = bitrate_bps;
88 } 93 }
89 94
90 void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms, 95 void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms,
91 int max_decode_ms, 96 int max_decode_ms,
92 int current_delay_ms, 97 int current_delay_ms,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 ++num_samples; 206 ++num_samples;
202 } 207 }
203 208
204 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { 209 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const {
205 if (num_samples < min_required_samples || num_samples == 0) 210 if (num_samples < min_required_samples || num_samples == 0)
206 return -1; 211 return -1;
207 return sum / num_samples; 212 return sum / num_samples;
208 } 213 }
209 214
210 } // namespace webrtc 215 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698