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

Side by Side Diff: content/renderer/pepper/ppb_video_decoder_impl.cc

Issue 426873004: Pass decoded picture size from VDA to client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build Created 6 years, 4 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/renderer/pepper/ppb_video_decoder_impl.h" 5 #include "content/renderer/pepper/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/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); 240 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height());
241 ppp_videodecoder_->ProvidePictureBuffers(pp_instance(), 241 ppp_videodecoder_->ProvidePictureBuffers(pp_instance(),
242 pp_resource(), 242 pp_resource(),
243 requested_num_of_buffers, 243 requested_num_of_buffers,
244 &out_dim, 244 &out_dim,
245 texture_target); 245 texture_target);
246 } 246 }
247 247
248 void PPB_VideoDecoder_Impl::PictureReady(const media::Picture& picture) { 248 void PPB_VideoDecoder_Impl::PictureReady(const media::Picture& picture) {
249 // So far picture.visible_rect is not used. If used, visible_rect should
250 // be validated since it comes from GPU process and may not be trustworthy.
249 DCHECK(RenderThreadImpl::current()); 251 DCHECK(RenderThreadImpl::current());
250 if (!ppp_videodecoder_) 252 if (!ppp_videodecoder_)
251 return; 253 return;
252 254
253 PP_Picture_Dev output; 255 PP_Picture_Dev output;
254 output.picture_buffer_id = picture.picture_buffer_id(); 256 output.picture_buffer_id = picture.picture_buffer_id();
255 output.bitstream_buffer_id = picture.bitstream_buffer_id(); 257 output.bitstream_buffer_id = picture.bitstream_buffer_id();
256 ppp_videodecoder_->PictureReady(pp_instance(), pp_resource(), &output); 258 ppp_videodecoder_->PictureReady(pp_instance(), pp_resource(), &output);
257 } 259 }
258 260
(...skipping 28 matching lines...) Expand all
287 DCHECK(RenderThreadImpl::current()); 289 DCHECK(RenderThreadImpl::current());
288 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); 290 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK);
289 } 291 }
290 292
291 void PPB_VideoDecoder_Impl::NotifyFlushDone() { 293 void PPB_VideoDecoder_Impl::NotifyFlushDone() {
292 DCHECK(RenderThreadImpl::current()); 294 DCHECK(RenderThreadImpl::current());
293 RunFlushCallback(PP_OK); 295 RunFlushCallback(PP_OK);
294 } 296 }
295 297
296 } // namespace content 298 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_decoder_host.cc ('k') | content/renderer/pepper/video_decoder_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698