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

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: 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 0de11bef3e5fcc7be44598ed03afdbebbee0b435..0e773ff40c6a41fcc245248d75a6352c0e45b803 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -431,13 +431,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 {
@@ -449,8 +447,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.SetDecryptParams(
+ media::DecryptConfig(params.key_id, params.iv, params.subsamples));
+ }
+
+ video_decode_accelerator_->Decode(bitstream_buffer);
}
void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(

Powered by Google App Engine
This is Rietveld 408576698