| 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 "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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 FlushCommandBuffer(); | 232 FlushCommandBuffer(); |
| 233 | 233 |
| 234 decoder_.reset(); | 234 decoder_.reset(); |
| 235 ppp_videodecoder_ = NULL; | 235 ppp_videodecoder_ = NULL; |
| 236 | 236 |
| 237 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); | 237 ::ppapi::PPB_VideoDecoder_Shared::Destroy(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( | 240 void PPB_VideoDecoder_Impl::ProvidePictureBuffers( |
| 241 uint32_t requested_num_of_buffers, | 241 uint32_t requested_num_of_buffers, |
| 242 media::VideoPixelFormat format, | |
| 243 uint32_t textures_per_buffer, | 242 uint32_t textures_per_buffer, |
| 244 const gfx::Size& dimensions, | 243 const gfx::Size& dimensions, |
| 245 uint32_t texture_target) { | 244 uint32_t texture_target) { |
| 246 DCHECK(RenderThreadImpl::current()); | 245 DCHECK(RenderThreadImpl::current()); |
| 247 DCHECK_EQ(1u, textures_per_buffer); | 246 DCHECK_EQ(1u, textures_per_buffer); |
| 248 if (!GetPPP()) | 247 if (!GetPPP()) |
| 249 return; | 248 return; |
| 250 | 249 |
| 251 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); | 250 PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height()); |
| 252 GetPPP()->ProvidePictureBuffers(pp_instance(), pp_resource(), | 251 GetPPP()->ProvidePictureBuffers(pp_instance(), pp_resource(), |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 DCHECK(RenderThreadImpl::current()); | 296 DCHECK(RenderThreadImpl::current()); |
| 298 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); | 297 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); |
| 299 } | 298 } |
| 300 | 299 |
| 301 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 300 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
| 302 DCHECK(RenderThreadImpl::current()); | 301 DCHECK(RenderThreadImpl::current()); |
| 303 RunFlushCallback(PP_OK); | 302 RunFlushCallback(PP_OK); |
| 304 } | 303 } |
| 305 | 304 |
| 306 } // namespace content | 305 } // namespace content |
| OLD | NEW |