Index: webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h |
diff --git a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h |
index 8392bc4f35568fc91f68e5dfc04db03fea0d3f12..e4d3c76aabaa095daac343ee0037a2c9928b7013 100644 |
--- a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h |
+++ b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h |
@@ -9,9 +9,7 @@ |
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ |
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_ |
-#include <list> |
- |
-#include "vpx/vpx_encoder.h" |
+#include <vector> |
#include "webrtc/base/timeutils.h" |
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" |
@@ -41,10 +39,15 @@ class ScreenshareLayers : public TemporalLayers { |
// and/or update the reference buffers. |
int EncodeFlags(uint32_t timestamp) override; |
- bool ConfigureBitrates(int bitrate_kbps, |
- int max_bitrate_kbps, |
- 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; |
+ |
+ // Update the encoder configuration with target bitrates or other parameters. |
+ // Returns true iff the configuration was actually modified. |
+ bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; |
void PopulateCodecSpecific(bool base_layer_sync, |
CodecSpecificInfoVP8* vp8_info, |
@@ -54,11 +57,6 @@ class ScreenshareLayers : public TemporalLayers { |
int CurrentLayerId() const override; |
- // Allows the layers adapter to update the encoder configuration prior to a |
- // frame being encoded. Return true if the configuration should be updated |
- // and false if now change is needed. |
- bool UpdateConfiguration(vpx_codec_enc_cfg_t* cfg) override; |
- |
private: |
bool TimeToSync(int64_t timestamp) const; |
@@ -75,7 +73,8 @@ class ScreenshareLayers : public TemporalLayers { |
int min_qp_; |
int max_qp_; |
uint32_t max_debt_bytes_; |
- int frame_rate_; |
+ int framerate_; |
+ bool bitrate_updated_; |
static const int kMaxNumTemporalLayers = 2; |
struct TemporalLayer { |