Move VP9 frame rate controller to separate class.

Bug: webrtc:9669
Change-Id: I6f30587778e9783182af11d2410464024918e171
Reviewed-on: https://webrtc-review.googlesource.com/96201
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24487}
This commit is contained in:
Sergey Silkin
2018-08-29 01:05:26 +02:00
committed by Commit Bot
parent 5a998d7246
commit ae3144c51f
6 changed files with 230 additions and 47 deletions

View File

@ -20,7 +20,7 @@
#include "media/base/vp9_profile.h"
#include "modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h"
#include "rtc_base/rate_statistics.h"
#include "modules/video_coding/utility/framerate_controller.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_decoder.h"
@ -82,7 +82,7 @@ class VP9EncoderImpl : public VP9Encoder {
void DeliverBufferedFrame(bool end_of_picture);
bool DropFrame(uint32_t rtp_timestamp);
bool DropFrame(uint8_t spatial_idx, uint32_t rtp_timestamp);
// Determine maximum target for Intra frames
//
@ -117,9 +117,7 @@ class VP9EncoderImpl : public VP9Encoder {
InterLayerPredMode inter_layer_pred_;
// Framerate controller.
absl::optional<float> target_framerate_fps_;
RateStatistics output_framerate_;
uint32_t last_encoded_frame_rtp_timestamp_;
FramerateController framerate_controller_;
// Used for flexible mode.
bool is_flexible_mode_;