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 May 15 17:11:43 2014. | 5 // From ppb_audio_buffer.idl modified Fri Jun 13 10:40:42 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 = {&IsAudioBuffer, | 89 const PPB_AudioBuffer_0_1 g_ppb_audiobuffer_thunk_0_1 = { |
90 &GetTimestamp, | 90 &IsAudioBuffer, &GetTimestamp, &SetTimestamp, |
91 &SetTimestamp, | 91 &GetSampleRate, &GetSampleSize, &GetNumberOfChannels, |
92 &GetSampleRate, | 92 &GetNumberOfSamples, &GetDataBuffer, &GetDataBufferSize}; |
93 &GetSampleSize, | |
94 &GetNumberOfChannels, | |
95 &GetNumberOfSamples, | |
96 &GetDataBuffer, | |
97 &GetDataBufferSize}; | |
98 | 93 |
99 } // namespace | 94 } // namespace |
100 | 95 |
101 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { | 96 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { |
102 return &g_ppb_audiobuffer_thunk_0_1; | 97 return &g_ppb_audiobuffer_thunk_0_1; |
103 } | 98 } |
104 | 99 |
105 } // namespace thunk | 100 } // namespace thunk |
106 } // namespace ppapi | 101 } // namespace ppapi |
OLD | NEW |