chromium/remoting/protocol/capture_scheduler.h

// 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.

#ifndef REMOTING_PROTOCOL_CAPTURE_SCHEDULER_H_
#define REMOTING_PROTOCOL_CAPTURE_SCHEDULER_H_

#include <stdint.h>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/threading/thread_checker.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "remoting/base/running_samples.h"
#include "remoting/protocol/video_feedback_stub.h"

namespace remoting {

class VideoPacket;

namespace protocol {

// CaptureScheduler is used by the VideoFramePump to schedule frame capturer,
// taking into account capture delay, encoder delay, network bandwidth, etc.
// It implements VideoFeedbackStub to receive frame acknowledgments from the
// client.
//
// It attempts to achieve the following goals when scheduling frames:
//  - Keep round-trip latency as low a possible.
//  - Parallelize capture, encode and transmission, to achieve frame rate as
//    close to the target of 30fps as possible.
//  - Limit CPU usage to 50%.
class CaptureScheduler : public VideoFeedbackStub {};

}  // namespace protocol
}  // namespace remoting

#endif  // REMOTING_PROTOCOL_CAPTURE_SCHEDULER_H_