| 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 e4d3c76aabaa095daac343ee0037a2c9928b7013..8392bc4f35568fc91f68e5dfc04db03fea0d3f12 100644
|
| --- a/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h
|
| +++ b/webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h
|
| @@ -9,7 +9,9 @@
|
| #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_
|
| #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SCREENSHARE_LAYERS_H_
|
|
|
| -#include <vector>
|
| +#include <list>
|
| +
|
| +#include "vpx/vpx_encoder.h"
|
|
|
| #include "webrtc/base/timeutils.h"
|
| #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
|
| @@ -39,15 +41,10 @@
|
| // and/or update the reference buffers.
|
| int EncodeFlags(uint32_t timestamp) 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;
|
| + bool ConfigureBitrates(int bitrate_kbps,
|
| + int max_bitrate_kbps,
|
| + int framerate,
|
| + vpx_codec_enc_cfg_t* cfg) override;
|
|
|
| void PopulateCodecSpecific(bool base_layer_sync,
|
| CodecSpecificInfoVP8* vp8_info,
|
| @@ -56,6 +53,11 @@
|
| void FrameEncoded(unsigned int size, uint32_t timestamp, int qp) override;
|
|
|
| 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;
|
| @@ -73,8 +75,7 @@
|
| int min_qp_;
|
| int max_qp_;
|
| uint32_t max_debt_bytes_;
|
| - int framerate_;
|
| - bool bitrate_updated_;
|
| + int frame_rate_;
|
|
|
| static const int kMaxNumTemporalLayers = 2;
|
| struct TemporalLayer {
|
|
|