| Index: content/renderer/pepper/video_decoder_shim.cc
|
| diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
|
| index b7bd4cec50cd15ce8a0b215b1ae0a55658b6b88a..ca5e551c8167238ef525e3fa34869a619461903e 100644
|
| --- a/content/renderer/pepper/video_decoder_shim.cc
|
| +++ b/content/renderer/pepper/video_decoder_shim.cc
|
| @@ -633,7 +633,7 @@
|
| void Stop();
|
|
|
| private:
|
| - void OnInitDone(bool success);
|
| + void OnPipelineStatus(media::PipelineStatus status);
|
| void DoDecode();
|
| void OnDecodeComplete(media::VideoDecoder::Status status);
|
| void OnOutputComplete(const scoped_refptr<media::VideoFrame>& frame);
|
| @@ -692,7 +692,7 @@
|
|
|
| decoder_->Initialize(
|
| config, true /* low_delay */,
|
| - base::Bind(&VideoDecoderShim::DecoderImpl::OnInitDone,
|
| + base::Bind(&VideoDecoderShim::DecoderImpl::OnPipelineStatus,
|
| weak_ptr_factory_.GetWeakPtr()),
|
| base::Bind(&VideoDecoderShim::DecoderImpl::OnOutputComplete,
|
| weak_ptr_factory_.GetWeakPtr()));
|
| @@ -731,8 +731,20 @@
|
| // This instance is deleted once we exit this scope.
|
| }
|
|
|
| -void VideoDecoderShim::DecoderImpl::OnInitDone(bool success) {
|
| - int32_t result = success ? PP_OK : PP_ERROR_NOTSUPPORTED;
|
| +void VideoDecoderShim::DecoderImpl::OnPipelineStatus(
|
| + media::PipelineStatus status) {
|
| + int32_t result;
|
| + switch (status) {
|
| + case media::PIPELINE_OK:
|
| + result = PP_OK;
|
| + break;
|
| + case media::DECODER_ERROR_NOT_SUPPORTED:
|
| + result = PP_ERROR_NOTSUPPORTED;
|
| + break;
|
| + default:
|
| + result = PP_ERROR_FAILED;
|
| + break;
|
| + }
|
|
|
| // Calculate how many textures the shim should create.
|
| uint32_t shim_texture_pool_size = media::limits::kMaxVideoFrames + 1;
|
|
|