OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" | 5 #include "content/renderer/media/renderer_gpu_video_accelerator_factories.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "content/child/child_thread_impl.h" | 11 #include "content/child/child_thread_impl.h" |
12 #include "content/common/gpu/client/context_provider_command_buffer.h" | 12 #include "content/common/gpu/client/context_provider_command_buffer.h" |
13 #include "content/common/gpu/client/gl_helper.h" | 13 #include "content/common/gpu/client/gl_helper.h" |
14 #include "content/common/gpu/client/gpu_channel_host.h" | 14 #include "content/common/gpu/client/gpu_channel_host.h" |
15 #include "content/common/gpu/client/gpu_video_encode_accelerator_host.h" | |
16 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 15 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 16 #include "content/common/gpu/media/gpu_video_accelerator_util.h" |
17 #include "content/renderer/render_thread_impl.h" | 17 #include "content/renderer/render_thread_impl.h" |
18 #include "gpu/command_buffer/client/gles2_implementation.h" | 18 #include "gpu/command_buffer/client/gles2_implementation.h" |
19 #include "media/video/video_decode_accelerator.h" | 19 #include "media/video/video_decode_accelerator.h" |
20 #include "media/video/video_encode_accelerator.h" | 20 #include "media/video/video_encode_accelerator.h" |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 | 23 |
24 // static | 24 // static |
25 scoped_refptr<RendererGpuVideoAcceleratorFactories> | 25 scoped_refptr<RendererGpuVideoAcceleratorFactories> |
26 RendererGpuVideoAcceleratorFactories::Create( | 26 RendererGpuVideoAcceleratorFactories::Create( |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (mem && !mem->Map(size)) | 193 if (mem && !mem->Map(size)) |
194 return nullptr; | 194 return nullptr; |
195 return mem; | 195 return mem; |
196 } | 196 } |
197 | 197 |
198 scoped_refptr<base::SingleThreadTaskRunner> | 198 scoped_refptr<base::SingleThreadTaskRunner> |
199 RendererGpuVideoAcceleratorFactories::GetTaskRunner() { | 199 RendererGpuVideoAcceleratorFactories::GetTaskRunner() { |
200 return task_runner_; | 200 return task_runner_; |
201 } | 201 } |
202 | 202 |
203 std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 203 media::VideoDecodeAccelerator::SupportedProfiles |
| 204 RendererGpuVideoAcceleratorFactories:: |
| 205 GetVideoDecodeAcceleratorSupportedProfiles() { |
| 206 return GpuVideoAcceleratorUtil::ConvertGpuToMediaDecodeProfiles( |
| 207 gpu_channel_host_->gpu_info() |
| 208 .video_decode_accelerator_supported_profiles); |
| 209 } |
| 210 |
| 211 media::VideoEncodeAccelerator::SupportedProfiles |
204 RendererGpuVideoAcceleratorFactories:: | 212 RendererGpuVideoAcceleratorFactories:: |
205 GetVideoEncodeAcceleratorSupportedProfiles() { | 213 GetVideoEncodeAcceleratorSupportedProfiles() { |
206 return GpuVideoEncodeAcceleratorHost::ConvertGpuToMediaProfiles( | 214 return GpuVideoAcceleratorUtil::ConvertGpuToMediaEncodeProfiles( |
207 gpu_channel_host_->gpu_info() | 215 gpu_channel_host_->gpu_info() |
208 .video_encode_accelerator_supported_profiles); | 216 .video_encode_accelerator_supported_profiles); |
209 } | 217 } |
210 | 218 |
211 } // namespace content | 219 } // namespace content |
OLD | NEW |