| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 273 } |
| 274 | 274 |
| 275 void PPB_VideoDecoder_Impl::NotifyError( | 275 void PPB_VideoDecoder_Impl::NotifyError( |
| 276 media::VideoDecodeAccelerator::Error error) { | 276 media::VideoDecodeAccelerator::Error error) { |
| 277 DCHECK(RenderThreadImpl::current()); | 277 DCHECK(RenderThreadImpl::current()); |
| 278 if (!GetPPP()) | 278 if (!GetPPP()) |
| 279 return; | 279 return; |
| 280 | 280 |
| 281 PP_VideoDecodeError_Dev pp_error = MediaToPPError(error); | 281 PP_VideoDecodeError_Dev pp_error = MediaToPPError(error); |
| 282 GetPPP()->NotifyError(pp_instance(), pp_resource(), pp_error); | 282 GetPPP()->NotifyError(pp_instance(), pp_resource(), pp_error); |
| 283 UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderError", | 283 UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderError", error, |
| 284 error, | 284 media::VideoDecodeAccelerator::ERROR_MAX + 1); |
| 285 media::VideoDecodeAccelerator::LARGEST_ERROR_ENUM); | |
| 286 } | 285 } |
| 287 | 286 |
| 288 void PPB_VideoDecoder_Impl::NotifyResetDone() { | 287 void PPB_VideoDecoder_Impl::NotifyResetDone() { |
| 289 DCHECK(RenderThreadImpl::current()); | 288 DCHECK(RenderThreadImpl::current()); |
| 290 RunResetCallback(PP_OK); | 289 RunResetCallback(PP_OK); |
| 291 } | 290 } |
| 292 | 291 |
| 293 void PPB_VideoDecoder_Impl::NotifyEndOfBitstreamBuffer( | 292 void PPB_VideoDecoder_Impl::NotifyEndOfBitstreamBuffer( |
| 294 int32_t bitstream_buffer_id) { | 293 int32_t bitstream_buffer_id) { |
| 295 DCHECK(RenderThreadImpl::current()); | 294 DCHECK(RenderThreadImpl::current()); |
| 296 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); | 295 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); |
| 297 } | 296 } |
| 298 | 297 |
| 299 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 298 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
| 300 DCHECK(RenderThreadImpl::current()); | 299 DCHECK(RenderThreadImpl::current()); |
| 301 RunFlushCallback(PP_OK); | 300 RunFlushCallback(PP_OK); |
| 302 } | 301 } |
| 303 | 302 |
| 304 } // namespace content | 303 } // namespace content |
| OLD | NEW |