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

Unified Diff: content/common/gpu/media/android_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: Deleted erroneously added files Created 5 years, 1 month 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/android_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index 3f1e8774a3e52614484cf38de512a1c384f3eb80..e2237cf8953c57382cf093482a755484d9b4f580 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -81,6 +81,7 @@ AndroidVideoDecodeAccelerator::AndroidVideoDecodeAccelerator(
: client_(NULL),
make_context_current_(make_context_current),
codec_(media::kCodecH264),
+ is_encrypted_(false),
state_(NO_ERROR),
picturebuffers_requested_(false),
gl_decoder_(decoder),
@@ -91,14 +92,19 @@ AndroidVideoDecodeAccelerator::~AndroidVideoDecodeAccelerator() {
DCHECK(thread_checker_.CalledOnValidThread());
}
-bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
- Client* client) {
+bool AndroidVideoDecodeAccelerator::Initialize(
+ const media::VideoDecodeAccelerator::InitParams& params,
+ Client* client) {
DCHECK(!media_codec_);
DCHECK(thread_checker_.CalledOnValidThread());
TRACE_EVENT0("media", "AVDA::Initialize");
+ DVLOG(1) << __FUNCTION__ << ": profile:" << params.profile
+ << " is_encrypted:" << params.is_encrypted;
+
client_ = client;
- codec_ = VideoCodecProfileToVideoCodec(profile);
+ codec_ = VideoCodecProfileToVideoCodec(params.profile);
+ is_encrypted_ = params.is_encrypted;
liberato (no reviews please) 2015/12/01 14:59:35 might just want to keep a copy of the params as an
Tima Vaisburd 2015/12/02 02:25:06 |codec_| already existed. The idea was that a part
bool profile_supported = codec_ == media::kCodecVP8;
#if defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID)
@@ -107,7 +113,7 @@ bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
#endif
if (!profile_supported) {
- LOG(ERROR) << "Unsupported profile: " << profile;
+ LOG(ERROR) << "Unsupported profile: " << params.profile;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698