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_VP9PROFILE_PROFILE0: | |
fgalligan1
2016/03/23 18:14:08
Will this be fine? Currently this decoder does not
servolk
2016/03/24 18:05:43
Yes, I believe this should be fine. This simply al
| |
71 return media::VP9PROFILE_PROFILE0; | |
72 case PP_VIDEODECODER_VP9PROFILE_PROFILE1: | |
73 return media::VP9PROFILE_PROFILE1; | |
74 case PP_VIDEODECODER_VP9PROFILE_PROFILE2: | |
75 return media::VP9PROFILE_PROFILE2; | |
76 case PP_VIDEODECODER_VP9PROFILE_PROFILE3: | |
77 return media::VP9PROFILE_PROFILE3; | |
70 default: | 78 default: |
71 return media::VIDEO_CODEC_PROFILE_UNKNOWN; | 79 return media::VIDEO_CODEC_PROFILE_UNKNOWN; |
72 } | 80 } |
73 } | 81 } |
74 | 82 |
75 PP_VideoDecodeError_Dev MediaToPPError( | 83 PP_VideoDecodeError_Dev MediaToPPError( |
76 media::VideoDecodeAccelerator::Error error) { | 84 media::VideoDecodeAccelerator::Error error) { |
77 switch (error) { | 85 switch (error) { |
78 case media::VideoDecodeAccelerator::ILLEGAL_STATE: | 86 case media::VideoDecodeAccelerator::ILLEGAL_STATE: |
79 return PP_VIDEODECODERERROR_ILLEGAL_STATE; | 87 return PP_VIDEODECODERERROR_ILLEGAL_STATE; |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 DCHECK(RenderThreadImpl::current()); | 303 DCHECK(RenderThreadImpl::current()); |
296 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); | 304 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); |
297 } | 305 } |
298 | 306 |
299 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 307 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
300 DCHECK(RenderThreadImpl::current()); | 308 DCHECK(RenderThreadImpl::current()); |
301 RunFlushCallback(PP_OK); | 309 RunFlushCallback(PP_OK); |
302 } | 310 } |
303 | 311 |
304 } // namespace content | 312 } // namespace content |
OLD | NEW |