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; } |