Index: webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h |
diff --git a/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h b/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h |
index 19846ba5ff2b7660c8681bfe42b9123248ac10df..0cd0b06451045560b55a235dff4f89d39902510c 100644 |
--- a/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h |
+++ b/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h |
@@ -12,8 +12,12 @@ |
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ |
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_DEFAULT_TEMPORAL_LAYERS_H_ |
+#include <vector> |
+ |
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" |
+#include "webrtc/base/optional.h" |
+ |
namespace webrtc { |
class DefaultTemporalLayers : public TemporalLayers { |
@@ -26,10 +30,13 @@ class DefaultTemporalLayers : public TemporalLayers { |
// and/or update the reference buffers. |
int EncodeFlags(uint32_t timestamp) override; |
- bool ConfigureBitrates(int bitrate_kbit, |
- int max_bitrate_kbit, |
- int framerate, |
- vpx_codec_enc_cfg_t* cfg) override; |
+ // Update state based on new bitrate target and incoming framerate. |
+ // Returns the bitrate allocation for the active temporal layers. |
+ std::vector<uint32_t> OnRatesUpdated(int bitrate_kbps, |
+ int max_bitrate_kbps, |
+ int framerate) override; |
+ |
+ bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; |
void PopulateCodecSpecific(bool base_layer_sync, |
CodecSpecificInfoVP8* vp8_info, |
@@ -37,8 +44,6 @@ class DefaultTemporalLayers : public TemporalLayers { |
void FrameEncoded(unsigned int size, uint32_t timestamp, int qp) override {} |
- bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override { return false; } |
- |
int CurrentLayerId() const override; |
private: |
@@ -77,7 +82,7 @@ class DefaultTemporalLayers : public TemporalLayers { |
}; |
enum { kMaxTemporalPattern = 16 }; |
- int number_of_temporal_layers_; |
+ const int number_of_temporal_layers_; |
int temporal_ids_length_; |
int temporal_ids_[kMaxTemporalPattern]; |
int temporal_pattern_length_; |
@@ -86,6 +91,7 @@ class DefaultTemporalLayers : public TemporalLayers { |
uint8_t pattern_idx_; |
uint32_t timestamp_; |
bool last_base_layer_sync_; |
+ rtc::Optional<std::vector<uint32_t>> new_bitrates_kbps_; |
}; |
} // namespace webrtc |