| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/dxva_video_decode_accelerator_win.h" | 5 #include "media/gpu/dxva_video_decode_accelerator_win.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #if !defined(OS_WIN) | 9 #if !defined(OS_WIN) |
| 10 #error This file should only be built on Windows. | 10 #error This file should only be built on Windows. |
| (...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 return profiles; | 1247 return profiles; |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 // static | 1250 // static |
| 1251 void DXVAVideoDecodeAccelerator::PreSandboxInitialization() { | 1251 void DXVAVideoDecodeAccelerator::PreSandboxInitialization() { |
| 1252 g_catcher_tls_slot.Initialize(nullptr); | 1252 g_catcher_tls_slot.Initialize(nullptr); |
| 1253 for (const wchar_t* mfdll : kMediaFoundationVideoDecoderDLLs) | 1253 for (const wchar_t* mfdll : kMediaFoundationVideoDecoderDLLs) |
| 1254 ::LoadLibrary(mfdll); | 1254 ::LoadLibrary(mfdll); |
| 1255 ::LoadLibrary(L"dxva2.dll"); | 1255 ::LoadLibrary(L"dxva2.dll"); |
| 1256 | 1256 |
| 1257 if (base::win::GetVersion() > base::win::VERSION_WIN7) { | 1257 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 1258 LoadLibrary(L"msvproc.dll"); | 1258 LoadLibrary(L"msvproc.dll"); |
| 1259 } else { | 1259 } else { |
| 1260 #if defined(ENABLE_DX11_FOR_WIN7) | 1260 #if defined(ENABLE_DX11_FOR_WIN7) |
| 1261 LoadLibrary(L"mshtmlmedia.dll"); | 1261 LoadLibrary(L"mshtmlmedia.dll"); |
| 1262 #endif | 1262 #endif |
| 1263 } | 1263 } |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 // static | 1266 // static |
| 1267 std::pair<int, int> DXVAVideoDecodeAccelerator::GetMinResolution( | 1267 std::pair<int, int> DXVAVideoDecodeAccelerator::GetMinResolution( |
| (...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3080 return false; | 3080 return false; |
| 3081 } | 3081 } |
| 3082 NOTREACHED(); | 3082 NOTREACHED(); |
| 3083 return false; | 3083 return false; |
| 3084 } | 3084 } |
| 3085 ID3D11Device* DXVAVideoDecodeAccelerator::D3D11Device() const { | 3085 ID3D11Device* DXVAVideoDecodeAccelerator::D3D11Device() const { |
| 3086 return ShouldUseANGLEDevice() ? angle_device_.Get() : d3d11_device_.Get(); | 3086 return ShouldUseANGLEDevice() ? angle_device_.Get() : d3d11_device_.Get(); |
| 3087 } | 3087 } |
| 3088 | 3088 |
| 3089 } // namespace media | 3089 } // namespace media |
| OLD | NEW |