| 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 #include "media/gpu/gpu_video_decode_accelerator_factory.h" | 5 #include "media/gpu/gpu_video_decode_accelerator_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "gpu/command_buffer/service/gpu_preferences.h" | 8 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 9 #include "media/base/media_switches.h" | 9 #include "media/base/media_switches.h" |
| 10 #include "media/gpu/gpu_video_accelerator_util.h" | 10 #include "media/gpu/gpu_video_accelerator_util.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 make_context_current_cb_)); | 175 make_context_current_cb_)); |
| 176 } | 176 } |
| 177 return decoder; | 177 return decoder; |
| 178 } | 178 } |
| 179 | 179 |
| 180 std::unique_ptr<VideoDecodeAccelerator> | 180 std::unique_ptr<VideoDecodeAccelerator> |
| 181 GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA( | 181 GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA( |
| 182 const gpu::GpuDriverBugWorkarounds& workarounds, | 182 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 183 const gpu::GpuPreferences& gpu_preferences) const { | 183 const gpu::GpuPreferences& gpu_preferences) const { |
| 184 std::unique_ptr<VideoDecodeAccelerator> decoder; | 184 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| 185 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { | 185 DVLOG(0) << "Initializing DXVA HW decoder for windows."; |
| 186 DVLOG(0) << "Initializing DXVA HW decoder for windows."; | 186 decoder.reset(new DXVAVideoDecodeAccelerator( |
| 187 decoder.reset(new DXVAVideoDecodeAccelerator( | 187 get_gl_context_cb_, make_context_current_cb_, bind_image_cb_, |
| 188 get_gl_context_cb_, make_context_current_cb_, bind_image_cb_, | 188 workarounds, gpu_preferences)); |
| 189 workarounds, gpu_preferences)); | |
| 190 } | |
| 191 return decoder; | 189 return decoder; |
| 192 } | 190 } |
| 193 #endif | 191 #endif |
| 194 | 192 |
| 195 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) | 193 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC) |
| 196 std::unique_ptr<VideoDecodeAccelerator> | 194 std::unique_ptr<VideoDecodeAccelerator> |
| 197 GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA( | 195 GpuVideoDecodeAcceleratorFactory::CreateV4L2VDA( |
| 198 const gpu::GpuDriverBugWorkarounds& workarounds, | 196 const gpu::GpuDriverBugWorkarounds& workarounds, |
| 199 const gpu::GpuPreferences& gpu_preferences) const { | 197 const gpu::GpuPreferences& gpu_preferences) const { |
| 200 std::unique_ptr<VideoDecodeAccelerator> decoder; | 198 std::unique_ptr<VideoDecodeAccelerator> decoder; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 const AndroidOverlayMojoFactoryCB& overlay_factory_cb) | 267 const AndroidOverlayMojoFactoryCB& overlay_factory_cb) |
| 270 : get_gl_context_cb_(get_gl_context_cb), | 268 : get_gl_context_cb_(get_gl_context_cb), |
| 271 make_context_current_cb_(make_context_current_cb), | 269 make_context_current_cb_(make_context_current_cb), |
| 272 bind_image_cb_(bind_image_cb), | 270 bind_image_cb_(bind_image_cb), |
| 273 get_gles2_decoder_cb_(get_gles2_decoder_cb), | 271 get_gles2_decoder_cb_(get_gles2_decoder_cb), |
| 274 overlay_factory_cb_(overlay_factory_cb) {} | 272 overlay_factory_cb_(overlay_factory_cb) {} |
| 275 | 273 |
| 276 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} | 274 GpuVideoDecodeAcceleratorFactory::~GpuVideoDecodeAcceleratorFactory() {} |
| 277 | 275 |
| 278 } // namespace media | 276 } // namespace media |
| OLD | NEW |