chromium/remoting/protocol/fake_desktop_capturer.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "remoting/protocol/fake_desktop_capturer.h"

#include <stdint.h>

#include <memory>

#include "base/check.h"
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"

namespace remoting::protocol {

// FakeDesktopCapturer generates a white picture of size kWidth x kHeight
// with a rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed
// pixels per frame along both axes, and bounces off the sides of the screen.
static const int kWidth =;
static const int kHeight =;
static const int kBoxWidth =;
static const int kBoxHeight =;
static const int kSpeed =;

static_assert;
static_assert;

namespace {

class DefaultFrameGenerator
    : public base::RefCountedThreadSafe<DefaultFrameGenerator> {};

std::unique_ptr<webrtc::DesktopFrame> DefaultFrameGenerator::GenerateFrame(
    webrtc::SharedMemoryFactory* shared_memory_factory) {}

}  // namespace

FakeDesktopCapturer::FakeDesktopCapturer() :{}

FakeDesktopCapturer::~FakeDesktopCapturer() = default;

void FakeDesktopCapturer::set_frame_generator(FrameGenerator frame_generator) {}

void FakeDesktopCapturer::Start(Callback* callback) {}

void FakeDesktopCapturer::SetSharedMemoryFactory(
    std::unique_ptr<webrtc::SharedMemoryFactory> shared_memory_factory) {}

void FakeDesktopCapturer::CaptureFrame() {}

bool FakeDesktopCapturer::GetSourceList(SourceList* sources) {}

bool FakeDesktopCapturer::SelectSource(SourceId id) {}

}  // namespace remoting::protocol