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

Unified Diff: webrtc/video_encoder.h

Issue 2434073003: Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Updated tl listener registration. Fixed tests. Created 4 years, 2 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
« webrtc/video/vie_encoder.cc ('K') | « webrtc/video/vie_encoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_encoder.h
diff --git a/webrtc/video_encoder.h b/webrtc/video_encoder.h
index d28533b9fd062f23c12cf1ff10f984b501f90259..0526d1a241a96f1a3c232f0b6e1ecb7caf01acb1 100644
--- a/webrtc/video_encoder.h
+++ b/webrtc/video_encoder.h
@@ -163,6 +163,12 @@ class VideoEncoder {
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0;
perkj_webrtc 2016/10/21 08:24:29 Deprecate SetRates and add a default implementatio
sprang_webrtc 2016/10/25 10:44:25 Done.
+ // Default fallback: Just use the sum of bitrates as the single target rate.
+ virtual int32_t SetRateAllocation(const BitrateAllocation& allocation,
+ uint32_t framerate) {
+ return SetRates(allocation.get_sum_kbps(), framerate);
+ }
+
virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; }
virtual void OnDroppedFrame() {}
virtual bool SupportsNativeHandle() const { return false; }
« webrtc/video/vie_encoder.cc ('K') | « webrtc/video/vie_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698