OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_encoder.idl modified Fri Apr 17 10:38:38 2015. | 5 // From ppb_video_encoder.idl modified Mon May 18 12:43:25 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_encoder.h" | 9 #include "ppapi/c/ppb_video_encoder.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_encoder_api.h" | 13 #include "ppapi/thunk/ppb_video_encoder_api.h" |
14 | 14 |
15 namespace ppapi { | 15 namespace ppapi { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 PP_VideoFrame_Format input_format, | 57 PP_VideoFrame_Format input_format, |
58 const struct PP_Size* input_visible_size, | 58 const struct PP_Size* input_visible_size, |
59 PP_VideoProfile output_profile, | 59 PP_VideoProfile output_profile, |
60 uint32_t initial_bitrate, | 60 uint32_t initial_bitrate, |
61 PP_HardwareAcceleration acceleration, | 61 PP_HardwareAcceleration acceleration, |
62 struct PP_CompletionCallback callback) { | 62 struct PP_CompletionCallback callback) { |
63 VLOG(4) << "PPB_VideoEncoder::Initialize()"; | 63 VLOG(4) << "PPB_VideoEncoder::Initialize()"; |
64 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, callback, true); | 64 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, callback, true); |
65 if (enter.failed()) | 65 if (enter.failed()) |
66 return enter.retval(); | 66 return enter.retval(); |
67 return enter.SetResult(enter.object()->Initialize(input_format, | 67 return enter.SetResult(enter.object()->Initialize( |
68 input_visible_size, | 68 input_format, input_visible_size, output_profile, initial_bitrate, |
69 output_profile, | 69 acceleration, enter.callback())); |
70 initial_bitrate, | |
71 acceleration, | |
72 enter.callback())); | |
73 } | 70 } |
74 | 71 |
75 int32_t GetFramesRequired(PP_Resource video_encoder) { | 72 int32_t GetFramesRequired(PP_Resource video_encoder) { |
76 VLOG(4) << "PPB_VideoEncoder::GetFramesRequired()"; | 73 VLOG(4) << "PPB_VideoEncoder::GetFramesRequired()"; |
77 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, true); | 74 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, true); |
78 if (enter.failed()) | 75 if (enter.failed()) |
79 return enter.retval(); | 76 return enter.retval(); |
80 return enter.object()->GetFramesRequired(); | 77 return enter.object()->GetFramesRequired(); |
81 } | 78 } |
82 | 79 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 PPAPI_THUNK_EXPORT const PPB_VideoEncoder_0_1* GetPPB_VideoEncoder_0_1_Thunk() { | 180 PPAPI_THUNK_EXPORT const PPB_VideoEncoder_0_1* GetPPB_VideoEncoder_0_1_Thunk() { |
184 return &g_ppb_videoencoder_thunk_0_1; | 181 return &g_ppb_videoencoder_thunk_0_1; |
185 } | 182 } |
186 | 183 |
187 PPAPI_THUNK_EXPORT const PPB_VideoEncoder_0_2* GetPPB_VideoEncoder_0_2_Thunk() { | 184 PPAPI_THUNK_EXPORT const PPB_VideoEncoder_0_2* GetPPB_VideoEncoder_0_2_Thunk() { |
188 return &g_ppb_videoencoder_thunk_0_2; | 185 return &g_ppb_videoencoder_thunk_0_2; |
189 } | 186 } |
190 | 187 |
191 } // namespace thunk | 188 } // namespace thunk |
192 } // namespace ppapi | 189 } // namespace ppapi |
OLD | NEW |