1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/task/sequenced_task_runner.h"
6 #include "base/task/single_thread_task_runner.h"
7 #include "media/base/audio_decoder.h"
8 #include "media/base/audio_encoder.h"
9 #include "media/base/media_log.h"
10 #include "media/base/video_decoder.h"
11 #include "media/mojo/services/gpu_mojo_media_client.h"
15 std::unique_ptr<VideoDecoder> CreatePlatformVideoDecoder(
16 VideoDecoderTraits& traits) {
20 absl::optional<SupportedVideoDecoderConfigs>
21 GetPlatformSupportedVideoDecoderConfigs(
22 base::WeakPtr<MediaGpuChannelManager> manager,
23 gpu::GpuDriverBugWorkarounds gpu_workarounds,
24 gpu::GpuPreferences gpu_preferences,
25 const gpu::GPUInfo& gpu_info,
26 base::OnceCallback<SupportedVideoDecoderConfigs()> get_vda_configs) {
30 std::unique_ptr<AudioDecoder> CreatePlatformAudioDecoder(
31 scoped_refptr<base::SequencedTaskRunner> task_runner,
32 std::unique_ptr<MediaLog> media_log) {
36 std::unique_ptr<AudioEncoder> CreatePlatformAudioEncoder(
37 scoped_refptr<base::SequencedTaskRunner> task_runner) {
41 // This class doesn't exist on any of the platforms that use the stubs.
44 std::unique_ptr<CdmFactory> CreatePlatformCdmFactory(
45 mojom::FrameInterfaceFactory* frame_interfaces) {
49 VideoDecoderType GetPlatformDecoderImplementationType(
50 gpu::GpuDriverBugWorkarounds gpu_workarounds,
51 gpu::GpuPreferences gpu_preferences,
52 const gpu::GPUInfo& gpu_info) {
53 return VideoDecoderType::kUnknown;