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

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

Issue 1778683003: Ran ppapi/generators/generator.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 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_audio_encoder.idl modified Mon Sep 7 10:17:53 2015. 5 // From ppb_audio_encoder.idl modified Fri Mar 4 14:31:30 2016.
6
7 #include <stdint.h>
8 6
9 #include "ppapi/c/pp_completion_callback.h" 7 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
11 #include "ppapi/c/ppb_audio_encoder.h" 9 #include "ppapi/c/ppb_audio_encoder.h"
12 #include "ppapi/shared_impl/tracked_callback.h" 10 #include "ppapi/shared_impl/tracked_callback.h"
13 #include "ppapi/thunk/enter.h" 11 #include "ppapi/thunk/enter.h"
14 #include "ppapi/thunk/ppapi_thunk_export.h" 12 #include "ppapi/thunk/ppapi_thunk_export.h"
15 #include "ppapi/thunk/ppb_audio_encoder_api.h" 13 #include "ppapi/thunk/ppb_audio_encoder_api.h"
16 14
17 namespace ppapi { 15 namespace ppapi {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 PP_AudioBuffer_SampleRate input_sample_rate, 47 PP_AudioBuffer_SampleRate input_sample_rate,
50 PP_AudioBuffer_SampleSize input_sample_size, 48 PP_AudioBuffer_SampleSize input_sample_size,
51 PP_AudioProfile output_profile, 49 PP_AudioProfile output_profile,
52 uint32_t initial_bitrate, 50 uint32_t initial_bitrate,
53 PP_HardwareAcceleration acceleration, 51 PP_HardwareAcceleration acceleration,
54 struct PP_CompletionCallback callback) { 52 struct PP_CompletionCallback callback) {
55 VLOG(4) << "PPB_AudioEncoder::Initialize()"; 53 VLOG(4) << "PPB_AudioEncoder::Initialize()";
56 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, callback, true); 54 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, callback, true);
57 if (enter.failed()) 55 if (enter.failed())
58 return enter.retval(); 56 return enter.retval();
59 return enter.SetResult(enter.object()->Initialize(channels, 57 return enter.SetResult(enter.object()->Initialize(
60 input_sample_rate, 58 channels, input_sample_rate, input_sample_size, output_profile,
61 input_sample_size, 59 initial_bitrate, acceleration, enter.callback()));
62 output_profile,
63 initial_bitrate,
64 acceleration,
65 enter.callback()));
66 } 60 }
67 61
68 int32_t GetNumberOfSamples(PP_Resource audio_encoder) { 62 int32_t GetNumberOfSamples(PP_Resource audio_encoder) {
69 VLOG(4) << "PPB_AudioEncoder::GetNumberOfSamples()"; 63 VLOG(4) << "PPB_AudioEncoder::GetNumberOfSamples()";
70 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, true); 64 EnterResource<PPB_AudioEncoder_API> enter(audio_encoder, true);
71 if (enter.failed()) 65 if (enter.failed())
72 return enter.retval(); 66 return enter.retval();
73 return enter.object()->GetNumberOfSamples(); 67 return enter.object()->GetNumberOfSamples();
74 } 68 }
75 69
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 &Close}; 140 &Close};
147 141
148 } // namespace 142 } // namespace
149 143
150 PPAPI_THUNK_EXPORT const PPB_AudioEncoder_0_1* GetPPB_AudioEncoder_0_1_Thunk() { 144 PPAPI_THUNK_EXPORT const PPB_AudioEncoder_0_1* GetPPB_AudioEncoder_0_1_Thunk() {
151 return &g_ppb_audioencoder_thunk_0_1; 145 return &g_ppb_audioencoder_thunk_0_1;
152 } 146 }
153 147
154 } // namespace thunk 148 } // namespace thunk
155 } // namespace ppapi 149 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_audio_buffer_thunk.cc ('k') | ppapi/thunk/ppb_camera_capabilities_private_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698