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

Side by Side Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.cc

Issue 10392141: Plumb texture target to VideoDecodeAccelerator::Client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 8 years, 6 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_video_decoder_impl.h ('k') | no next file » | 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 "webkit/plugins/ppapi/ppb_video_decoder_impl.h" 5 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return; 213 return;
214 214
215 FlushCommandBuffer(); 215 FlushCommandBuffer();
216 platform_video_decoder_->Destroy(); 216 platform_video_decoder_->Destroy();
217 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); 217 ::ppapi::PPB_VideoDecoder_Shared::Destroy();
218 platform_video_decoder_ = NULL; 218 platform_video_decoder_ = NULL;
219 ppp_videodecoder_ = NULL; 219 ppp_videodecoder_ = NULL;
220 } 220 }
221 221
222 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( 222 void PPB_VideoDecoder_Impl::ProvidePictureBuffers(
223 uint32 requested_num_of_buffers, const gfx::Size& dimensions) { 223 uint32 requested_num_of_buffers,
224 const gfx::Size& dimensions,
225 uint32 texture_target) {
224 if (!ppp_videodecoder_) 226 if (!ppp_videodecoder_)
225 return; 227 return;
226 228
227 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); 229 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height());
228 ppp_videodecoder_->ProvidePictureBuffers(pp_instance(), pp_resource(), 230 ppp_videodecoder_->ProvidePictureBuffers(pp_instance(), pp_resource(),
229 requested_num_of_buffers, &out_dim); 231 requested_num_of_buffers, &out_dim, texture_target);
230 } 232 }
231 233
232 void PPB_VideoDecoder_Impl::PictureReady(const media::Picture& picture) { 234 void PPB_VideoDecoder_Impl::PictureReady(const media::Picture& picture) {
233 if (!ppp_videodecoder_) 235 if (!ppp_videodecoder_)
234 return; 236 return;
235 237
236 PP_Picture_Dev output; 238 PP_Picture_Dev output;
237 output.picture_buffer_id = picture.picture_buffer_id(); 239 output.picture_buffer_id = picture.picture_buffer_id();
238 output.bitstream_buffer_id = picture.bitstream_buffer_id(); 240 output.bitstream_buffer_id = picture.bitstream_buffer_id();
239 ppp_videodecoder_->PictureReady(pp_instance(), pp_resource(), &output); 241 ppp_videodecoder_->PictureReady(pp_instance(), pp_resource(), &output);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 273 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
272 RunFlushCallback(PP_OK); 274 RunFlushCallback(PP_OK);
273 } 275 }
274 276
275 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { 277 void PPB_VideoDecoder_Impl::NotifyInitializeDone() {
276 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; 278 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!";
277 } 279 }
278 280
279 } // namespace ppapi 281 } // namespace ppapi
280 } // namespace webkit 282 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_video_decoder_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698