#include "third_party/blink/renderer/modules/mediastream/low_latency_video_renderer_algorithm.h"
#include <algorithm>
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "media/base/media_log.h"
#include "third_party/blink/public/common/features.h"
namespace blink {
namespace {
constexpr int16_t kDefaultMaxPostDecodeQueueSize = …;
constexpr int16_t kDefaultMaxConsecutiveFramesToDrop = …;
constexpr int16_t kDefaultReduceSteadyThreshold = …;
constexpr double kVsyncBoundaryErrorRate = …;
}
namespace features {
BASE_FEATURE(…);
}
LowLatencyVideoRendererAlgorithm::LowLatencyVideoRendererAlgorithm(
media::MediaLog* media_log) { … }
LowLatencyVideoRendererAlgorithm::~LowLatencyVideoRendererAlgorithm() = default;
scoped_refptr<media::VideoFrame> LowLatencyVideoRendererAlgorithm::Render(
base::TimeTicks deadline_min,
base::TimeTicks deadline_max,
size_t* frames_dropped) { … }
void LowLatencyVideoRendererAlgorithm::Reset() { … }
void LowLatencyVideoRendererAlgorithm::EnqueueFrame(
scoped_refptr<media::VideoFrame> frame) { … }
size_t LowLatencyVideoRendererAlgorithm::DetermineModeAndNumberOfFramesToRender(
double fractional_frames_to_render) { … }
bool LowLatencyVideoRendererAlgorithm::ReduceSteadyStateQueue(
size_t number_of_frames_to_render) { … }
void LowLatencyVideoRendererAlgorithm::
SelectNextAvailableFrameAndUpdateLastDeadline(
base::TimeTicks deadline_min) { … }
void LowLatencyVideoRendererAlgorithm::RecordAndResetStats() { … }
}