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

Side by Side Diff: webrtc/modules/video_coding/frame_buffer2.h

Issue 2534093003: Calculate JitterBufferDelayInMs in the new jitter buffer. (Closed)
Patch Set: Feedback fix. Created 4 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 | « no previous file | webrtc/modules/video_coding/frame_buffer2.cc » ('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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void AdvanceLastDecodedFrame(FrameMap::iterator decoded) 132 void AdvanceLastDecodedFrame(FrameMap::iterator decoded)
133 EXCLUSIVE_LOCKS_REQUIRED(crit_); 133 EXCLUSIVE_LOCKS_REQUIRED(crit_);
134 134
135 // Update the corresponding FrameInfo of |frame| and all FrameInfos that 135 // Update the corresponding FrameInfo of |frame| and all FrameInfos that
136 // |frame| references. 136 // |frame| references.
137 // Return false if |frame| will never be decodable, true otherwise. 137 // Return false if |frame| will never be decodable, true otherwise.
138 bool UpdateFrameInfoWithIncomingFrame(const FrameObject& frame, 138 bool UpdateFrameInfoWithIncomingFrame(const FrameObject& frame,
139 FrameMap::iterator info) 139 FrameMap::iterator info)
140 EXCLUSIVE_LOCKS_REQUIRED(crit_); 140 EXCLUSIVE_LOCKS_REQUIRED(crit_);
141 141
142 void UpdateJitterDelay() EXCLUSIVE_LOCKS_REQUIRED(crit_);
143
142 void UpdateHistograms() const; 144 void UpdateHistograms() const;
143 145
144 FrameMap frames_ GUARDED_BY(crit_); 146 FrameMap frames_ GUARDED_BY(crit_);
145 147
146 rtc::CriticalSection crit_; 148 rtc::CriticalSection crit_;
147 Clock* const clock_; 149 Clock* const clock_;
148 rtc::Event new_countinuous_frame_event_; 150 rtc::Event new_countinuous_frame_event_;
149 VCMJitterEstimator* const jitter_estimator_ GUARDED_BY(crit_); 151 VCMJitterEstimator* const jitter_estimator_ GUARDED_BY(crit_);
150 VCMTiming* const timing_ GUARDED_BY(crit_); 152 VCMTiming* const timing_ GUARDED_BY(crit_);
151 VCMInterFrameDelay inter_frame_delay_ GUARDED_BY(crit_); 153 VCMInterFrameDelay inter_frame_delay_ GUARDED_BY(crit_);
152 FrameMap::iterator last_decoded_frame_it_ GUARDED_BY(crit_); 154 FrameMap::iterator last_decoded_frame_it_ GUARDED_BY(crit_);
153 FrameMap::iterator last_continuous_frame_it_ GUARDED_BY(crit_); 155 FrameMap::iterator last_continuous_frame_it_ GUARDED_BY(crit_);
154 int num_frames_history_ GUARDED_BY(crit_); 156 int num_frames_history_ GUARDED_BY(crit_);
155 int num_frames_buffered_ GUARDED_BY(crit_); 157 int num_frames_buffered_ GUARDED_BY(crit_);
156 bool stopped_ GUARDED_BY(crit_); 158 bool stopped_ GUARDED_BY(crit_);
157 VCMVideoProtection protection_mode_ GUARDED_BY(crit_); 159 VCMVideoProtection protection_mode_ GUARDED_BY(crit_);
158 int num_total_frames_ GUARDED_BY(crit_);
159 int num_key_frames_ GUARDED_BY(crit_);
160 160
161 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer); 161 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
162
163 // For WebRTC.Video.JitterBufferDelayInMs metric.
164 int64_t accumulated_delay_ = 0;
165 int64_t accumulated_delay_samples_ = 0;
166
167 // For WebRTC.Video.KeyFramesReceivedInPermille metric.
168 int64_t num_total_frames_ = 0;
169 int64_t num_key_frames_ = 0;
162 }; 170 };
163 171
164 } // namespace video_coding 172 } // namespace video_coding
165 } // namespace webrtc 173 } // namespace webrtc
166 174
167 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_ 175 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_buffer2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698