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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 if (degradation_preference_allows_scaling && scaling_settings.enabled) { | 465 if (degradation_preference_allows_scaling && scaling_settings.enabled) { |
466 // Drop frames and scale down until desired quality is achieved. | 466 // Drop frames and scale down until desired quality is achieved. |
467 if (scaling_settings.thresholds) { | 467 if (scaling_settings.thresholds) { |
468 quality_scaler_.reset( | 468 quality_scaler_.reset( |
469 new QualityScaler(this, *(scaling_settings.thresholds))); | 469 new QualityScaler(this, *(scaling_settings.thresholds))); |
470 } else { | 470 } else { |
471 quality_scaler_.reset(new QualityScaler(this, codec_type_)); | 471 quality_scaler_.reset(new QualityScaler(this, codec_type_)); |
472 } | 472 } |
473 } else { | 473 } else { |
474 quality_scaler_.reset(nullptr); | 474 quality_scaler_.reset(nullptr); |
| 475 initial_rampup_ = kMaxInitialFramedrop; |
475 } | 476 } |
476 stats_proxy_->SetResolutionRestrictionStats( | 477 stats_proxy_->SetResolutionRestrictionStats( |
477 degradation_preference_allows_scaling, scale_counter_[kCpu] > 0, | 478 degradation_preference_allows_scaling, scale_counter_[kCpu] > 0, |
478 scale_counter_[kQuality]); | 479 scale_counter_[kQuality]); |
479 } | 480 } |
480 | 481 |
481 void ViEEncoder::OnFrame(const VideoFrame& video_frame) { | 482 void ViEEncoder::OnFrame(const VideoFrame& video_frame) { |
482 RTC_DCHECK_RUNS_SERIALIZED(&incoming_frame_race_checker_); | 483 RTC_DCHECK_RUNS_SERIALIZED(&incoming_frame_race_checker_); |
483 VideoFrame incoming_frame = video_frame; | 484 VideoFrame incoming_frame = video_frame; |
484 | 485 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 --scale_counter_[reason]; | 800 --scale_counter_[reason]; |
800 source_proxy_->RequestHigherResolutionThan(current_pixel_count); | 801 source_proxy_->RequestHigherResolutionThan(current_pixel_count); |
801 LOG(LS_INFO) << "Scaling up resolution."; | 802 LOG(LS_INFO) << "Scaling up resolution."; |
802 for (size_t i = 0; i < kScaleReasonSize; ++i) { | 803 for (size_t i = 0; i < kScaleReasonSize; ++i) { |
803 LOG(LS_INFO) << "Scaled " << scale_counter_[i] | 804 LOG(LS_INFO) << "Scaled " << scale_counter_[i] |
804 << " times for reason: " << (i ? "cpu" : "quality"); | 805 << " times for reason: " << (i ? "cpu" : "quality"); |
805 } | 806 } |
806 } | 807 } |
807 | 808 |
808 } // namespace webrtc | 809 } // namespace webrtc |
OLD | NEW |