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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2058113002: Add 'cbcs' encryption scheme support in Android media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change Android version probing Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: media/gpu/android_video_decode_accelerator.cc
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 55eb7384b1f4486e15c99fd70a30b5ef22048ef8..d900c62ccac30015f7f85c480c25be2efbd542a9 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -419,7 +419,7 @@ bool AndroidVideoDecodeAccelerator::Initialize(const Config& config,
// We signaled that we support deferred initialization, so see if the client
// does also.
deferred_initialization_pending_ = config.is_deferred_initialization_allowed;
- if (config_.is_encrypted && !deferred_initialization_pending_) {
+ if (config_.is_encrypted() && !deferred_initialization_pending_) {
DLOG(ERROR) << "Deferred initialization must be used for encrypted streams";
return false;
}
@@ -465,7 +465,7 @@ bool AndroidVideoDecodeAccelerator::InitializePictureBufferManager() {
return false;
// If we are encrypted, then we aren't able to create the codec yet.
- if (config_.is_encrypted) {
+ if (config_.is_encrypted()) {
InitializeCdm();
return true;
}
@@ -596,7 +596,7 @@ bool AndroidVideoDecodeAccelerator::QueueInput() {
} else {
status = media_codec_->QueueSecureInputBuffer(
input_buf_index, memory, bitstream_buffer.size(), key_id, iv,
- subsamples, presentation_timestamp);
+ subsamples, config_.encryption_scheme, presentation_timestamp);
}
DVLOG(2) << __FUNCTION__
@@ -1590,8 +1590,8 @@ bool AndroidVideoDecodeAccelerator::IsMediaCodecSoftwareDecodingForbidden()
const {
// Prevent MediaCodec from using its internal software decoders when we have
// more secure and up to date versions in the renderer process.
- return !config_.is_encrypted && (codec_config_->codec_ == kCodecVP8 ||
- codec_config_->codec_ == kCodecVP9);
+ return !config_.is_encrypted() && (codec_config_->codec_ == kCodecVP8 ||
+ codec_config_->codec_ == kCodecVP9);
}
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698