| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/cpp/dev/video_decoder_dev.h" | 5 #include "ppapi/cpp/dev/video_decoder_dev.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_video_decoder_dev.h" | 7 #include "ppapi/c/dev/ppb_video_decoder_dev.h" |
| 8 #include "ppapi/c/dev/ppp_video_decoder_dev.h" | 8 #include "ppapi/c/dev/ppp_video_decoder_dev.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/cpp/common.h" | 10 #include "ppapi/cpp/common.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 callback.pp_completion_callback()); | 46 callback.pp_completion_callback()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool VideoDecoder_Dev::GetConfigs(Instance* instance, | 49 bool VideoDecoder_Dev::GetConfigs(Instance* instance, |
| 50 const PP_VideoConfigElement* prototype_config, | 50 const PP_VideoConfigElement* prototype_config, |
| 51 PP_VideoConfigElement* matching_configs, | 51 PP_VideoConfigElement* matching_configs, |
| 52 uint32_t matching_configs_size, | 52 uint32_t matching_configs_size, |
| 53 uint32_t* num_of_matching_configs) { | 53 uint32_t* num_of_matching_configs) { |
| 54 if (!has_interface<PPB_VideoDecoder_Dev>()) | 54 if (!has_interface<PPB_VideoDecoder_Dev>()) |
| 55 return false; | 55 return false; |
| 56 return PPBoolToBool(get_interface<PPB_VideoDecoder_Dev>()->GetConfigs( | 56 return PP_ToBool(get_interface<PPB_VideoDecoder_Dev>()->GetConfigs( |
| 57 instance->pp_instance(), prototype_config, matching_configs, | 57 instance->pp_instance(), prototype_config, matching_configs, |
| 58 matching_configs_size, num_of_matching_configs)); | 58 matching_configs_size, num_of_matching_configs)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void VideoDecoder_Dev::AssignGLESBuffers( | 61 void VideoDecoder_Dev::AssignGLESBuffers( |
| 62 const std::vector<PP_GLESBuffer_Dev>& buffers) { | 62 const std::vector<PP_GLESBuffer_Dev>& buffers) { |
| 63 if (!has_interface<PPB_VideoDecoder_Dev>() || !pp_resource()) | 63 if (!has_interface<PPB_VideoDecoder_Dev>() || !pp_resource()) |
| 64 return; | 64 return; |
| 65 get_interface<PPB_VideoDecoder_Dev>()->AssignGLESBuffers( | 65 get_interface<PPB_VideoDecoder_Dev>()->AssignGLESBuffers( |
| 66 pp_resource(), buffers.size(), &buffers[0]); | 66 pp_resource(), buffers.size(), &buffers[0]); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 int32_t VideoDecoder_Dev::Abort(CompletionCallback callback) { | 100 int32_t VideoDecoder_Dev::Abort(CompletionCallback callback) { |
| 101 if (!has_interface<PPB_VideoDecoder_Dev>()) | 101 if (!has_interface<PPB_VideoDecoder_Dev>()) |
| 102 return callback.MayForce(PP_ERROR_NOINTERFACE); | 102 return callback.MayForce(PP_ERROR_NOINTERFACE); |
| 103 return get_interface<PPB_VideoDecoder_Dev>()->Abort( | 103 return get_interface<PPB_VideoDecoder_Dev>()->Abort( |
| 104 pp_resource(), callback.pp_completion_callback()); | 104 pp_resource(), callback.pp_completion_callback()); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace pp | 107 } // namespace pp |
| OLD | NEW |