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 Thu Jan 29 16:28:15 2015. | 5 // From ppb_video_decoder.idl modified Wed Jun 24 11:44:18 2015. |
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 21 matching lines...) Expand all Loading... |
37 PP_Bool allow_software_fallback, | 37 PP_Bool allow_software_fallback, |
38 struct PP_CompletionCallback callback) { | 38 struct PP_CompletionCallback callback) { |
39 VLOG(4) << "PPB_VideoDecoder::Initialize_0_1()"; | 39 VLOG(4) << "PPB_VideoDecoder::Initialize_0_1()"; |
40 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 40 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
41 if (enter.failed()) | 41 if (enter.failed()) |
42 return enter.retval(); | 42 return enter.retval(); |
43 return enter.SetResult(enter.object()->Initialize0_1( | 43 return enter.SetResult(enter.object()->Initialize0_1( |
44 graphics3d_context, profile, allow_software_fallback, enter.callback())); | 44 graphics3d_context, profile, allow_software_fallback, enter.callback())); |
45 } | 45 } |
46 | 46 |
| 47 int32_t Initialize_0_2(PP_Resource video_decoder, |
| 48 PP_Resource graphics3d_context, |
| 49 PP_VideoProfile profile, |
| 50 PP_HardwareAcceleration acceleration, |
| 51 struct PP_CompletionCallback callback) { |
| 52 VLOG(4) << "PPB_VideoDecoder::Initialize_0_2()"; |
| 53 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
| 54 if (enter.failed()) |
| 55 return enter.retval(); |
| 56 return enter.SetResult(enter.object()->Initialize0_2( |
| 57 graphics3d_context, profile, acceleration, enter.callback())); |
| 58 } |
| 59 |
47 int32_t Initialize(PP_Resource video_decoder, | 60 int32_t Initialize(PP_Resource video_decoder, |
48 PP_Resource graphics3d_context, | 61 PP_Resource graphics3d_context, |
49 PP_VideoProfile profile, | 62 PP_VideoProfile profile, |
50 PP_HardwareAcceleration acceleration, | 63 PP_HardwareAcceleration acceleration, |
| 64 uint32_t min_picture_count, |
51 struct PP_CompletionCallback callback) { | 65 struct PP_CompletionCallback callback) { |
52 VLOG(4) << "PPB_VideoDecoder::Initialize()"; | 66 VLOG(4) << "PPB_VideoDecoder::Initialize()"; |
53 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 67 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
54 if (enter.failed()) | 68 if (enter.failed()) |
55 return enter.retval(); | 69 return enter.retval(); |
56 return enter.SetResult(enter.object()->Initialize( | 70 return enter.SetResult( |
57 graphics3d_context, profile, acceleration, enter.callback())); | 71 enter.object()->Initialize(graphics3d_context, profile, acceleration, |
| 72 min_picture_count, enter.callback())); |
58 } | 73 } |
59 | 74 |
60 int32_t Decode(PP_Resource video_decoder, | 75 int32_t Decode(PP_Resource video_decoder, |
61 uint32_t decode_id, | 76 uint32_t decode_id, |
62 uint32_t size, | 77 uint32_t size, |
63 const void* buffer, | 78 const void* buffer, |
64 struct PP_CompletionCallback callback) { | 79 struct PP_CompletionCallback callback) { |
65 VLOG(4) << "PPB_VideoDecoder::Decode()"; | 80 VLOG(4) << "PPB_VideoDecoder::Decode()"; |
66 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 81 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
67 if (enter.failed()) | 82 if (enter.failed()) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 &IsVideoDecoder, | 137 &IsVideoDecoder, |
123 &Initialize_0_1, | 138 &Initialize_0_1, |
124 &Decode, | 139 &Decode, |
125 &GetPicture_0_1, | 140 &GetPicture_0_1, |
126 &RecyclePicture, | 141 &RecyclePicture, |
127 &Flush, | 142 &Flush, |
128 &Reset}; | 143 &Reset}; |
129 | 144 |
130 const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = {&Create, | 145 const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = {&Create, |
131 &IsVideoDecoder, | 146 &IsVideoDecoder, |
132 &Initialize, | 147 &Initialize_0_2, |
133 &Decode, | 148 &Decode, |
134 &GetPicture_0_1, | 149 &GetPicture_0_1, |
135 &RecyclePicture, | 150 &RecyclePicture, |
136 &Flush, | 151 &Flush, |
137 &Reset}; | 152 &Reset}; |
138 | 153 |
139 const PPB_VideoDecoder_1_0 g_ppb_videodecoder_thunk_1_0 = {&Create, | 154 const PPB_VideoDecoder_1_0 g_ppb_videodecoder_thunk_1_0 = {&Create, |
140 &IsVideoDecoder, | 155 &IsVideoDecoder, |
| 156 &Initialize_0_2, |
| 157 &Decode, |
| 158 &GetPicture, |
| 159 &RecyclePicture, |
| 160 &Flush, |
| 161 &Reset}; |
| 162 |
| 163 const PPB_VideoDecoder_1_1 g_ppb_videodecoder_thunk_1_1 = {&Create, |
| 164 &IsVideoDecoder, |
141 &Initialize, | 165 &Initialize, |
142 &Decode, | 166 &Decode, |
143 &GetPicture, | 167 &GetPicture, |
144 &RecyclePicture, | 168 &RecyclePicture, |
145 &Flush, | 169 &Flush, |
146 &Reset}; | 170 &Reset}; |
147 | 171 |
148 } // namespace | 172 } // namespace |
149 | 173 |
150 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* GetPPB_VideoDecoder_0_1_Thunk() { | 174 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* GetPPB_VideoDecoder_0_1_Thunk() { |
151 return &g_ppb_videodecoder_thunk_0_1; | 175 return &g_ppb_videodecoder_thunk_0_1; |
152 } | 176 } |
153 | 177 |
154 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* GetPPB_VideoDecoder_0_2_Thunk() { | 178 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* GetPPB_VideoDecoder_0_2_Thunk() { |
155 return &g_ppb_videodecoder_thunk_0_2; | 179 return &g_ppb_videodecoder_thunk_0_2; |
156 } | 180 } |
157 | 181 |
158 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_0* GetPPB_VideoDecoder_1_0_Thunk() { | 182 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_0* GetPPB_VideoDecoder_1_0_Thunk() { |
159 return &g_ppb_videodecoder_thunk_1_0; | 183 return &g_ppb_videodecoder_thunk_1_0; |
160 } | 184 } |
161 | 185 |
| 186 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_1* GetPPB_VideoDecoder_1_1_Thunk() { |
| 187 return &g_ppb_videodecoder_thunk_1_1; |
| 188 } |
| 189 |
162 } // namespace thunk | 190 } // namespace thunk |
163 } // namespace ppapi | 191 } // namespace ppapi |
OLD | NEW |