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

Side by Side Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.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, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" 5 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "content/common/gpu/client/gpu_channel_host.h" 10 #include "content/common/gpu/client/gpu_channel_host.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (!channel_) 110 if (!channel_)
111 return; 111 return;
112 112
113 base::SharedMemoryHandle handle = channel_->ShareToGpuProcess( 113 base::SharedMemoryHandle handle = channel_->ShareToGpuProcess(
114 bitstream_buffer.handle()); 114 bitstream_buffer.handle());
115 if (!base::SharedMemory::IsHandleValid(handle)) { 115 if (!base::SharedMemory::IsHandleValid(handle)) {
116 NOTREACHED() << "Failed to duplicate buffer handler"; 116 NOTREACHED() << "Failed to duplicate buffer handler";
117 return; 117 return;
118 } 118 }
119 119
120 Send(new AcceleratedVideoDecoderMsg_Decode( 120 AcceleratedVideoDecoderMsg_Decode_Params params;
121 decoder_route_id_, handle, bitstream_buffer.id(), bitstream_buffer.size(), 121 params.bitstream_buffer_id = bitstream_buffer.id();
122 bitstream_buffer.presentation_timestamp())); 122 params.buffer_handle = handle;
123 params.size = bitstream_buffer.size();
124 params.presentation_timestamp = bitstream_buffer.presentation_timestamp();
125 params.key_id = bitstream_buffer.key_id();
126 params.iv = bitstream_buffer.iv();
127 params.subsamples = bitstream_buffer.subsamples();
128
129 Send(new AcceleratedVideoDecoderMsg_Decode(decoder_route_id_, params));
123 } 130 }
124 131
125 void GpuVideoDecodeAcceleratorHost::AssignPictureBuffers( 132 void GpuVideoDecodeAcceleratorHost::AssignPictureBuffers(
126 const std::vector<media::PictureBuffer>& buffers) { 133 const std::vector<media::PictureBuffer>& buffers) {
127 DCHECK(CalledOnValidThread()); 134 DCHECK(CalledOnValidThread());
128 if (!channel_) 135 if (!channel_)
129 return; 136 return;
130 // Rearrange data for IPC command. 137 // Rearrange data for IPC command.
131 std::vector<int32> buffer_ids; 138 std::vector<int32> buffer_ids;
132 std::vector<uint32> texture_ids; 139 std::vector<uint32> texture_ids;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 weak_this_factory_.InvalidateWeakPtrs(); 267 weak_this_factory_.InvalidateWeakPtrs();
261 268
262 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the 269 // Client::NotifyError() may Destroy() |this|, so calling it needs to be the
263 // last thing done on this stack! 270 // last thing done on this stack!
264 media::VideoDecodeAccelerator::Client* client = NULL; 271 media::VideoDecodeAccelerator::Client* client = NULL;
265 std::swap(client, client_); 272 std::swap(client, client_);
266 client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error)); 273 client->NotifyError(static_cast<media::VideoDecodeAccelerator::Error>(error));
267 } 274 }
268 275
269 } // namespace content 276 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698