12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- // Copyright 2017 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #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 "media/gpu/media_gpu_export.h"
- #include "media/video/video_encode_accelerator.h"
- namespace gpu {
- struct GpuPreferences;
- class GpuDriverBugWorkarounds;
- } // namespace gpu
- namespace media {
- class MEDIA_GPU_EXPORT GpuVideoEncodeAcceleratorFactory {
- public:
- GpuVideoEncodeAcceleratorFactory() = delete;
- GpuVideoEncodeAcceleratorFactory(const GpuVideoEncodeAcceleratorFactory&) =
- delete;
- GpuVideoEncodeAcceleratorFactory& operator=(
- const GpuVideoEncodeAcceleratorFactory&) = delete;
- // Creates and Initializes a VideoEncodeAccelerator. Returns nullptr
- // if there is no implementation available on the platform or calling
- // VideoEncodeAccelerator::Initialize() returns false.
- static 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);
- // Gets the supported codec profiles for video encoding on the platform.
- // If |populate_extended_info| it false, this function will only populate:
- // codec, framerate range and resolution range. It's faster.
- static VideoEncodeAccelerator::SupportedProfiles GetSupportedProfiles(
- const gpu::GpuPreferences& gpu_preferences,
- const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
- const gpu::GPUInfo::GPUDevice& gpu_device,
- bool populate_extended_info = true);
- };
- } // namespace media
- #endif // MEDIA_GPU_GPU_VIDEO_ENCODE_ACCELERATOR_FACTORY_H_
|