Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: webrtc/modules/video_coding/utility/quality_scaler.cc

Issue 2652893015: Rename adaptation api methods, extended vie_encoder unit test. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/utility/quality_scaler.cc
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.cc b/webrtc/modules/video_coding/utility/quality_scaler.cc
index ba1d9789c783230b5cf48fad2699a723669ae411..5068fd84597742d16c394c78eb620fd538cef3fb 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.cc
+++ b/webrtc/modules/video_coding/utility/quality_scaler.cc
@@ -39,8 +39,8 @@ static const int kHighH264QpThreshold = 37;
// bitstream range of [0, 127] and not the user-level range of [0,63].
static const int kLowVp8QpThreshold = 29;
static const int kHighVp8QpThreshold = 95;
-const ScalingObserverInterface::ScaleReason scale_reason_ =
- ScalingObserverInterface::ScaleReason::kQuality;
+const AdaptationObserverInterface::AdaptReason scale_reason_ =
nisse-webrtc 2017/01/30 09:16:45 Would it make sense to rename member too, scale_re
sprang_webrtc 2017/01/30 09:55:05 This one was actually just used as an alias in two
nisse-webrtc 2017/01/30 10:07:13 Nice.
+ AdaptationObserverInterface::AdaptReason::kQuality;
static VideoEncoder::QpThresholds CodecTypeToDefaultThresholds(
VideoCodecType codec_type) {
@@ -91,16 +91,16 @@ class QualityScaler::CheckQPTask : public rtc::QueuedTask {
rtc::SequencedTaskChecker task_checker_;
};
-QualityScaler::QualityScaler(ScalingObserverInterface* observer,
+QualityScaler::QualityScaler(AdaptationObserverInterface* observer,
VideoCodecType codec_type)
: QualityScaler(observer, CodecTypeToDefaultThresholds(codec_type)) {}
-QualityScaler::QualityScaler(ScalingObserverInterface* observer,
+QualityScaler::QualityScaler(AdaptationObserverInterface* observer,
VideoEncoder::QpThresholds thresholds)
: QualityScaler(observer, thresholds, kMeasureMs) {}
// Protected ctor, should not be called directly.
-QualityScaler::QualityScaler(ScalingObserverInterface* observer,
+QualityScaler::QualityScaler(AdaptationObserverInterface* observer,
VideoEncoder::QpThresholds thresholds,
int64_t sampling_period)
: check_qp_task_(nullptr),
@@ -167,14 +167,14 @@ void QualityScaler::ReportQPLow() {
RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_);
LOG(LS_INFO) << "QP has been low, asking for higher resolution.";
ClearSamples();
- observer_->ScaleUp(scale_reason_);
+ observer_->AdaptUp(scale_reason_);
}
void QualityScaler::ReportQPHigh() {
RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_);
LOG(LS_INFO) << "QP has been high , asking for lower resolution.";
ClearSamples();
- observer_->ScaleDown(scale_reason_);
+ observer_->AdaptDown(scale_reason_);
// If we've scaled down, wait longer before scaling up again.
if (fast_rampup_) {
fast_rampup_ = false;

Powered by Google App Engine
This is Rietveld 408576698