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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 10408003: Plumb extra_data() to VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rev interface versino Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
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_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 proxies_[route_id] = command_buffer; 175 proxies_[route_id] = command_buffer;
176 return command_buffer; 176 return command_buffer;
177 #else 177 #else
178 return NULL; 178 return NULL;
179 #endif 179 #endif
180 } 180 }
181 181
182 GpuVideoDecodeAcceleratorHost* GpuChannelHost::CreateVideoDecoder( 182 GpuVideoDecodeAcceleratorHost* GpuChannelHost::CreateVideoDecoder(
183 int command_buffer_route_id, 183 int command_buffer_route_id,
184 media::VideoCodecProfile profile, 184 media::VideoCodecProfile profile,
185 const gfx::Size& frame_size,
186 const std::vector<uint8_t>& extra_data,
185 media::VideoDecodeAccelerator::Client* client) { 187 media::VideoDecodeAccelerator::Client* client) {
186 AutoLock lock(context_lock_); 188 AutoLock lock(context_lock_);
187 ProxyMap::iterator it = proxies_.find(command_buffer_route_id); 189 ProxyMap::iterator it = proxies_.find(command_buffer_route_id);
188 DCHECK(it != proxies_.end()); 190 DCHECK(it != proxies_.end());
189 CommandBufferProxyImpl* proxy = it->second; 191 CommandBufferProxyImpl* proxy = it->second;
190 return proxy->CreateVideoDecoder(profile, client); 192 return proxy->CreateVideoDecoder(profile, frame_size, extra_data, client);
191 } 193 }
192 194
193 void GpuChannelHost::DestroyCommandBuffer( 195 void GpuChannelHost::DestroyCommandBuffer(
194 CommandBufferProxy* command_buffer) { 196 CommandBufferProxy* command_buffer) {
195 #if defined(ENABLE_GPU) 197 #if defined(ENABLE_GPU)
196 AutoLock lock(context_lock_); 198 AutoLock lock(context_lock_);
197 int route_id = command_buffer->GetRouteID(); 199 int route_id = command_buffer->GetRouteID();
198 Send(new GpuChannelMsg_DestroyCommandBuffer(route_id)); 200 Send(new GpuChannelMsg_DestroyCommandBuffer(route_id));
199 // Check the proxy has not already been removed after a channel error. 201 // Check the proxy has not already been removed after a channel error.
200 if (proxies_.find(route_id) != proxies_.end()) 202 if (proxies_.find(route_id) != proxies_.end())
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 306 }
305 307
306 listeners_.clear(); 308 listeners_.clear();
307 309
308 MessageLoop* main_loop = parent_->factory_->GetMainLoop(); 310 MessageLoop* main_loop = parent_->factory_->GetMainLoop();
309 main_loop->PostTask(FROM_HERE, 311 main_loop->PostTask(FROM_HERE,
310 base::Bind(&GpuChannelHost::OnChannelError, parent_)); 312 base::Bind(&GpuChannelHost::OnChannelError, parent_));
311 } 313 }
312 314
313 315
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.h ('k') | content/common/gpu/client/gpu_video_decode_accelerator_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698