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

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

Issue 1250203002: Add encode and decode time to histograms stats: (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: added todo Created 5 years, 5 months 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/send_statistics_proxy.cc ('k') | no next file » | 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) 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 captured_frame_.Reset(); 140 captured_frame_.Reset();
141 } 141 }
142 } 142 }
143 if (!deliver_frame.IsZeroSize()) { 143 if (!deliver_frame.IsZeroSize()) {
144 capture_time = deliver_frame.render_time_ms(); 144 capture_time = deliver_frame.render_time_ms();
145 encode_start_time = Clock::GetRealTimeClock()->TimeInMilliseconds(); 145 encode_start_time = Clock::GetRealTimeClock()->TimeInMilliseconds();
146 frame_callback_->DeliverFrame(deliver_frame); 146 frame_callback_->DeliverFrame(deliver_frame);
147 } 147 }
148 // Update the overuse detector with the duration. 148 // Update the overuse detector with the duration.
149 if (encode_start_time != -1) { 149 if (encode_start_time != -1) {
150 overuse_detector_->FrameEncoded( 150 int encode_time_ms = static_cast<int>(
151 Clock::GetRealTimeClock()->TimeInMilliseconds() - encode_start_time); 151 Clock::GetRealTimeClock()->TimeInMilliseconds() - encode_start_time);
152 overuse_detector_->FrameEncoded(encode_time_ms);
153 stats_proxy_->OnEncodedFrame(encode_time_ms);
152 } 154 }
153 } 155 }
154 // We're done! 156 // We're done!
155 if (capture_time != -1) { 157 if (capture_time != -1) {
156 overuse_detector_->FrameSent(capture_time); 158 overuse_detector_->FrameSent(capture_time);
157 } 159 }
158 return true; 160 return true;
159 } 161 }
160 162
161 } // namespace internal 163 } // namespace internal
162 } // namespace webrtc 164 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/send_statistics_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698