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

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: 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/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..00e1bb67856e14163ea5da84a6d04a37607335de 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,18 @@ AndroidVideoDecodeAccelerator::~AndroidVideoDecodeAccelerator() {
DCHECK(thread_checker_.CalledOnValidThread());
}
-bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
+bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
Client* client) {
DCHECK(!media_codec_);
DCHECK(thread_checker_.CalledOnValidThread());
TRACE_EVENT0("media", "AVDA::Initialize");
+ DVLOG(1) << __FUNCTION__ << ": profile:" << config.profile
+ << " is_encrypted:" << config.is_encrypted;
+
client_ = client;
- codec_ = VideoCodecProfileToVideoCodec(profile);
+ codec_ = VideoCodecProfileToVideoCodec(config.profile);
+ is_encrypted_ = config.is_encrypted;
bool profile_supported = codec_ == media::kCodecVP8;
#if defined(ENABLE_MEDIA_PIPELINE_ON_ANDROID)
@@ -107,7 +112,7 @@ bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
#endif
if (!profile_supported) {
- LOG(ERROR) << "Unsupported profile: " << profile;
+ LOG(ERROR) << "Unsupported profile: " << config.profile;
return false;
}

Powered by Google App Engine
This is Rietveld 408576698