OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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_audio_buffer.idl modified Thu Feb 6 15:31:48 2014. | 5 // From ppb_audio_buffer.idl modified Mon Apr 7 08:56:43 2014. |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/ppb_audio_buffer.h" | 8 #include "ppapi/c/ppb_audio_buffer.h" |
9 #include "ppapi/shared_impl/tracked_callback.h" | 9 #include "ppapi/shared_impl/tracked_callback.h" |
10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
11 #include "ppapi/thunk/ppapi_thunk_export.h" | 11 #include "ppapi/thunk/ppapi_thunk_export.h" |
12 #include "ppapi/thunk/ppb_audio_buffer_api.h" | 12 #include "ppapi/thunk/ppb_audio_buffer_api.h" |
13 | 13 |
14 namespace ppapi { | 14 namespace ppapi { |
15 namespace thunk { | 15 namespace thunk { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 | 80 |
81 uint32_t GetDataBufferSize(PP_Resource buffer) { | 81 uint32_t GetDataBufferSize(PP_Resource buffer) { |
82 VLOG(4) << "PPB_AudioBuffer::GetDataBufferSize()"; | 82 VLOG(4) << "PPB_AudioBuffer::GetDataBufferSize()"; |
83 EnterResource<PPB_AudioBuffer_API> enter(buffer, true); | 83 EnterResource<PPB_AudioBuffer_API> enter(buffer, true); |
84 if (enter.failed()) | 84 if (enter.failed()) |
85 return 0; | 85 return 0; |
86 return enter.object()->GetDataBufferSize(); | 86 return enter.object()->GetDataBufferSize(); |
87 } | 87 } |
88 | 88 |
89 const PPB_AudioBuffer_0_1 g_ppb_audiobuffer_thunk_0_1 = { | 89 const PPB_AudioBuffer_0_1 g_ppb_audiobuffer_thunk_0_1 = {&IsAudioBuffer, |
90 &IsAudioBuffer, | 90 &GetTimestamp, |
91 &GetTimestamp, | 91 &SetTimestamp, |
92 &SetTimestamp, | 92 &GetSampleRate, |
93 &GetSampleRate, | 93 &GetSampleSize, |
94 &GetSampleSize, | 94 &GetNumberOfChannels, |
95 &GetNumberOfChannels, | 95 &GetNumberOfSamples, |
96 &GetNumberOfSamples, | 96 &GetDataBuffer, |
97 &GetDataBuffer, | 97 &GetDataBufferSize}; |
98 &GetDataBufferSize | |
99 }; | |
100 | 98 |
101 } // namespace | 99 } // namespace |
102 | 100 |
103 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { | 101 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { |
104 return &g_ppb_audiobuffer_thunk_0_1; | 102 return &g_ppb_audiobuffer_thunk_0_1; |
105 } | 103 } |
106 | 104 |
107 } // namespace thunk | 105 } // namespace thunk |
108 } // namespace ppapi | 106 } // namespace ppapi |
OLD | NEW |