| 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 15 matching lines...) Expand all Loading... |
| 26 #include "ppapi/c/dev/ppp_video_decoder_dev.h" | 26 #include "ppapi/c/dev/ppp_video_decoder_dev.h" |
| 27 #include "ppapi/c/pp_completion_callback.h" | 27 #include "ppapi/c/pp_completion_callback.h" |
| 28 #include "ppapi/c/pp_errors.h" | 28 #include "ppapi/c/pp_errors.h" |
| 29 #include "ppapi/shared_impl/resource_tracker.h" | 29 #include "ppapi/shared_impl/resource_tracker.h" |
| 30 #include "ppapi/thunk/enter.h" | 30 #include "ppapi/thunk/enter.h" |
| 31 | 31 |
| 32 using ppapi::TrackedCallback; | 32 using ppapi::TrackedCallback; |
| 33 using ppapi::thunk::EnterResourceNoLock; | 33 using ppapi::thunk::EnterResourceNoLock; |
| 34 using ppapi::thunk::PPB_Buffer_API; | 34 using ppapi::thunk::PPB_Buffer_API; |
| 35 using ppapi::thunk::PPB_Graphics3D_API; | 35 using ppapi::thunk::PPB_Graphics3D_API; |
| 36 using ppapi::thunk::PPB_VideoDecoder_API; | |
| 37 | 36 |
| 38 namespace { | 37 namespace { |
| 39 | 38 |
| 40 // Convert PP_VideoDecoder_Profile to media::VideoCodecProfile. | 39 // Convert PP_VideoDecoder_Profile to media::VideoCodecProfile. |
| 41 media::VideoCodecProfile PPToMediaProfile( | 40 media::VideoCodecProfile PPToMediaProfile( |
| 42 const PP_VideoDecoder_Profile pp_profile) { | 41 const PP_VideoDecoder_Profile pp_profile) { |
| 43 switch (pp_profile) { | 42 switch (pp_profile) { |
| 44 case PP_VIDEODECODER_H264PROFILE_NONE: | 43 case PP_VIDEODECODER_H264PROFILE_NONE: |
| 45 // HACK: PPAPI contains a bogus "none" h264 profile that doesn't | 44 // HACK: PPAPI contains a bogus "none" h264 profile that doesn't |
| 46 // correspond to anything in h.264; but a number of released chromium | 45 // correspond to anything in h.264; but a number of released chromium |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 DCHECK(RenderThreadImpl::current()); | 302 DCHECK(RenderThreadImpl::current()); |
| 304 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); | 303 RunBitstreamBufferCallback(bitstream_buffer_id, PP_OK); |
| 305 } | 304 } |
| 306 | 305 |
| 307 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 306 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
| 308 DCHECK(RenderThreadImpl::current()); | 307 DCHECK(RenderThreadImpl::current()); |
| 309 RunFlushCallback(PP_OK); | 308 RunFlushCallback(PP_OK); |
| 310 } | 309 } |
| 311 | 310 |
| 312 } // namespace content | 311 } // namespace content |
| OLD | NEW |