Chromium Code Reviews| Index: webrtc/modules/video_coding/utility/simulcast_rate_allocator.h |
| diff --git a/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h b/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h |
| index e7ee772b3c49613eabad795cf2addb1bb2fe9b31..473b26749443647a84fd49c3d56737977ebeabb9 100644 |
| --- a/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h |
| +++ b/webrtc/modules/video_coding/utility/simulcast_rate_allocator.h |
| @@ -11,24 +11,36 @@ |
| #ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ |
| #define WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ |
| -#include <vector> |
| +#include <map> |
| +#include <memory> |
| #include "webrtc/base/basictypes.h" |
| #include "webrtc/base/constructormagic.h" |
| +#include "webrtc/common_video/include/video_bitrate_allocator.h" |
| +#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" |
| #include "webrtc/video_encoder.h" |
| namespace webrtc { |
| -class SimulcastRateAllocator { |
| +class SimulcastRateAllocator : public VideoBitrateAllocator, |
| + public TemporalLayersListener { |
| public: |
| - explicit SimulcastRateAllocator(const VideoCodec& codec); |
| + explicit SimulcastRateAllocator( |
| + const VideoCodec& codec, |
| + std::unique_ptr<TemporalLayersFactory> tl_factory); |
| - std::vector<uint32_t> GetAllocation(uint32_t bitrate_kbps) const; |
| - uint32_t GetPreferedBitrate() const; |
| + void OnTemporalLayersCreated(int simulcast_id, |
| + TemporalLayers* layers) override; |
| + |
| + BitrateAllocation GetAllocation(uint32_t total_bitrate_bps, |
| + uint32_t framerate) override; |
| + uint32_t GetPreferedBitrate(int frame_rate) override; |
|
stefan-webrtc
2016/11/02 10:26:36
framerate
sprang_webrtc
2016/11/02 13:28:33
Done.
|
| const VideoCodec& GetCodec() const; |
| private: |
| const VideoCodec codec_; |
| + std::map<uint32_t, TemporalLayers*> temporal_layers_; |
| + std::unique_ptr<TemporalLayersFactory> tl_factory_; |
| RTC_DISALLOW_COPY_AND_ASSIGN(SimulcastRateAllocator); |
| }; |