| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 case PP_VIDEODECODER_H264PROFILE_SCALABLEBASELINE: | 60 case PP_VIDEODECODER_H264PROFILE_SCALABLEBASELINE: |
| 61 return media::H264PROFILE_SCALABLEBASELINE; | 61 return media::H264PROFILE_SCALABLEBASELINE; |
| 62 case PP_VIDEODECODER_H264PROFILE_SCALABLEHIGH: | 62 case PP_VIDEODECODER_H264PROFILE_SCALABLEHIGH: |
| 63 return media::H264PROFILE_SCALABLEHIGH; | 63 return media::H264PROFILE_SCALABLEHIGH; |
| 64 case PP_VIDEODECODER_H264PROFILE_STEREOHIGH: | 64 case PP_VIDEODECODER_H264PROFILE_STEREOHIGH: |
| 65 return media::H264PROFILE_STEREOHIGH; | 65 return media::H264PROFILE_STEREOHIGH; |
| 66 case PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH: | 66 case PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH: |
| 67 return media::H264PROFILE_MULTIVIEWHIGH; | 67 return media::H264PROFILE_MULTIVIEWHIGH; |
| 68 case PP_VIDEODECODER_VP8PROFILE_ANY: | 68 case PP_VIDEODECODER_VP8PROFILE_ANY: |
| 69 return media::VP8PROFILE_ANY; | 69 return media::VP8PROFILE_ANY; |
| 70 case PP_VIDEODECODER_MJPEGPROFILE: |
| 71 return media::MJPEGPROFILE; |
| 70 default: | 72 default: |
| 71 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 73 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
| 72 } | 74 } |
| 73 } | 75 } |
| 74 | 76 |
| 75 PP_VideoDecodeError_Dev MediaToPPError( | 77 PP_VideoDecodeError_Dev MediaToPPError( |
| 76 media::VideoDecodeAccelerator::Error error) { | 78 media::VideoDecodeAccelerator::Error error) { |
| 77 switch (error) { | 79 switch (error) { |
| 78 case media::VideoDecodeAccelerator::ILLEGAL_STATE: | 80 case media::VideoDecodeAccelerator::ILLEGAL_STATE: |
| 79 return PP_VIDEODECODERERROR_ILLEGAL_STATE; | 81 return PP_VIDEODECODERERROR_ILLEGAL_STATE; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 DCHECK(RenderThreadImpl::current()); | 295 DCHECK(RenderThreadImpl::current()); |
| 294 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); | 296 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); |
| 295 } | 297 } |
| 296 | 298 |
| 297 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 299 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
| 298 DCHECK(RenderThreadImpl::current()); | 300 DCHECK(RenderThreadImpl::current()); |
| 299 RunFlushCallback(PP_OK); | 301 RunFlushCallback(PP_OK); |
| 300 } | 302 } |
| 301 | 303 |
| 302 } // namespace content | 304 } // namespace content |
| OLD | NEW |