#include "remoting/protocol/capture_scheduler.h"
#include <algorithm>
#include <utility>
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/system/sys_info.h"
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
#include "remoting/proto/video.pb.h"
namespace {
const int kStatisticsWindow = …;
const int64_t kDefaultMinimumIntervalMs = …;
const double kRecordingCpuConsumption = …;
static const int kMaxFramesInEncodingQueue = …;
static const int kMaxUnacknowledgedFrames = …;
}
namespace remoting::protocol {
CaptureScheduler::CaptureScheduler(
const base::RepeatingClosure& capture_closure)
: … { … }
CaptureScheduler::~CaptureScheduler() { … }
void CaptureScheduler::Start() { … }
void CaptureScheduler::Pause(bool pause) { … }
void CaptureScheduler::OnCaptureCompleted() { … }
void CaptureScheduler::OnFrameEncoded(VideoPacket* packet) { … }
void CaptureScheduler::OnFrameSent() { … }
void CaptureScheduler::ProcessVideoAck(std::unique_ptr<VideoAck> video_ack) { … }
void CaptureScheduler::SetTickClockForTest(const base::TickClock* tick_clock) { … }
void CaptureScheduler::SetTimerForTest(
std::unique_ptr<base::OneShotTimer> timer) { … }
void CaptureScheduler::SetNumOfProcessorsForTest(int num_of_processors) { … }
void CaptureScheduler::ScheduleNextCapture() { … }
void CaptureScheduler::CaptureNextFrame() { … }
}