Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: ppapi/thunk/ppb_video_encoder_thunk.cc

Issue 887223009: ppapi: VideoEncoder: Add proxy boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 Wed Feb 4 05:19:27 2015. 5 // From ppb_video_encoder.idl modified Thu Feb 5 11:24:27 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 30 matching lines...) Expand all
46 PP_VideoFrame_Format input_format, 46 PP_VideoFrame_Format input_format,
47 const struct PP_Size* input_visible_size, 47 const struct PP_Size* input_visible_size,
48 PP_VideoProfile output_profile, 48 PP_VideoProfile output_profile,
49 uint32_t initial_bitrate, 49 uint32_t initial_bitrate,
50 PP_HardwareAcceleration acceleration, 50 PP_HardwareAcceleration acceleration,
51 struct PP_CompletionCallback callback) { 51 struct PP_CompletionCallback callback) {
52 VLOG(4) << "PPB_VideoEncoder::Initialize()"; 52 VLOG(4) << "PPB_VideoEncoder::Initialize()";
53 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, callback, true); 53 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, callback, true);
54 if (enter.failed()) 54 if (enter.failed())
55 return enter.retval(); 55 return enter.retval();
56 return enter.SetResult(enter.object()->Initialize( 56 return enter.SetResult(enter.object()->Initialize(input_format,
57 input_format, input_visible_size, output_profile, initial_bitrate, 57 input_visible_size,
58 acceleration, enter.callback())); 58 output_profile,
59 initial_bitrate,
60 acceleration,
61 enter.callback()));
59 } 62 }
60 63
61 int32_t GetFramesRequired(PP_Resource video_encoder) { 64 int32_t GetFramesRequired(PP_Resource video_encoder) {
62 VLOG(4) << "PPB_VideoEncoder::GetFramesRequired()"; 65 VLOG(4) << "PPB_VideoEncoder::GetFramesRequired()";
63 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, true); 66 EnterResource<PPB_VideoEncoder_API> enter(video_encoder, true);
64 if (enter.failed()) 67 if (enter.failed())
65 return enter.retval(); 68 return enter.retval();
66 return enter.object()->GetFramesRequired(); 69 return enter.object()->GetFramesRequired();
67 } 70 }
68 71
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 &Close}; 154 &Close};
152 155
153 } // namespace 156 } // namespace
154 157
155 PPAPI_THUNK_EXPORT const PPB_VideoEncoder_0_1* GetPPB_VideoEncoder_0_1_Thunk() { 158 PPAPI_THUNK_EXPORT const PPB_VideoEncoder_0_1* GetPPB_VideoEncoder_0_1_Thunk() {
156 return &g_ppb_videoencoder_thunk_0_1; 159 return &g_ppb_videoencoder_thunk_0_1;
157 } 160 }
158 161
159 } // namespace thunk 162 } // namespace thunk
160 } // namespace ppapi 163 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698