| OLD | NEW |
| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 using FrameMap = std::map<FrameKey, FrameInfo>; | 124 using FrameMap = std::map<FrameKey, FrameInfo>; |
| 125 | 125 |
| 126 // Check that the references of |frame| are valid. | 126 // Check that the references of |frame| are valid. |
| 127 bool ValidReferences(const FrameObject& frame) const; | 127 bool ValidReferences(const FrameObject& frame) const; |
| 128 | 128 |
| 129 // Updates the minimal and maximal playout delays | 129 // Updates the minimal and maximal playout delays |
| 130 // depending on the frame. | 130 // depending on the frame. |
| 131 void UpdatePlayoutDelays(const FrameObject& frame) | 131 void UpdatePlayoutDelays(const FrameObject& frame) |
| 132 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 132 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 133 | 133 |
| 134 // Update all directly dependent and indirectly dependent frames and mark | 134 // Update all directly dependent and indirectly dependent frames and mark |
| 135 // them as continuous if all their references has been fulfilled. | 135 // them as continuous if all their references has been fulfilled. |
| 136 void PropagateContinuity(FrameMap::iterator start) | 136 void PropagateContinuity(FrameMap::iterator start) |
| 137 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 137 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 138 | 138 |
| 139 // Marks the frame as decoded and updates all directly dependent frames. | 139 // Marks the frame as decoded and updates all directly dependent frames. |
| 140 void PropagateDecodability(const FrameInfo& info) | 140 void PropagateDecodability(const FrameInfo& info) |
| 141 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 141 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 142 | 142 |
| 143 // Advances |last_decoded_frame_it_| to |decoded| and removes old | 143 // Advances |last_decoded_frame_it_| to |decoded| and removes old |
| 144 // frame info. | 144 // frame info. |
| 145 void AdvanceLastDecodedFrame(FrameMap::iterator decoded) | 145 void AdvanceLastDecodedFrame(FrameMap::iterator decoded) |
| 146 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 146 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 147 | 147 |
| 148 // Update the corresponding FrameInfo of |frame| and all FrameInfos that | 148 // Update the corresponding FrameInfo of |frame| and all FrameInfos that |
| 149 // |frame| references. | 149 // |frame| references. |
| 150 // Return false if |frame| will never be decodable, true otherwise. | 150 // Return false if |frame| will never be decodable, true otherwise. |
| 151 bool UpdateFrameInfoWithIncomingFrame(const FrameObject& frame, | 151 bool UpdateFrameInfoWithIncomingFrame(const FrameObject& frame, |
| 152 FrameMap::iterator info) | 152 FrameMap::iterator info) |
| 153 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 153 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 154 | 154 |
| 155 void UpdateJitterDelay() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 155 void UpdateJitterDelay() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 156 | 156 |
| 157 void UpdateTimingFrameInfo() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 157 void UpdateTimingFrameInfo() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 158 | 158 |
| 159 void ClearFramesAndHistory() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 159 void ClearFramesAndHistory() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 160 | 160 |
| 161 bool HasBadRenderTiming(const FrameObject& frame, int64_t now_ms) | 161 bool HasBadRenderTiming(const FrameObject& frame, int64_t now_ms) |
| 162 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 162 RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 163 | 163 |
| 164 FrameMap frames_ GUARDED_BY(crit_); | 164 FrameMap frames_ RTC_GUARDED_BY(crit_); |
| 165 | 165 |
| 166 rtc::CriticalSection crit_; | 166 rtc::CriticalSection crit_; |
| 167 Clock* const clock_; | 167 Clock* const clock_; |
| 168 rtc::Event new_continuous_frame_event_; | 168 rtc::Event new_continuous_frame_event_; |
| 169 VCMJitterEstimator* const jitter_estimator_ GUARDED_BY(crit_); | 169 VCMJitterEstimator* const jitter_estimator_ RTC_GUARDED_BY(crit_); |
| 170 VCMTiming* const timing_ GUARDED_BY(crit_); | 170 VCMTiming* const timing_ RTC_GUARDED_BY(crit_); |
| 171 VCMInterFrameDelay inter_frame_delay_ GUARDED_BY(crit_); | 171 VCMInterFrameDelay inter_frame_delay_ RTC_GUARDED_BY(crit_); |
| 172 uint32_t last_decoded_frame_timestamp_ GUARDED_BY(crit_); | 172 uint32_t last_decoded_frame_timestamp_ RTC_GUARDED_BY(crit_); |
| 173 FrameMap::iterator last_decoded_frame_it_ GUARDED_BY(crit_); | 173 FrameMap::iterator last_decoded_frame_it_ RTC_GUARDED_BY(crit_); |
| 174 FrameMap::iterator last_continuous_frame_it_ GUARDED_BY(crit_); | 174 FrameMap::iterator last_continuous_frame_it_ RTC_GUARDED_BY(crit_); |
| 175 FrameMap::iterator next_frame_it_ GUARDED_BY(crit_); | 175 FrameMap::iterator next_frame_it_ RTC_GUARDED_BY(crit_); |
| 176 int num_frames_history_ GUARDED_BY(crit_); | 176 int num_frames_history_ RTC_GUARDED_BY(crit_); |
| 177 int num_frames_buffered_ GUARDED_BY(crit_); | 177 int num_frames_buffered_ RTC_GUARDED_BY(crit_); |
| 178 bool stopped_ GUARDED_BY(crit_); | 178 bool stopped_ RTC_GUARDED_BY(crit_); |
| 179 VCMVideoProtection protection_mode_ GUARDED_BY(crit_); | 179 VCMVideoProtection protection_mode_ RTC_GUARDED_BY(crit_); |
| 180 VCMReceiveStatisticsCallback* const stats_callback_; | 180 VCMReceiveStatisticsCallback* const stats_callback_; |
| 181 int64_t last_log_non_decoded_ms_ GUARDED_BY(crit_); | 181 int64_t last_log_non_decoded_ms_ RTC_GUARDED_BY(crit_); |
| 182 | 182 |
| 183 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer); | 183 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer); |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 } // namespace video_coding | 186 } // namespace video_coding |
| 187 } // namespace webrtc | 187 } // namespace webrtc |
| 188 | 188 |
| 189 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_ | 189 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_BUFFER2_H_ |
| OLD | NEW |