#include "media/mojo/services/mojo_video_encode_accelerator_provider.h"
#include <memory>
#include <utility>
#include "base/feature_list.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "media/base/limits.h"
#include "media/base/media_switches.h"
#include "media/gpu/gpu_video_encode_accelerator_factory.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "mojo/public/cpp/system/platform_handle.h"
namespace {
void BindVEAProvider(
mojo::PendingReceiver<media::mojom::VideoEncodeAcceleratorProvider>
receiver,
media::MojoVideoEncodeAcceleratorProvider::
CreateAndInitializeVideoEncodeAcceleratorCallback create_vea_callback,
gpu::GpuPreferences gpu_preferences,
gpu::GpuDriverBugWorkarounds gpu_workarounds,
const gpu::GPUInfo::GPUDevice& gpu_device) { … }
}
namespace media {
void MojoVideoEncodeAcceleratorProvider::Create(
mojo::PendingReceiver<mojom::VideoEncodeAcceleratorProvider> receiver,
CreateAndInitializeVideoEncodeAcceleratorCallback create_vea_callback,
const gpu::GpuPreferences& gpu_preferences,
const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
const gpu::GPUInfo::GPUDevice& gpu_device,
scoped_refptr<base::SequencedTaskRunner> runner) { … }
MojoVideoEncodeAcceleratorProvider::MojoVideoEncodeAcceleratorProvider(
CreateAndInitializeVideoEncodeAcceleratorCallback create_vea_callback,
const gpu::GpuPreferences& gpu_preferences,
const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
const gpu::GPUInfo::GPUDevice& gpu_device)
: … { … }
MojoVideoEncodeAcceleratorProvider::~MojoVideoEncodeAcceleratorProvider() =
default;
void MojoVideoEncodeAcceleratorProvider::CreateVideoEncodeAccelerator(
mojo::PendingReceiver<mojom::VideoEncodeAccelerator> receiver) { … }
void MojoVideoEncodeAcceleratorProvider::
GetVideoEncodeAcceleratorSupportedProfiles(
GetVideoEncodeAcceleratorSupportedProfilesCallback callback) { … }
}