| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 VCMFrameBufferEnum GetFrame(const VCMPacket& packet, | 203 VCMFrameBufferEnum GetFrame(const VCMPacket& packet, |
| 204 VCMFrameBuffer** frame, | 204 VCMFrameBuffer** frame, |
| 205 FrameList** frame_list) | 205 FrameList** frame_list) |
| 206 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 206 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 207 | 207 |
| 208 // Returns true if |frame| is continuous in |decoding_state|, not taking | 208 // Returns true if |frame| is continuous in |decoding_state|, not taking |
| 209 // decodable frames into account. | 209 // decodable frames into account. |
| 210 bool IsContinuousInState(const VCMFrameBuffer& frame, | 210 bool IsContinuousInState(const VCMFrameBuffer& frame, |
| 211 const VCMDecodingState& decoding_state) const | 211 const VCMDecodingState& decoding_state) const |
| 212 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 212 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 213 // Returns true if |frame| is continuous in |decoding_state|, not taking |
| 214 // decodable frames into account and ignoring the |decode_error_mode|. |
| 215 bool IsContinuousInStateForDecoding( |
| 216 const VCMFrameBuffer& frame, const VCMDecodingState& decoding_state) const |
| 217 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 213 // Returns true if |frame| is continuous in the |last_decoded_state_|, taking | 218 // Returns true if |frame| is continuous in the |last_decoded_state_|, taking |
| 214 // all decodable frames into account. | 219 // all decodable frames into account. |
| 215 bool IsContinuous(const VCMFrameBuffer& frame) const | 220 bool IsContinuous(const VCMFrameBuffer& frame) const |
| 216 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 221 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 222 // Returns true if |frame| is continuous in the |last_decoded_state_|, taking |
| 223 // all decodable frames into account and ignoring the |decode_error_mode|. |
| 224 bool IsContinuousForDecoding(const VCMFrameBuffer& frame) const |
| 225 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 217 // Looks for frames in |incomplete_frames_| which are continuous in the | 226 // Looks for frames in |incomplete_frames_| which are continuous in the |
| 218 // provided |decoded_state|. Starts the search from the timestamp of | 227 // provided |decoded_state|. Starts the search from the timestamp of |
| 219 // |decoded_state|. | 228 // |decoded_state|. |
| 220 void FindAndInsertContinuousFramesWithState( | 229 void FindAndInsertContinuousFramesWithState( |
| 221 const VCMDecodingState& decoded_state) | 230 const VCMDecodingState& decoded_state) |
| 222 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 231 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
| 223 // Looks for frames in |incomplete_frames_| which are continuous in | 232 // Looks for frames in |incomplete_frames_| which are continuous in |
| 224 // |last_decoded_state_| taking all decodable frames into account. Starts | 233 // |last_decoded_state_| taking all decodable frames into account. Starts |
| 225 // the search from |new_frame|. | 234 // the search from |new_frame|. |
| 226 void FindAndInsertContinuousFrames(const VCMFrameBuffer& new_frame) | 235 void FindAndInsertContinuousFrames(const VCMFrameBuffer& new_frame) |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // Number of frames in a row that have been too old. | 334 // Number of frames in a row that have been too old. |
| 326 int num_consecutive_old_frames_; | 335 int num_consecutive_old_frames_; |
| 327 // Number of packets in a row that have been too old. | 336 // Number of packets in a row that have been too old. |
| 328 int num_consecutive_old_packets_; | 337 int num_consecutive_old_packets_; |
| 329 // Number of packets received. | 338 // Number of packets received. |
| 330 int num_packets_ GUARDED_BY(crit_sect_); | 339 int num_packets_ GUARDED_BY(crit_sect_); |
| 331 // Number of duplicated packets received. | 340 // Number of duplicated packets received. |
| 332 int num_duplicated_packets_ GUARDED_BY(crit_sect_); | 341 int num_duplicated_packets_ GUARDED_BY(crit_sect_); |
| 333 // Number of packets discarded by the jitter buffer. | 342 // Number of packets discarded by the jitter buffer. |
| 334 int num_discarded_packets_ GUARDED_BY(crit_sect_); | 343 int num_discarded_packets_ GUARDED_BY(crit_sect_); |
| 344 // Time when last decodable frame was received. |
| 345 int64_t time_last_decodable_frame_ GUARDED_BY(crit_sect_); |
| 335 // Time when first packet is received. | 346 // Time when first packet is received. |
| 336 int64_t time_first_packet_ms_ GUARDED_BY(crit_sect_); | 347 int64_t time_first_packet_ms_ GUARDED_BY(crit_sect_); |
| 337 | 348 |
| 338 // Jitter estimation. | 349 // Jitter estimation. |
| 339 // Filter for estimating jitter. | 350 // Filter for estimating jitter. |
| 340 VCMJitterEstimator jitter_estimate_; | 351 VCMJitterEstimator jitter_estimate_; |
| 341 // Calculates network delays used for jitter calculations. | 352 // Calculates network delays used for jitter calculations. |
| 342 VCMInterFrameDelay inter_frame_delay_; | 353 VCMInterFrameDelay inter_frame_delay_; |
| 343 VCMJitterSample waiting_for_completion_; | 354 VCMJitterSample waiting_for_completion_; |
| 344 int64_t rtt_ms_; | 355 int64_t rtt_ms_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 358 // Estimated rolling average of packets per frame | 369 // Estimated rolling average of packets per frame |
| 359 float average_packets_per_frame_; | 370 float average_packets_per_frame_; |
| 360 // average_packets_per_frame converges fast if we have fewer than this many | 371 // average_packets_per_frame converges fast if we have fewer than this many |
| 361 // frames. | 372 // frames. |
| 362 int frame_counter_; | 373 int frame_counter_; |
| 363 DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer); | 374 DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer); |
| 364 }; | 375 }; |
| 365 } // namespace webrtc | 376 } // namespace webrtc |
| 366 | 377 |
| 367 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_JITTER_BUFFER_H_ | 378 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_JITTER_BUFFER_H_ |
| OLD | NEW |