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

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

Issue 1485043002: Passed is_encrypted parameter to the VDA initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 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
Index: content/common/gpu/media/dxva_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc
index 33ac9a775a47402e6d4cc2b21fd79cf097cbcbe1..4345f797d27adb6d36aadfd2998282c94919f1e9 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc
@@ -632,15 +632,20 @@ DXVAVideoDecodeAccelerator::~DXVAVideoDecodeAccelerator() {
client_ = NULL;
}
-bool DXVAVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
- Client* client) {
+bool DXVAVideoDecodeAccelerator::Initialize(const StreamParameters& params,
+ Client* client) {
+ if (params.is_encrypted) {
+ DLOG(ERROR) << "Encrypted streams are not supported for this VDA";
xhwang 2015/12/02 06:48:18 Here and below, how about NOTREACHED() << "Encryp
Tima Vaisburd 2015/12/02 22:56:58 Done.
+ return false;
+ }
+
client_ = client;
main_thread_task_runner_ = base::MessageLoop::current()->task_runner();
bool profile_supported = false;
for (const auto& supported_profile : kSupportedProfiles) {
- if (profile == supported_profile) {
+ if (params.profile == supported_profile) {
profile_supported = true;
break;
}
@@ -692,7 +697,7 @@ bool DXVAVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
media::InitializeMediaFoundation();
- RETURN_AND_NOTIFY_ON_FAILURE(InitDecoder(profile),
+ RETURN_AND_NOTIFY_ON_FAILURE(InitDecoder(params.profile),
"Failed to initialize decoder", PLATFORM_FAILURE, false);
RETURN_AND_NOTIFY_ON_FAILURE(GetStreamsInfoAndBufferReqs(),

Powered by Google App Engine
This is Rietveld 408576698