#include "content/browser/media/capture/fake_video_capture_stack.h"
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "base/thread_annotations.h"
#include "base/time/time.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/media/capture/frame_test_util.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
#include "gpu/ipc/client/gpu_channel_host.h"
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "media/base/video_frame.h"
#include "media/base/video_types.h"
#include "media/base/video_util.h"
#include "media/capture/video/video_frame_receiver.h"
#include "media/capture/video_capture_types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/gpu_memory_buffer.h"
namespace content {
namespace {
gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() { … }
}
FakeVideoCaptureStack::FakeVideoCaptureStack() = default;
FakeVideoCaptureStack::~FakeVideoCaptureStack() = default;
void FakeVideoCaptureStack::Reset() { … }
class FakeVideoCaptureStackReceiver final : public media::VideoFrameReceiver { … };
std::unique_ptr<media::VideoFrameReceiver>
FakeVideoCaptureStack::CreateFrameReceiver() { … }
SkBitmap FakeVideoCaptureStack::NextCapturedFrame() { … }
void FakeVideoCaptureStack::ClearCapturedFramesQueue() { … }
void FakeVideoCaptureStack::ExpectHasLogMessages() { … }
void FakeVideoCaptureStack::ExpectNoLogMessages() { … }
void FakeVideoCaptureStack::OnReceivedFrame(
scoped_refptr<media::VideoFrame> frame) { … }
bool FakeVideoCaptureStack::Started() const { … }
bool FakeVideoCaptureStack::ErrorOccurred() const { … }
bool FakeVideoCaptureStack::HasCapturedFrames() const { … }
void FakeVideoCaptureStack::WaitForReceiver() const { … }
}