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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 rtc::CritScope lock(&crit_); | 113 rtc::CritScope lock(&crit_); |
114 if (next_frame_it != frames_.end()) { | 114 if (next_frame_it != frames_.end()) { |
115 std::unique_ptr<FrameObject> frame = std::move(next_frame_it->second.frame); | 115 std::unique_ptr<FrameObject> frame = std::move(next_frame_it->second.frame); |
116 int64_t received_time = frame->ReceivedTime(); | 116 int64_t received_time = frame->ReceivedTime(); |
117 uint32_t timestamp = frame->Timestamp(); | 117 uint32_t timestamp = frame->Timestamp(); |
118 | 118 |
119 int64_t frame_delay; | 119 int64_t frame_delay; |
120 if (inter_frame_delay_.CalculateDelay(timestamp, &frame_delay, | 120 if (inter_frame_delay_.CalculateDelay(timestamp, &frame_delay, |
121 received_time)) { | 121 received_time)) { |
122 jitter_estimator_->UpdateEstimate(frame_delay, frame->size); | 122 jitter_estimator_->UpdateEstimate(frame_delay, frame->size()); |
123 } | 123 } |
124 float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0; | 124 float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0; |
125 timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult)); | 125 timing_->SetJitterDelay(jitter_estimator_->GetJitterEstimate(rtt_mult)); |
126 timing_->UpdateCurrentDelay(frame->RenderTime(), | 126 timing_->UpdateCurrentDelay(frame->RenderTime(), |
127 clock_->TimeInMilliseconds()); | 127 clock_->TimeInMilliseconds()); |
128 | 128 |
129 PropagateDecodability(next_frame_it->second); | 129 PropagateDecodability(next_frame_it->second); |
130 AdvanceLastDecodedFrame(next_frame_it); | 130 AdvanceLastDecodedFrame(next_frame_it); |
131 *frame_out = std::move(frame); | 131 *frame_out = std::move(frame); |
132 return kFrameFound; | 132 return kFrameFound; |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 } | 348 } |
349 | 349 |
350 RTC_DCHECK_LE(info->second.num_missing_continuous, | 350 RTC_DCHECK_LE(info->second.num_missing_continuous, |
351 info->second.num_missing_decodable); | 351 info->second.num_missing_decodable); |
352 | 352 |
353 return true; | 353 return true; |
354 } | 354 } |
355 | 355 |
356 } // namespace video_coding | 356 } // namespace video_coding |
357 } // namespace webrtc | 357 } // namespace webrtc |
OLD | NEW |