| 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 #include "webrtc/modules/video_coding/jitter_buffer.h" | 10 #include "webrtc/modules/video_coding/jitter_buffer.h" |
| (...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 } else { | 1236 } else { |
| 1237 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", frame.TimeStamp(), | 1237 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", frame.TimeStamp(), |
| 1238 "DeltaComplete"); | 1238 "DeltaComplete"); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 // Update receive statistics. We count all layers, thus when you use layers | 1241 // Update receive statistics. We count all layers, thus when you use layers |
| 1242 // adding all key and delta frames might differ from frame count. | 1242 // adding all key and delta frames might differ from frame count. |
| 1243 if (frame.IsSessionComplete()) { | 1243 if (frame.IsSessionComplete()) { |
| 1244 if (frame.FrameType() == kVideoFrameKey) { | 1244 if (frame.FrameType() == kVideoFrameKey) { |
| 1245 ++receive_statistics_.key_frames; | 1245 ++receive_statistics_.key_frames; |
| 1246 if (receive_statistics_.key_frames == 1) { |
| 1247 LOG(LS_INFO) << "Received first complete key frame"; |
| 1248 } |
| 1246 } else { | 1249 } else { |
| 1247 ++receive_statistics_.delta_frames; | 1250 ++receive_statistics_.delta_frames; |
| 1248 } | 1251 } |
| 1252 |
| 1249 if (stats_callback_ != NULL) | 1253 if (stats_callback_ != NULL) |
| 1250 stats_callback_->OnFrameCountsUpdated(receive_statistics_); | 1254 stats_callback_->OnFrameCountsUpdated(receive_statistics_); |
| 1251 } | 1255 } |
| 1252 } | 1256 } |
| 1253 | 1257 |
| 1254 void VCMJitterBuffer::UpdateAveragePacketsPerFrame(int current_number_packets) { | 1258 void VCMJitterBuffer::UpdateAveragePacketsPerFrame(int current_number_packets) { |
| 1255 if (frame_counter_ > kFastConvergeThreshold) { | 1259 if (frame_counter_ > kFastConvergeThreshold) { |
| 1256 average_packets_per_frame_ = | 1260 average_packets_per_frame_ = |
| 1257 average_packets_per_frame_ * (1 - kNormalConvergeMultiplier) + | 1261 average_packets_per_frame_ * (1 - kNormalConvergeMultiplier) + |
| 1258 current_number_packets * kNormalConvergeMultiplier; | 1262 current_number_packets * kNormalConvergeMultiplier; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 } | 1341 } |
| 1338 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in | 1342 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in |
| 1339 // that case we don't wait for retransmissions. | 1343 // that case we don't wait for retransmissions. |
| 1340 if (high_rtt_nack_threshold_ms_ >= 0 && | 1344 if (high_rtt_nack_threshold_ms_ >= 0 && |
| 1341 rtt_ms_ >= high_rtt_nack_threshold_ms_) { | 1345 rtt_ms_ >= high_rtt_nack_threshold_ms_) { |
| 1342 return false; | 1346 return false; |
| 1343 } | 1347 } |
| 1344 return true; | 1348 return true; |
| 1345 } | 1349 } |
| 1346 } // namespace webrtc | 1350 } // namespace webrtc |
| OLD | NEW |