#include "media/gpu/hrd_buffer.h"
#include "base/check.h"
#include "base/check_op.h"
#include "media/gpu/h264_rate_control_util.h"
namespace media {
HRDBuffer::HRDBuffer(size_t buffer_size, uint32_t avg_bitrate) { … }
HRDBuffer::HRDBuffer(size_t buffer_size,
uint32_t avg_bitrate,
int last_frame_buffer_bytes,
base::TimeDelta last_frame_timestamp)
: … { … }
HRDBuffer::~HRDBuffer() = default;
int HRDBuffer::GetBytesAtTime(base::TimeDelta timestamp) const { … }
int HRDBuffer::GetBytesRemainingAtTime(base::TimeDelta timestamp) const { … }
void HRDBuffer::SetParameters(size_t buffer_size,
uint32_t avg_bitrate,
uint32_t peak_bitrate,
bool ease_hrd_reduction) { … }
void HRDBuffer::Shrink(base::TimeDelta timestamp) { … }
void HRDBuffer::AddFrameBytes(size_t frame_bytes,
base::TimeDelta frame_timestamp) { … }
}