OLD | NEW |
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // |decoded_state|. | 219 // |decoded_state|. |
220 void FindAndInsertContinuousFramesWithState( | 220 void FindAndInsertContinuousFramesWithState( |
221 const VCMDecodingState& decoded_state) | 221 const VCMDecodingState& decoded_state) |
222 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 222 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
223 // Looks for frames in |incomplete_frames_| which are continuous in | 223 // Looks for frames in |incomplete_frames_| which are continuous in |
224 // |last_decoded_state_| taking all decodable frames into account. Starts | 224 // |last_decoded_state_| taking all decodable frames into account. Starts |
225 // the search from |new_frame|. | 225 // the search from |new_frame|. |
226 void FindAndInsertContinuousFrames(const VCMFrameBuffer& new_frame) | 226 void FindAndInsertContinuousFrames(const VCMFrameBuffer& new_frame) |
227 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 227 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
228 VCMFrameBuffer* NextFrame() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 228 VCMFrameBuffer* NextFrame() const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
229 // Returns true if the NACK list was updated to cover sequence numbers up to | 229 // Returns true if sequence numbers are covered up to |sequence_number|. The |
230 // |sequence_number|. If false a key frame is needed to get into a state where | 230 // NACK list will be used to handle missing packets if enabled. |
231 // we can continue decoding. | 231 // Returns false if a key frame is needed to get into a state where we can |
232 bool UpdateNackList(uint16_t sequence_number) | 232 // continue decoding. Without NACK this is always the case if packets are |
| 233 // missing. |
| 234 bool CoverSequenceUpTo(uint16_t sequence_number) |
233 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 235 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
234 bool TooLargeNackList() const; | 236 bool TooLargeNackList() const; |
235 // Returns true if the NACK list was reduced without problem. If false a key | 237 // Returns true if the NACK list was reduced without problem. If false a key |
236 // frame is needed to get into a state where we can continue decoding. | 238 // frame is needed to get into a state where we can continue decoding. |
237 bool HandleTooLargeNackList() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 239 bool HandleTooLargeNackList() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
238 bool MissingTooOldPacket(uint16_t latest_sequence_number) const | 240 bool MissingTooOldPacket(uint16_t latest_sequence_number) const |
239 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 241 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
240 // Returns true if the too old packets was successfully removed from the NACK | 242 // Returns true if the too old packets was successfully removed from the NACK |
241 // list. If false, a key frame is needed to get into a state where we can | 243 // list. If false, a key frame is needed to get into a state where we can |
242 // continue decoding. | 244 // continue decoding. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // Estimated rolling average of packets per frame | 356 // Estimated rolling average of packets per frame |
355 float average_packets_per_frame_; | 357 float average_packets_per_frame_; |
356 // average_packets_per_frame converges fast if we have fewer than this many | 358 // average_packets_per_frame converges fast if we have fewer than this many |
357 // frames. | 359 // frames. |
358 int frame_counter_; | 360 int frame_counter_; |
359 DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer); | 361 DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer); |
360 }; | 362 }; |
361 } // namespace webrtc | 363 } // namespace webrtc |
362 | 364 |
363 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_JITTER_BUFFER_H_ | 365 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_JITTER_BUFFER_H_ |
OLD | NEW |