chromium/remoting/protocol/capture_scheduler.cc

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

#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 {

// Number of samples to average the most recent capture and encode time
// over.
const int kStatisticsWindow =;

// The hard limit is 30fps or 33ms per recording cycle.
const int64_t kDefaultMinimumIntervalMs =;

// Controls how much CPU time we can use for encode and capture.
// Range of this value is between 0 to 1. 0 means using 0% of of all CPUs
// available while 1 means using 100% of all CPUs available.
const double kRecordingCpuConsumption =;

// Maximum number of captured frames in the encoding queue. Currently capturer
// implementations do not allow to keep more than 2 DesktopFrame objects.
static const int kMaxFramesInEncodingQueue =;

// Maximum number of unacknowledged frames. Ignored if the client doesn't
// support ACKs. This value was chosen experimentally, using synthetic
// performance tests (see ProtocolPerfTest), to maximize frame rate, while
// keeping round-trip latency low.
static const int kMaxUnacknowledgedFrames =;

}  // namespace

namespace remoting::protocol {

// We assume that the number of available cores is constant.
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() {}

}  // namespace remoting::protocol