Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 | 199 |
| 200 if (!SetResetCallback(callback)) | 200 if (!SetResetCallback(callback)) |
| 201 return PP_ERROR_INPROGRESS; | 201 return PP_ERROR_INPROGRESS; |
| 202 | 202 |
| 203 FlushCommandBuffer(); | 203 FlushCommandBuffer(); |
| 204 platform_video_decoder_->Reset(); | 204 platform_video_decoder_->Reset(); |
| 205 return PP_OK_COMPLETIONPENDING; | 205 return PP_OK_COMPLETIONPENDING; |
| 206 } | 206 } |
| 207 | 207 |
| 208 void PPB_VideoDecoder_Impl::Destroy() { | 208 void PPB_VideoDecoder_Impl::Destroy() { |
| 209 if (!platform_video_decoder_.get()) | 209 if (platform_video_decoder_) |
| 210 return; | 210 platform_video_decoder_.release()->Destroy(); |
| 211 | 211 |
| 212 FlushCommandBuffer(); | 212 FlushCommandBuffer(); |
| 213 platform_video_decoder_.release()->Destroy(); | |
| 214 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); | 213 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); |
| 215 ppp_videodecoder_ = NULL; | 214 ppp_videodecoder_ = NULL; |
|
danakj
2013/03/27 22:56:04
I'll move this above too. "Clean up the subclass b
| |
| 216 } | 215 } |
| 217 | 216 |
| 218 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( | 217 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( |
| 219 uint32 requested_num_of_buffers, | 218 uint32 requested_num_of_buffers, |
| 220 const gfx::Size& dimensions, | 219 const gfx::Size& dimensions, |
| 221 uint32 texture_target) { | 220 uint32 texture_target) { |
| 222 if (!ppp_videodecoder_) | 221 if (!ppp_videodecoder_) |
| 223 return; | 222 return; |
| 224 | 223 |
| 225 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); | 224 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 268 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
| 270 RunFlushCallback(PP_OK); | 269 RunFlushCallback(PP_OK); |
| 271 } | 270 } |
| 272 | 271 |
| 273 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { | 272 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { |
| 274 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; | 273 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; |
| 275 } | 274 } |
| 276 | 275 |
| 277 } // namespace ppapi | 276 } // namespace ppapi |
| 278 } // namespace webkit | 277 } // namespace webkit |
| OLD | NEW |