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

Unified Diff: content/common/gpu/media/dxva_video_decode_accelerator.cc

Issue 23726005: On Windows 8 load the mfcore.dll and invoke the MFStartup API in the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/dxva_video_decode_accelerator.cc
===================================================================
--- content/common/gpu/media/dxva_video_decode_accelerator.cc (revision 219627)
+++ content/common/gpu/media/dxva_video_decode_accelerator.cc (working copy)
@@ -23,6 +23,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
+#include "base/win/windows_version.h"
#include "media/video/video_decode_accelerator.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_surface_egl.h"
@@ -395,6 +396,22 @@
RETURN_ON_FAILURE(CreateD3DDevManager(),
"Failed to initialize D3D device and manager",);
+
+ if (base::win::GetVersion() == base::win::VERSION_WIN8) {
+ // On Windows 8+ mf.dll forwards to mfcore.dll. It does not exist in
+ // Windows 7. Loading mfcore.dll fails on Windows 8.1 in the
+ // sandbox
scherkus (not reviewing) 2013/08/29 23:56:00 end sentences with periods.
ananta 2013/08/30 02:21:15 Done.
+ if (!LoadLibrary(L"mfcore.dll")) {
+ DLOG(ERROR) << "Failed to load mfcore.dll, Error: " << ::GetLastError();
+ return;
+ }
+ // MFStartup needs to be called once outside the sandbox. It fails on
+ // Windows 8.1 with E_NOTIMPL if it is called the first time in the
+ // sandbox.
+ RETURN_ON_HR_FAILURE(MFStartup(MF_VERSION, MFSTARTUP_FULL),
+ "MFStartup failed.",);
+ }
+
pre_sandbox_init_done_ = true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698