OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ | 5 #ifndef MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ |
6 #define MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ | 6 #define MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const GetGLContextCallback& get_gl_context_cb, | 67 const GetGLContextCallback& get_gl_context_cb, |
68 const MakeGLContextCurrentCallback& make_context_current_cb, | 68 const MakeGLContextCurrentCallback& make_context_current_cb, |
69 const BindGLImageCallback& bind_image_cb, | 69 const BindGLImageCallback& bind_image_cb, |
70 const GetGLES2DecoderCallback& get_gles2_decoder_cb); | 70 const GetGLES2DecoderCallback& get_gles2_decoder_cb); |
71 | 71 |
72 static std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> CreateWithNoGL(); | 72 static std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> CreateWithNoGL(); |
73 | 73 |
74 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities( | 74 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities( |
75 const gpu::GpuPreferences& gpu_preferences); | 75 const gpu::GpuPreferences& gpu_preferences); |
76 | 76 |
77 std::unique_ptr<media::VideoDecodeAccelerator> CreateVDA( | 77 std::unique_ptr<VideoDecodeAccelerator> CreateVDA( |
78 media::VideoDecodeAccelerator::Client* client, | 78 VideoDecodeAccelerator::Client* client, |
79 const media::VideoDecodeAccelerator::Config& config, | 79 const VideoDecodeAccelerator::Config& config, |
80 const gpu::GpuPreferences& gpu_preferences); | 80 const gpu::GpuPreferences& gpu_preferences); |
81 | 81 |
82 private: | 82 private: |
83 GpuVideoDecodeAcceleratorFactoryImpl( | 83 GpuVideoDecodeAcceleratorFactoryImpl( |
84 const GetGLContextCallback& get_gl_context_cb, | 84 const GetGLContextCallback& get_gl_context_cb, |
85 const MakeGLContextCurrentCallback& make_context_current_cb, | 85 const MakeGLContextCurrentCallback& make_context_current_cb, |
86 const BindGLImageCallback& bind_image_cb, | 86 const BindGLImageCallback& bind_image_cb, |
87 const GetGLES2DecoderCallback& get_gles2_decoder_cb); | 87 const GetGLES2DecoderCallback& get_gles2_decoder_cb); |
88 | 88 |
89 #if defined(OS_WIN) | 89 #if defined(OS_WIN) |
90 std::unique_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA( | 90 std::unique_ptr<VideoDecodeAccelerator> CreateDXVAVDA( |
91 const gpu::GpuPreferences& gpu_preferences) const; | 91 const gpu::GpuPreferences& gpu_preferences) const; |
92 #endif | 92 #endif |
93 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) | 93 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
94 std::unique_ptr<media::VideoDecodeAccelerator> CreateV4L2VDA( | 94 std::unique_ptr<VideoDecodeAccelerator> CreateV4L2VDA( |
95 const gpu::GpuPreferences& gpu_preferences) const; | 95 const gpu::GpuPreferences& gpu_preferences) const; |
96 std::unique_ptr<media::VideoDecodeAccelerator> CreateV4L2SVDA( | 96 std::unique_ptr<VideoDecodeAccelerator> CreateV4L2SVDA( |
97 const gpu::GpuPreferences& gpu_preferences) const; | 97 const gpu::GpuPreferences& gpu_preferences) const; |
98 #endif | 98 #endif |
99 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 99 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
100 std::unique_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA( | 100 std::unique_ptr<VideoDecodeAccelerator> CreateVaapiVDA( |
101 const gpu::GpuPreferences& gpu_preferences) const; | 101 const gpu::GpuPreferences& gpu_preferences) const; |
102 #endif | 102 #endif |
103 #if defined(OS_MACOSX) | 103 #if defined(OS_MACOSX) |
104 std::unique_ptr<media::VideoDecodeAccelerator> CreateVTVDA( | 104 std::unique_ptr<VideoDecodeAccelerator> CreateVTVDA( |
105 const gpu::GpuPreferences& gpu_preferences) const; | 105 const gpu::GpuPreferences& gpu_preferences) const; |
106 #endif | 106 #endif |
107 #if defined(OS_ANDROID) | 107 #if defined(OS_ANDROID) |
108 std::unique_ptr<media::VideoDecodeAccelerator> CreateAndroidVDA( | 108 std::unique_ptr<VideoDecodeAccelerator> CreateAndroidVDA( |
109 const gpu::GpuPreferences& gpu_preferences) const; | 109 const gpu::GpuPreferences& gpu_preferences) const; |
110 #endif | 110 #endif |
111 | 111 |
112 const GetGLContextCallback get_gl_context_cb_; | 112 const GetGLContextCallback get_gl_context_cb_; |
113 const MakeGLContextCurrentCallback make_context_current_cb_; | 113 const MakeGLContextCurrentCallback make_context_current_cb_; |
114 const BindGLImageCallback bind_image_cb_; | 114 const BindGLImageCallback bind_image_cb_; |
115 const GetGLES2DecoderCallback get_gles2_decoder_cb_; | 115 const GetGLES2DecoderCallback get_gles2_decoder_cb_; |
116 | 116 |
117 base::ThreadChecker thread_checker_; | 117 base::ThreadChecker thread_checker_; |
118 | 118 |
119 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAcceleratorFactoryImpl); | 119 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAcceleratorFactoryImpl); |
120 }; | 120 }; |
121 | 121 |
122 } // namespace media | 122 } // namespace media |
123 | 123 |
124 #endif // MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ | 124 #endif // MEDIA_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_IMPL_H_ |
OLD | NEW |