#include "media/video/fake_video_encode_accelerator.h"
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/task/sequenced_task_runner.h"
#include "media/base/media_log.h"
#include "media/base/video_frame.h"
namespace media {
static const unsigned int kMinimumInputCount = …;
FakeVideoEncodeAccelerator::FrameToEncode::FrameToEncode() = default;
FakeVideoEncodeAccelerator::FrameToEncode::FrameToEncode(
const FakeVideoEncodeAccelerator::FrameToEncode&) = default;
FakeVideoEncodeAccelerator::FrameToEncode::~FrameToEncode() = default;
FakeVideoEncodeAccelerator::FakeVideoEncodeAccelerator(
const scoped_refptr<base::SequencedTaskRunner>& task_runner)
: … { … }
FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() { … }
VideoEncodeAccelerator::SupportedProfiles
FakeVideoEncodeAccelerator::GetSupportedProfiles() { … }
bool FakeVideoEncodeAccelerator::Initialize(
const Config& config,
Client* client,
std::unique_ptr<MediaLog> media_log) { … }
void FakeVideoEncodeAccelerator::Encode(scoped_refptr<VideoFrame> frame,
bool force_keyframe) { … }
void FakeVideoEncodeAccelerator::UseOutputBitstreamBuffer(
BitstreamBuffer buffer) { … }
void FakeVideoEncodeAccelerator::RequestEncodingParametersChange(
const Bitrate& bitrate,
uint32_t framerate,
const std::optional<gfx::Size>& size) { … }
void FakeVideoEncodeAccelerator::RequestEncodingParametersChange(
const VideoBitrateAllocation& bitrate,
uint32_t framerate,
const std::optional<gfx::Size>& size) { … }
void FakeVideoEncodeAccelerator::UpdateOutputFrameSize(const gfx::Size& size) { … }
void FakeVideoEncodeAccelerator::Destroy() { … }
void FakeVideoEncodeAccelerator::SetWillInitializationSucceed(
bool will_initialization_succeed) { … }
void FakeVideoEncodeAccelerator::SetWillEncodingSucceed(
bool will_encoding_succeed) { … }
void FakeVideoEncodeAccelerator::SetSupportFrameSizeChange(
bool support_frame_size_change) { … }
void FakeVideoEncodeAccelerator::NotifyEncoderInfoChange(
const VideoEncoderInfo& info) { … }
void FakeVideoEncodeAccelerator::DoNotifyEncoderInfoChange(
const VideoEncoderInfo& info) { … }
void FakeVideoEncodeAccelerator::DoRequireBitstreamBuffers(
unsigned int input_count,
const gfx::Size& input_coded_size,
size_t output_buffer_size) const { … }
void FakeVideoEncodeAccelerator::EncodeTask() { … }
void FakeVideoEncodeAccelerator::DoBitstreamBufferReady(
BitstreamBuffer buffer,
FrameToEncode frame_to_encode) const { … }
bool FakeVideoEncodeAccelerator::IsGpuFrameResizeSupported() { … }
}