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

Unified Diff: webrtc/api/android/jni/androidmediaencoder_jni.cc

Issue 2510583002: Reland #2 of Issue 2434073003: Extract bitrate allocation ... (Closed)
Patch Set: Addressed comments 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 | « no previous file | webrtc/call/call_perf_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/android/jni/androidmediaencoder_jni.cc
diff --git a/webrtc/api/android/jni/androidmediaencoder_jni.cc b/webrtc/api/android/jni/androidmediaencoder_jni.cc
index a4daa7a5391efde89045c566a3b8b36399701cbc..177cd9bfb9b7ed69ccbe51ede545cc94fc104037 100644
--- a/webrtc/api/android/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/android/jni/androidmediaencoder_jni.cc
@@ -112,7 +112,8 @@ class MediaCodecVideoEncoder : public webrtc::VideoEncoder,
int32_t Release() override;
int32_t SetChannelParameters(uint32_t /* packet_loss */,
int64_t /* rtt */) override;
- int32_t SetRates(uint32_t new_bit_rate, uint32_t frame_rate) override;
+ int32_t SetRateAllocation(const webrtc::BitrateAllocation& rate_allocation,
+ uint32_t frame_rate) override;
// rtc::MessageHandler implementation.
void OnMessage(rtc::Message* msg) override;
@@ -465,11 +466,12 @@ int32_t MediaCodecVideoEncoder::SetChannelParameters(uint32_t /* packet_loss */,
return WEBRTC_VIDEO_CODEC_OK;
}
-int32_t MediaCodecVideoEncoder::SetRates(uint32_t new_bit_rate,
- uint32_t frame_rate) {
+int32_t MediaCodecVideoEncoder::SetRateAllocation(
+ const webrtc::BitrateAllocation& rate_allocation,
+ uint32_t frame_rate) {
return codec_thread_->Invoke<int32_t>(
RTC_FROM_HERE, Bind(&MediaCodecVideoEncoder::SetRatesOnCodecThread, this,
- new_bit_rate, frame_rate));
+ rate_allocation.get_sum_kbps(), frame_rate));
}
void MediaCodecVideoEncoder::OnMessage(rtc::Message* msg) {
« no previous file with comments | « no previous file | webrtc/call/call_perf_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698