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

Side by Side Diff: content/renderer/pepper_platform_video_decoder_impl.cc

Issue 7021020: Clean up video frame sizes, types in Video Decode API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responses to CR Created 9 years, 5 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 | « content/renderer/pepper_platform_video_decoder_impl.h ('k') | media/video/picture.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_platform_video_decoder_impl.h" 5 #include "content/renderer/pepper_platform_video_decoder_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 decoder_ = channel->CreateVideoDecoder( 49 decoder_ = channel->CreateVideoDecoder(
50 command_buffer_route_id_, configs, cmd_buffer_helper_, this); 50 command_buffer_route_id_, configs, cmd_buffer_helper_, this);
51 return true; 51 return true;
52 } 52 }
53 53
54 void PlatformVideoDecoderImpl::Decode(const BitstreamBuffer& bitstream_buffer) { 54 void PlatformVideoDecoderImpl::Decode(const BitstreamBuffer& bitstream_buffer) {
55 DCHECK(decoder_); 55 DCHECK(decoder_);
56 decoder_->Decode(bitstream_buffer); 56 decoder_->Decode(bitstream_buffer);
57 } 57 }
58 58
59 void PlatformVideoDecoderImpl::AssignGLESBuffers( 59 void PlatformVideoDecoderImpl::AssignPictureBuffers(
60 const std::vector<media::GLESBuffer>& buffers) { 60 const std::vector<media::PictureBuffer>& buffers) {
61 DCHECK(decoder_); 61 DCHECK(decoder_);
62 decoder_->AssignGLESBuffers(buffers); 62 decoder_->AssignPictureBuffers(buffers);
63 } 63 }
64 64
65 void PlatformVideoDecoderImpl::ReusePictureBuffer( 65 void PlatformVideoDecoderImpl::ReusePictureBuffer(
66 int32 picture_buffer_id) { 66 int32 picture_buffer_id) {
67 DCHECK(decoder_); 67 DCHECK(decoder_);
68 decoder_->ReusePictureBuffer(picture_buffer_id); 68 decoder_->ReusePictureBuffer(picture_buffer_id);
69 } 69 }
70 70
71 void PlatformVideoDecoderImpl::Flush() { 71 void PlatformVideoDecoderImpl::Flush() {
72 DCHECK(decoder_); 72 DCHECK(decoder_);
(...skipping 16 matching lines...) Expand all
89 } 89 }
90 90
91 void PlatformVideoDecoderImpl::NotifyError( 91 void PlatformVideoDecoderImpl::NotifyError(
92 VideoDecodeAccelerator::Error error) { 92 VideoDecodeAccelerator::Error error) {
93 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 93 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
94 client_->NotifyError(error); 94 client_->NotifyError(error);
95 } 95 }
96 96
97 void PlatformVideoDecoderImpl::ProvidePictureBuffers( 97 void PlatformVideoDecoderImpl::ProvidePictureBuffers(
98 uint32 requested_num_of_buffers, 98 uint32 requested_num_of_buffers,
99 const gfx::Size& dimensions, 99 const gfx::Size& dimensions) {
100 media::VideoDecodeAccelerator::MemoryType type) {
101 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 100 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
102 client_->ProvidePictureBuffers(requested_num_of_buffers, dimensions, type); 101 client_->ProvidePictureBuffers(requested_num_of_buffers, dimensions);
103 } 102 }
104 103
105 void PlatformVideoDecoderImpl::DismissPictureBuffer(int32 picture_buffer_id) { 104 void PlatformVideoDecoderImpl::DismissPictureBuffer(int32 picture_buffer_id) {
106 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 105 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
107 client_->DismissPictureBuffer(picture_buffer_id); 106 client_->DismissPictureBuffer(picture_buffer_id);
108 } 107 }
109 108
110 void PlatformVideoDecoderImpl::PictureReady(const media::Picture& picture) { 109 void PlatformVideoDecoderImpl::PictureReady(const media::Picture& picture) {
111 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 110 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
112 client_->PictureReady(picture); 111 client_->PictureReady(picture);
(...skipping 12 matching lines...) Expand all
125 124
126 void PlatformVideoDecoderImpl::NotifyFlushDone() { 125 void PlatformVideoDecoderImpl::NotifyFlushDone() {
127 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 126 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
128 client_->NotifyFlushDone(); 127 client_->NotifyFlushDone();
129 } 128 }
130 129
131 void PlatformVideoDecoderImpl::NotifyResetDone() { 130 void PlatformVideoDecoderImpl::NotifyResetDone() {
132 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current()); 131 DCHECK_EQ(RenderThread::current()->message_loop(), MessageLoop::current());
133 client_->NotifyResetDone(); 132 client_->NotifyResetDone();
134 } 133 }
OLDNEW
« no previous file with comments | « content/renderer/pepper_platform_video_decoder_impl.h ('k') | media/video/picture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698