#ifndef MEDIA_GPU_GPU_VIDEO_ENCODE_ACCELERATOR_FACTORY_H_
#define MEDIA_GPU_GPU_VIDEO_ENCODE_ACCELERATOR_FACTORY_H_
#include <memory>
#include "gpu/config/gpu_info.h"
#include "gpu/ipc/service/command_buffer_stub.h"
#include "media/base/media_log.h"
#include "media/gpu/media_gpu_export.h"
#include "media/video/video_encode_accelerator.h"
namespace gpu {
struct GpuPreferences;
class GpuDriverBugWorkarounds;
}
namespace media {
class MEDIA_GPU_EXPORT GpuVideoEncodeAcceleratorFactory {
public:
GpuVideoEncodeAcceleratorFactory() = delete;
GpuVideoEncodeAcceleratorFactory(const GpuVideoEncodeAcceleratorFactory&) =
delete;
GpuVideoEncodeAcceleratorFactory& operator=(
const GpuVideoEncodeAcceleratorFactory&) = delete;
using GetCommandBufferHelperCB =
base::RepeatingCallback<scoped_refptr<CommandBufferHelper>()>;
static EncoderStatus::Or<std::unique_ptr<VideoEncodeAccelerator>> CreateVEA(
const VideoEncodeAccelerator::Config& config,
VideoEncodeAccelerator::Client* client,
const gpu::GpuPreferences& gpu_perferences,
const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
const gpu::GPUInfo::GPUDevice& gpu_device,
std::unique_ptr<MediaLog> media_log = nullptr,
GetCommandBufferHelperCB get_command_buffer_helper_cb =
GetCommandBufferHelperCB(),
scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner = nullptr);
static VideoEncodeAccelerator::SupportedProfiles GetSupportedProfiles(
const gpu::GpuPreferences& gpu_preferences,
const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
const gpu::GPUInfo::GPUDevice& gpu_device);
};
}
#endif