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 "content/common/gpu/media/dxva_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
6 | 6 |
7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
10 | 10 |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 "unable to get version of msmpeg2vdec.dll", | 934 "unable to get version of msmpeg2vdec.dll", |
935 false); | 935 false); |
936 base::string16 file_version = version_info->file_version(); | 936 base::string16 file_version = version_info->file_version(); |
937 RETURN_ON_FAILURE(file_version.find(L"6.1.7140") == base::string16::npos, | 937 RETURN_ON_FAILURE(file_version.find(L"6.1.7140") == base::string16::npos, |
938 "blacklisted version of msmpeg2vdec.dll 6.7.7140", | 938 "blacklisted version of msmpeg2vdec.dll 6.7.7140", |
939 false); | 939 false); |
940 codec_ = media::kCodecH264; | 940 codec_ = media::kCodecH264; |
941 } else if (profile == media::VP8PROFILE_ANY || | 941 } else if (profile == media::VP8PROFILE_ANY || |
942 profile == media::VP9PROFILE_ANY) { | 942 profile == media::VP9PROFILE_ANY) { |
943 base::FilePath dll_path; | 943 base::FilePath dll_path; |
944 RETURN_ON_FAILURE(PathService::Get(base::DIR_PROGRAM_FILES, &dll_path), | 944 RETURN_ON_FAILURE(PathService::Get(base::DIR_PROGRAM_FILES6432, &dll_path), |
945 "failed to get path for DIR_PROGRAM_FILES", false); | 945 "failed to get path for DIR_PROGRAM_FILES6432", false); |
946 dll_path = dll_path.Append(kVPXDecoderDLLPath); | 946 dll_path = dll_path.Append(kVPXDecoderDLLPath); |
947 if (profile == media::VP8PROFILE_ANY) { | 947 if (profile == media::VP8PROFILE_ANY) { |
948 codec_ = media::kCodecVP8; | 948 codec_ = media::kCodecVP8; |
949 dll_path = dll_path.Append(kVP8DecoderDLLName); | 949 dll_path = dll_path.Append(kVP8DecoderDLLName); |
950 } else { | 950 } else { |
951 codec_ = media::kCodecVP9; | 951 codec_ = media::kCodecVP9; |
952 dll_path = dll_path.Append(kVP9DecoderDLLName); | 952 dll_path = dll_path.Append(kVP9DecoderDLLName); |
953 } | 953 } |
954 decoder_dll = ::LoadLibraryEx(dll_path.value().data(), NULL, | 954 decoder_dll = ::LoadLibraryEx(dll_path.value().data(), NULL, |
955 LOAD_WITH_ALTERED_SEARCH_PATH); | 955 LOAD_WITH_ALTERED_SEARCH_PATH); |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2139 D3DSURFACE_DESC surface_desc; | 2139 D3DSURFACE_DESC surface_desc; |
2140 hr = surface->GetDesc(&surface_desc); | 2140 hr = surface->GetDesc(&surface_desc); |
2141 RETURN_ON_HR_FAILURE(hr, "Failed to get surface description", false); | 2141 RETURN_ON_HR_FAILURE(hr, "Failed to get surface description", false); |
2142 *width = surface_desc.Width; | 2142 *width = surface_desc.Width; |
2143 *height = surface_desc.Height; | 2143 *height = surface_desc.Height; |
2144 } | 2144 } |
2145 return true; | 2145 return true; |
2146 } | 2146 } |
2147 | 2147 |
2148 } // namespace content | 2148 } // namespace content |
OLD | NEW |