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

Side by Side Diff: content/common/gpu/media/dxva_video_decode_accelerator_win.cc

Issue 1769593002: Add 4 VP9 profiles to the media::VideoCodecProfile enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hevc-codec-7
Patch Set: Better TODOs Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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_win.h" 5 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 } // namespace 117 } // namespace
118 118
119 namespace content { 119 namespace content {
120 120
121 static const media::VideoCodecProfile kSupportedProfiles[] = { 121 static const media::VideoCodecProfile kSupportedProfiles[] = {
122 media::H264PROFILE_BASELINE, 122 media::H264PROFILE_BASELINE,
123 media::H264PROFILE_MAIN, 123 media::H264PROFILE_MAIN,
124 media::H264PROFILE_HIGH, 124 media::H264PROFILE_HIGH,
125 media::VP8PROFILE_ANY, 125 media::VP8PROFILE_ANY,
126 media::VP9PROFILE_ANY 126 media::VP9PROFILE_PROFILE0,
127 media::VP9PROFILE_PROFILE1,
128 media::VP9PROFILE_PROFILE2,
129 media::VP9PROFILE_PROFILE3
127 }; 130 };
128 131
129 CreateDXGIDeviceManager DXVAVideoDecodeAccelerator::create_dxgi_device_manager_ 132 CreateDXGIDeviceManager DXVAVideoDecodeAccelerator::create_dxgi_device_manager_
130 = NULL; 133 = NULL;
131 134
132 #define RETURN_ON_FAILURE(result, log, ret) \ 135 #define RETURN_ON_FAILURE(result, log, ret) \
133 do { \ 136 do { \
134 if (!(result)) { \ 137 if (!(result)) { \
135 DLOG(ERROR) << log; \ 138 DLOG(ERROR) << log; \
136 return ret; \ 139 return ret; \
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 RETURN_ON_FAILURE(version_info, 1252 RETURN_ON_FAILURE(version_info,
1250 "unable to get version of msmpeg2vdec.dll", 1253 "unable to get version of msmpeg2vdec.dll",
1251 false); 1254 false);
1252 base::string16 file_version = version_info->file_version(); 1255 base::string16 file_version = version_info->file_version();
1253 RETURN_ON_FAILURE(file_version.find(L"6.1.7140") == base::string16::npos, 1256 RETURN_ON_FAILURE(file_version.find(L"6.1.7140") == base::string16::npos,
1254 "blacklisted version of msmpeg2vdec.dll 6.1.7140", 1257 "blacklisted version of msmpeg2vdec.dll 6.1.7140",
1255 false); 1258 false);
1256 codec_ = media::kCodecH264; 1259 codec_ = media::kCodecH264;
1257 clsid = __uuidof(CMSH264DecoderMFT); 1260 clsid = __uuidof(CMSH264DecoderMFT);
1258 } else if ((profile == media::VP8PROFILE_ANY || 1261 } else if ((profile == media::VP8PROFILE_ANY ||
1259 profile == media::VP9PROFILE_ANY) && 1262 profile == media::VP9PROFILE_PROFILE0 ||
1263 profile == media::VP9PROFILE_PROFILE1 ||
1264 profile == media::VP9PROFILE_PROFILE2 ||
1265 profile == media::VP9PROFILE_PROFILE3) &&
1260 base::CommandLine::ForCurrentProcess()->HasSwitch( 1266 base::CommandLine::ForCurrentProcess()->HasSwitch(
1261 switches::kEnableAcceleratedVpxDecode)) { 1267 switches::kEnableAcceleratedVpxDecode)) {
1262 int program_files_key = base::DIR_PROGRAM_FILES; 1268 int program_files_key = base::DIR_PROGRAM_FILES;
1263 if (base::win::OSInfo::GetInstance()->wow64_status() == 1269 if (base::win::OSInfo::GetInstance()->wow64_status() ==
1264 base::win::OSInfo::WOW64_ENABLED) { 1270 base::win::OSInfo::WOW64_ENABLED) {
1265 program_files_key = base::DIR_PROGRAM_FILES6432; 1271 program_files_key = base::DIR_PROGRAM_FILES6432;
1266 } 1272 }
1267 1273
1268 base::FilePath dll_path; 1274 base::FilePath dll_path;
1269 RETURN_ON_FAILURE(PathService::Get(program_files_key, &dll_path), 1275 RETURN_ON_FAILURE(PathService::Get(program_files_key, &dll_path),
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 } 2462 }
2457 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false); 2463 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false);
2458 return true; 2464 return true;
2459 } 2465 }
2460 media_type.Release(); 2466 media_type.Release();
2461 } 2467 }
2462 return false; 2468 return false;
2463 } 2469 }
2464 2470
2465 } // namespace content 2471 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698