Chromium Code Reviews| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 669 initial_rampup_ = kMaxInitialFramedrop; | 669 initial_rampup_ = kMaxInitialFramedrop; |
| 670 | 670 |
| 671 int64_t now_ms = clock_->TimeInMilliseconds(); | 671 int64_t now_ms = clock_->TimeInMilliseconds(); |
| 672 if (pending_encoder_reconfiguration_) { | 672 if (pending_encoder_reconfiguration_) { |
| 673 ReconfigureEncoder(); | 673 ReconfigureEncoder(); |
| 674 } else if (!last_parameters_update_ms_ || | 674 } else if (!last_parameters_update_ms_ || |
| 675 now_ms - *last_parameters_update_ms_ >= | 675 now_ms - *last_parameters_update_ms_ >= |
| 676 vcm::VCMProcessTimer::kDefaultProcessIntervalMs) { | 676 vcm::VCMProcessTimer::kDefaultProcessIntervalMs) { |
| 677 video_sender_.UpdateChannelParemeters(rate_allocator_.get(), | 677 video_sender_.UpdateChannelParemeters(rate_allocator_.get(), |
| 678 bitrate_observer_); | 678 bitrate_observer_); |
| 679 last_parameters_update_ms_.emplace(now_ms); | |
| 679 } | 680 } |
|
stefan-webrtc
2017/04/05 15:06:48
I don't immediately understand what the problem wa
sprang_webrtc
2017/05/08 08:50:53
The intent for |last_parameters_update_ms_| is to
stefan-webrtc
2017/05/08 11:09:40
I don't know. Maybe it's good to be consistent? Ot
sprang_webrtc
2017/05/08 11:12:27
Alright, added update after ReconfigureEncoder() a
| |
| 680 last_parameters_update_ms_.emplace(now_ms); | |
| 681 | 681 |
| 682 if (EncoderPaused()) { | 682 if (EncoderPaused()) { |
| 683 TraceFrameDropStart(); | 683 TraceFrameDropStart(); |
| 684 return; | 684 return; |
| 685 } | 685 } |
| 686 TraceFrameDropEnd(); | 686 TraceFrameDropEnd(); |
| 687 | 687 |
| 688 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(), | 688 TRACE_EVENT_ASYNC_STEP0("webrtc", "Video", video_frame.render_time_ms(), |
| 689 "Encode"); | 689 "Encode"); |
| 690 | 690 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 971 void ViEEncoder::IncrementScaleCounter(int reason, int delta) { | 971 void ViEEncoder::IncrementScaleCounter(int reason, int delta) { |
| 972 // Get the counters and validate. This may also lazily initialize the state. | 972 // Get the counters and validate. This may also lazily initialize the state. |
| 973 const std::vector<int>& counter = GetScaleCounters(); | 973 const std::vector<int>& counter = GetScaleCounters(); |
| 974 if (delta < 0) { | 974 if (delta < 0) { |
| 975 RTC_DCHECK_GE(counter[reason], delta); | 975 RTC_DCHECK_GE(counter[reason], delta); |
| 976 } | 976 } |
| 977 scale_counters_[degradation_preference_][reason] += delta; | 977 scale_counters_[degradation_preference_][reason] += delta; |
| 978 } | 978 } |
| 979 | 979 |
| 980 } // namespace webrtc | 980 } // namespace webrtc |
| OLD | NEW |