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

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

Issue 1422643002: Pass DecryptConfig parameters over IPC and use it in AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed MediaCodec.CodecException that was added only at level 21 (Android L) Created 5 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: content/common/gpu/media/gpu_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 3a0071f4245e9a3af187c686b29ddb971e25f4ff..9b6e1d7fe1420363f0f0f418b2d7d957d69409cc 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -433,13 +433,11 @@ GpuVideoDecodeAccelerator::GetSupportedProfiles() {
// Runs on IO thread if video_decode_accelerator_->CanDecodeOnIOThread() is
// true, otherwise on the main thread.
void GpuVideoDecodeAccelerator::OnDecode(
- base::SharedMemoryHandle handle,
- int32 id,
- uint32 size,
- base::TimeDelta presentation_timestamp) {
+ const AcceleratedVideoDecoderMsg_Decode_Params& params) {
DCHECK(video_decode_accelerator_.get());
- if (id < 0) {
- DLOG(ERROR) << "BitstreamBuffer id " << id << " out of range";
+ if (params.bitstream_buffer_id < 0) {
+ DLOG(ERROR) << "BitstreamBuffer id " << params.bitstream_buffer_id
+ << " out of range";
if (child_task_runner_->BelongsToCurrentThread()) {
NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
} else {
@@ -451,8 +449,16 @@ void GpuVideoDecodeAccelerator::OnDecode(
}
return;
}
- video_decode_accelerator_->Decode(
- media::BitstreamBuffer(id, handle, size, presentation_timestamp));
+
+ media::BitstreamBuffer bitstream_buffer(params.bitstream_buffer_id,
+ params.buffer_handle, params.size,
+ params.presentation_timestamp);
+ if (!params.key_id.empty()) {
+ bitstream_buffer.SetDecryptConfig(
+ media::DecryptConfig(params.key_id, params.iv, params.subsamples));
+ }
+
+ video_decode_accelerator_->Decode(bitstream_buffer);
}
void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.h ('k') | content/common/media/media_player_messages_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698