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

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: rebase Created 4 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: 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 b02f45ecdfcc23de46dc82e223bb7e69b5b8590a..abf37769f7cef53617262c3ec58443d2af14ecf5 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -333,7 +333,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;
}
@@ -374,7 +374,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;
}
@@ -504,7 +504,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) << __func__
@@ -1452,8 +1452,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);
}
bool AndroidVideoDecodeAccelerator::UpdateSurface() {

Powered by Google App Engine
This is Rietveld 408576698