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 Aug 12 17:59:47 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 126 |
112 int32_t Reset(PP_Resource video_decoder, | 127 int32_t Reset(PP_Resource video_decoder, |
113 struct PP_CompletionCallback callback) { | 128 struct PP_CompletionCallback callback) { |
114 VLOG(4) << "PPB_VideoDecoder::Reset()"; | 129 VLOG(4) << "PPB_VideoDecoder::Reset()"; |
115 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); | 130 EnterResource<PPB_VideoDecoder_API> enter(video_decoder, callback, true); |
116 if (enter.failed()) | 131 if (enter.failed()) |
117 return enter.retval(); | 132 return enter.retval(); |
118 return enter.SetResult(enter.object()->Reset(enter.callback())); | 133 return enter.SetResult(enter.object()->Reset(enter.callback())); |
119 } | 134 } |
120 | 135 |
121 const PPB_VideoDecoder_0_1 g_ppb_videodecoder_thunk_0_1 = {&Create, | 136 const PPB_VideoDecoder_0_1 g_ppb_videodecoder_thunk_0_1 = { |
122 &IsVideoDecoder, | 137 &Create, &IsVideoDecoder, &Initialize_0_1, &Decode, |
123 &Initialize_0_1, | 138 &GetPicture_0_1, &RecyclePicture, &Flush, &Reset}; |
124 &Decode, | |
125 &GetPicture_0_1, | |
126 &RecyclePicture, | |
127 &Flush, | |
128 &Reset}; | |
129 | 139 |
130 const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = {&Create, | 140 const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = { |
131 &IsVideoDecoder, | 141 &Create, &IsVideoDecoder, &Initialize_0_2, &Decode, |
132 &Initialize, | 142 &GetPicture_0_1, &RecyclePicture, &Flush, &Reset}; |
133 &Decode, | |
134 &GetPicture_0_1, | |
135 &RecyclePicture, | |
136 &Flush, | |
137 &Reset}; | |
138 | 143 |
139 const PPB_VideoDecoder_1_0 g_ppb_videodecoder_thunk_1_0 = {&Create, | 144 const PPB_VideoDecoder_1_0 g_ppb_videodecoder_thunk_1_0 = { |
140 &IsVideoDecoder, | 145 &Create, &IsVideoDecoder, &Initialize_0_2, &Decode, |
141 &Initialize, | 146 &GetPicture, &RecyclePicture, &Flush, &Reset}; |
142 &Decode, | 147 |
143 &GetPicture, | 148 const PPB_VideoDecoder_1_1 g_ppb_videodecoder_thunk_1_1 = { |
144 &RecyclePicture, | 149 &Create, &IsVideoDecoder, &Initialize, &Decode, |
145 &Flush, | 150 &GetPicture, &RecyclePicture, &Flush, &Reset}; |
146 &Reset}; | |
147 | 151 |
148 } // namespace | 152 } // namespace |
149 | 153 |
150 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* GetPPB_VideoDecoder_0_1_Thunk() { | 154 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* GetPPB_VideoDecoder_0_1_Thunk() { |
151 return &g_ppb_videodecoder_thunk_0_1; | 155 return &g_ppb_videodecoder_thunk_0_1; |
152 } | 156 } |
153 | 157 |
154 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* GetPPB_VideoDecoder_0_2_Thunk() { | 158 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* GetPPB_VideoDecoder_0_2_Thunk() { |
155 return &g_ppb_videodecoder_thunk_0_2; | 159 return &g_ppb_videodecoder_thunk_0_2; |
156 } | 160 } |
157 | 161 |
158 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_0* GetPPB_VideoDecoder_1_0_Thunk() { | 162 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_0* GetPPB_VideoDecoder_1_0_Thunk() { |
159 return &g_ppb_videodecoder_thunk_1_0; | 163 return &g_ppb_videodecoder_thunk_1_0; |
160 } | 164 } |
161 | 165 |
| 166 PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_1* GetPPB_VideoDecoder_1_1_Thunk() { |
| 167 return &g_ppb_videodecoder_thunk_1_1; |
| 168 } |
| 169 |
162 } // namespace thunk | 170 } // namespace thunk |
163 } // namespace ppapi | 171 } // namespace ppapi |
OLD | NEW |