MediaOptimization: Remove unneeded member variable: video_target_bitrate_

Remove unimplemented function declaration CheckSuspendConditions.

Make UpdateWithEncodedData void (always returning ok).

Rename user_frame_rate_ -> max_frame_rate_


Bug: none
Change-Id: I2eb5419a670e31d417f1bec8c163839c01f8c1fa
Reviewed-on: https://webrtc-review.googlesource.com/20500
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20612}
This commit is contained in:
Åsa Persson
2017-11-08 11:33:37 +01:00
committed by Commit Bot
parent 7281f92e72
commit b52a4d90c2
4 changed files with 49 additions and 78 deletions

View File

@ -24,41 +24,36 @@ namespace webrtc {
class FrameDropper {
public:
FrameDropper();
explicit FrameDropper(float max_time_drops);
virtual ~FrameDropper() {}
// Resets the FrameDropper to its initial state.
// This means that the frameRateWeight is set to its
// default value as well.
virtual void Reset();
virtual void Enable(bool enable);
// Answers the question if it's time to drop a frame
// if we want to reach a given frame rate. Must be
// called for every frame.
// Answers the question if it's time to drop a frame if we want to reach a
// given frame rate. Must be called for every frame.
//
// Return value : True if we should drop the current frame
// Return value : True if we should drop the current frame.
virtual bool DropFrame();
// Updates the FrameDropper with the size of the latest encoded
// frame. The FrameDropper calculates a new drop ratio (can be
// seen as the probability to drop a frame) and updates its
// internal statistics.
// Updates the FrameDropper with the size of the latest encoded frame.
// The FrameDropper calculates a new drop ratio (can be seen as the
// probability to drop a frame) and updates its internal statistics.
//
// Input:
// - frameSizeBytes : The size of the latest frame
// returned from the encoder.
// - deltaFrame : True if the encoder returned
// a key frame.
virtual void Fill(size_t frameSizeBytes, bool deltaFrame);
// - framesize_bytes : The size of the latest frame returned
// from the encoder.
// - delta_frame : True if the encoder returned a key frame.
virtual void Fill(size_t framesize_bytes, bool delta_frame);
virtual void Leak(uint32_t inputFrameRate);
virtual void Leak(uint32_t input_framerate);
// Sets the target bit rate and the frame rate produced by
// the camera.
// Sets the target bit rate and the frame rate produced by the camera.
//
// Input:
// - bitRate : The target bit rate
virtual void SetRates(float bitRate, float incoming_frame_rate);
// - bitrate : The target bit rate.
virtual void SetRates(float bitrate, float incoming_frame_rate);
private:
void UpdateRatio();