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

Unified Diff: webrtc/video/video_encoder.cc

Issue 2489843002: Revert of Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/video_encoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_encoder.cc
diff --git a/webrtc/video/video_encoder.cc b/webrtc/video/video_encoder.cc
index dbfd0eb8db022670664dca4fef0055a240324848..bb6e9e23082ae0b93a6adaefa5bf6dc28f262658 100644
--- a/webrtc/video/video_encoder.cc
+++ b/webrtc/video/video_encoder.cc
@@ -67,13 +67,8 @@
VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper(
VideoCodecType codec_type,
webrtc::VideoEncoder* encoder)
- : number_of_cores_(0),
- max_payload_size_(0),
- rates_set_(false),
- framerate_(0),
+ : rates_set_(false),
channel_parameters_set_(false),
- packet_loss_(0),
- rtt_(0),
encoder_type_(CodecToEncoderType(codec_type)),
encoder_(encoder),
callback_(nullptr) {}
@@ -97,7 +92,7 @@
if (callback_)
fallback_encoder_->RegisterEncodeCompleteCallback(callback_);
if (rates_set_)
- fallback_encoder_->SetRateAllocation(bitrate_allocation_, framerate_);
+ fallback_encoder_->SetRates(bitrate_, framerate_);
if (channel_parameters_set_)
fallback_encoder_->SetChannelParameters(packet_loss_, rtt_);
@@ -194,15 +189,14 @@
return ret;
}
-int32_t VideoEncoderSoftwareFallbackWrapper::SetRateAllocation(
- const BitrateAllocation& bitrate_allocation,
- uint32_t framerate) {
+int32_t VideoEncoderSoftwareFallbackWrapper::SetRates(uint32_t bitrate,
+ uint32_t framerate) {
rates_set_ = true;
- bitrate_allocation_ = bitrate_allocation;
+ bitrate_ = bitrate;
framerate_ = framerate;
- int32_t ret = encoder_->SetRateAllocation(bitrate_allocation_, framerate);
- if (fallback_encoder_)
- return fallback_encoder_->SetRateAllocation(bitrate_allocation_, framerate);
+ int32_t ret = encoder_->SetRates(bitrate, framerate);
+ if (fallback_encoder_)
+ return fallback_encoder_->SetRates(bitrate, framerate);
return ret;
}
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/video_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698