Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: media/gpu/gpu_video_decode_accelerator_factory.cc

Issue 2534313004: Add prototype D3D11VideoDecodeAccelerator. (Closed)
Patch Set: rename d3d11_video_decoder.cc and other changes Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/gpu_video_decode_accelerator_factory.h ('k') | media/gpu/h264_dpb.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/gpu_video_decode_accelerator_factory.cc
diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc
index a7db56f57357108e3f4fcca4caa268a4561af744..704fde50c10e5dbef01885dae7a06a0b5d11f703 100644
--- a/media/gpu/gpu_video_decode_accelerator_factory.cc
+++ b/media/gpu/gpu_video_decode_accelerator_factory.cc
@@ -6,11 +6,13 @@
#include "base/memory/ptr_util.h"
#include "gpu/command_buffer/service/gpu_preferences.h"
+#include "media/base/media_switches.h"
#include "media/gpu/gpu_video_accelerator_util.h"
#include "media/gpu/media_gpu_export.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
+#include "media/gpu/d3d11_video_decode_accelerator_win.h"
#include "media/gpu/dxva_video_decode_accelerator_win.h"
#elif defined(OS_MACOSX)
#include "media/gpu/vt_video_decode_accelerator_mac.h"
@@ -125,6 +127,7 @@ GpuVideoDecodeAcceleratorFactory::CreateVDA(
const gpu::GpuPreferences&) const;
const CreateVDAFp create_vda_fps[] = {
#if defined(OS_WIN)
+ &GpuVideoDecodeAcceleratorFactory::CreateD3D11VDA,
&GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA,
#endif
#if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
@@ -155,6 +158,21 @@ GpuVideoDecodeAcceleratorFactory::CreateVDA(
#if defined(OS_WIN)
std::unique_ptr<VideoDecodeAccelerator>
+GpuVideoDecodeAcceleratorFactory::CreateD3D11VDA(
+ const gpu::GpuDriverBugWorkarounds& workarounds,
+ const gpu::GpuPreferences& gpu_preferences) const {
+ std::unique_ptr<VideoDecodeAccelerator> decoder;
+ if (!base::FeatureList::IsEnabled(kD3D11VideoDecoding))
+ return decoder;
+ if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
+ DVLOG(0) << "Initializing D3D11 HW decoder for windows.";
+ decoder.reset(new D3D11VideoDecodeAccelerator(get_gl_context_cb_,
+ make_context_current_cb_));
+ }
+ return decoder;
+}
+
+std::unique_ptr<VideoDecodeAccelerator>
GpuVideoDecodeAcceleratorFactory::CreateDXVAVDA(
const gpu::GpuDriverBugWorkarounds& workarounds,
const gpu::GpuPreferences& gpu_preferences) const {
« no previous file with comments | « media/gpu/gpu_video_decode_accelerator_factory.h ('k') | media/gpu/h264_dpb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698