| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 // From ppb_video_decoder.idl modified Mon Sep 8 16:40:15 2014. | 5 // From ppb_video_decoder.idl modified Wed Nov 5 13:39:36 2014. |
| 6 | 6 |
| 7 #include "ppapi/c/pp_completion_callback.h" | 7 #include "ppapi/c/pp_completion_callback.h" |
| 8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
| 9 #include "ppapi/c/ppb_video_decoder.h" | 9 #include "ppapi/c/ppb_video_decoder.h" |
| 10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
| 11 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
| 12 #include "ppapi/thunk/ppapi_thunk_export.h" | 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 13 #include "ppapi/thunk/ppb_video_decoder_api.h" | 13 #include "ppapi/thunk/ppb_video_decoder_api.h" |
| 14 | 14 |
| 15 namespace ppapi { | 15 namespace ppapi { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 VLOG(4) << "PPB_VideoDecoder::Decode()"; | 69 VLOG(4) << "PPB_VideoDecoder::Decode()"; |
| 70 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 70 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
| 71 if (enter.failed()) | 71 if (enter.failed()) |
| 72 return enter.retval(); | 72 return enter.retval(); |
| 73 return enter.SetResult(enter.object()->Decode(decode_id, | 73 return enter.SetResult(enter.object()->Decode(decode_id, |
| 74 size, | 74 size, |
| 75 buffer, | 75 buffer, |
| 76 enter.callback())); | 76 enter.callback())); |
| 77 } | 77 } |
| 78 | 78 |
| 79 int32_t GetPicture_0_1(PP_Resource video_decoder, |
| 80 struct PP_VideoPicture_0_1* picture, |
| 81 struct PP_CompletionCallback callback) { |
| 82 VLOG(4) << "PPB_VideoDecoder::GetPicture()"; |
| 83 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
| 84 if (enter.failed()) |
| 85 return enter.retval(); |
| 86 return enter.SetResult( |
| 87 enter.object()->GetPicture0_1(picture, enter.callback())); |
| 88 } |
| 89 |
| 79 int32_t GetPicture(PP_Resource video_decoder, | 90 int32_t GetPicture(PP_Resource video_decoder, |
| 80 struct PP_VideoPicture* picture, | 91 struct PP_VideoPicture* picture, |
| 81 struct PP_CompletionCallback callback) { | 92 struct PP_CompletionCallback callback) { |
| 82 VLOG(4) << "PPB_VideoDecoder::GetPicture()"; | 93 VLOG(4) << "PPB_VideoDecoder::GetPicture()"; |
| 83 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 94 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
| 84 if (enter.failed()) | 95 if (enter.failed()) |
| 85 return enter.retval(); | 96 return enter.retval(); |
| 86 return enter.SetResult(enter.object()->GetPicture(picture, enter.callback())); | 97 return enter.SetResult(enter.object()->GetPicture(picture, enter.callback())); |
| 87 } | 98 } |
| 88 | 99 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 106 | 117 |
| 107 int32_t Reset(PP_Resource video_decoder, | 118 int32_t Reset(PP_Resource video_decoder, |
| 108 struct PP_CompletionCallback callback) { | 119 struct PP_CompletionCallback callback) { |
| 109 VLOG(4) << "PPB_VideoDecoder::Reset()"; | 120 VLOG(4) << "PPB_VideoDecoder::Reset()"; |
| 110 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 121 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
| 111 if (enter.failed()) | 122 if (enter.failed()) |
| 112 return enter.retval(); | 123 return enter.retval(); |
| 113 return enter.SetResult(enter.object()->Reset(enter.callback())); | 124 return enter.SetResult(enter.object()->Reset(enter.callback())); |
| 114 } | 125 } |
| 115 | 126 |
| 116 const PPB_VideoDecoder_0_1 g_ppb_videodecoder_thunk_0_1 = { | 127 const PPB_VideoDecoder_0_1 g_ppb_videodecoder_thunk_0_1 = {&Create, |
| 117 &Create, | 128 &IsVideoDecoder, |
| 118 &IsVideoDecoder, | 129 &Initialize_0_1, |
| 119 &Initialize_0_1, | 130 &Decode, |
| 120 &Decode, | 131 &GetPicture_0_1, |
| 121 &GetPicture, | 132 &RecyclePicture, |
| 122 &RecyclePicture, | 133 &Flush, |
| 123 &Flush, | 134 &Reset}; |
| 124 &Reset | |
| 125 }; | |
| 126 | 135 |
| 127 const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = { | 136 const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = {&Create, |
| 128 &Create, | 137 &IsVideoDecoder, |
| 129 &IsVideoDecoder, | 138 &Initialize, |
| 130 &Initialize, | 139 &Decode, |
| 131 &Decode, | 140 &GetPicture_0_1, |
| 132 &GetPicture, | 141 &RecyclePicture, |
| 133 &RecyclePicture, | 142 &Flush, |
| 134 &Flush, | 143 &Reset}; |
| 135 &Reset | 144 |
| 136 }; | 145 const PPB_VideoDecoder_1_0 g_ppb_videodecoder_thunk_1_0 = {&Create, |
| 146 &IsVideoDecoder, |
| 147 &Initialize, |
| 148 &Decode, |
| 149 &GetPicture, |
| 150 &RecyclePicture, |
| 151 &Flush, |
| 152 &Reset}; |
| 137 | 153 |
| 138 } // namespace | 154 } // namespace |
| 139 | 155 |
| 140 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* | 156 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* |
| 141 GetPPB_VideoDecoder_0_1_Thunk() { | 157 GetPPB_VideoDecoder_0_1_Thunk() { |
| 142 return &g_ppb_videodecoder_thunk_0_1; | 158 return &g_ppb_videodecoder_thunk_0_1; |
| 143 } | 159 } |
| 144 | 160 |
| 145 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* | 161 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* |
| 146 GetPPB_VideoDecoder_0_2_Thunk() { | 162 GetPPB_VideoDecoder_0_2_Thunk() { |
| 147 return &g_ppb_videodecoder_thunk_0_2; | 163 return &g_ppb_videodecoder_thunk_0_2; |
| 148 } | 164 } |
| 149 | 165 |
| 166 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_0* GetPPB_VideoDecoder_1_0_Thunk() { |
| 167 return &g_ppb_videodecoder_thunk_1_0; |
| 168 } |
| 169 |
| 150 } // namespace thunk | 170 } // namespace thunk |
| 151 } // namespace ppapi | 171 } // namespace ppapi |
| OLD | NEW |