chromium/media/gpu/hrd_buffer.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MEDIA_GPU_HRD_BUFFER_H_
#define MEDIA_GPU_HRD_BUFFER_H_

#include <stdint.h>

#include "base/time/time.h"
#include "media/gpu/media_gpu_export.h"

namespace media {

// Model of Hypothetical Reference Decoder (HRD) Buffer
// It's a model of a leaky bucket, where the data flows out of the buffer at a
// constant bitrate, while the data is filled in after every encoded frame. The
// encoding loop should call HRD Buffer methods in the following order:
// ...
// Shrink(timestamp); <- optional
// ...
// AddFrameBytes(frame_bytes, frame_timestamp);
// ...
class MEDIA_GPU_EXPORT HRDBuffer {};

}  // namespace media

#endif  // MEDIA_GPU_HRD_BUFFER_H_