OLD | NEW |
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 "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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 platform_video_decoder_->Reset(); | 183 platform_video_decoder_->Reset(); |
184 return PP_OK_COMPLETIONPENDING; | 184 return PP_OK_COMPLETIONPENDING; |
185 } | 185 } |
186 | 186 |
187 void PPB_VideoDecoder_Impl::Destroy() { | 187 void PPB_VideoDecoder_Impl::Destroy() { |
188 if (!platform_video_decoder_) | 188 if (!platform_video_decoder_) |
189 return; | 189 return; |
190 | 190 |
191 FlushCommandBuffer(); | 191 FlushCommandBuffer(); |
192 platform_video_decoder_->Destroy(); | 192 platform_video_decoder_->Destroy(); |
193 ::ppapi::VideoDecoderImpl::Destroy(); | 193 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); |
194 platform_video_decoder_ = NULL; | 194 platform_video_decoder_ = NULL; |
195 ppp_videodecoder_ = NULL; | 195 ppp_videodecoder_ = NULL; |
196 } | 196 } |
197 | 197 |
198 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( | 198 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( |
199 uint32 requested_num_of_buffers, const gfx::Size& dimensions) { | 199 uint32 requested_num_of_buffers, const gfx::Size& dimensions) { |
200 if (!ppp_videodecoder_) | 200 if (!ppp_videodecoder_) |
201 return; | 201 return; |
202 | 202 |
203 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); | 203 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 253 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
254 RunFlushCallback(PP_OK); | 254 RunFlushCallback(PP_OK); |
255 } | 255 } |
256 | 256 |
257 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { | 257 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { |
258 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; | 258 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; |
259 } | 259 } |
260 | 260 |
261 } // namespace ppapi | 261 } // namespace ppapi |
262 } // namespace webkit | 262 } // namespace webkit |
OLD | NEW |