| 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 Wed Jan 27 17:10:16 2016. |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/ppb_audio_buffer.h" | 10 #include "ppapi/c/ppb_audio_buffer.h" |
| 11 #include "ppapi/shared_impl/tracked_callback.h" | 11 #include "ppapi/shared_impl/tracked_callback.h" |
| 12 #include "ppapi/thunk/enter.h" | 12 #include "ppapi/thunk/enter.h" |
| 13 #include "ppapi/thunk/ppapi_thunk_export.h" | 13 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 14 #include "ppapi/thunk/ppb_audio_buffer_api.h" | 14 #include "ppapi/thunk/ppb_audio_buffer_api.h" |
| 15 | 15 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 uint32_t GetDataBufferSize(PP_Resource buffer) { | 83 uint32_t GetDataBufferSize(PP_Resource buffer) { |
| 84 VLOG(4) << "PPB_AudioBuffer::GetDataBufferSize()"; | 84 VLOG(4) << "PPB_AudioBuffer::GetDataBufferSize()"; |
| 85 EnterResource<PPB_AudioBuffer_API> enter(buffer, true); | 85 EnterResource<PPB_AudioBuffer_API> enter(buffer, true); |
| 86 if (enter.failed()) | 86 if (enter.failed()) |
| 87 return 0; | 87 return 0; |
| 88 return enter.object()->GetDataBufferSize(); | 88 return enter.object()->GetDataBufferSize(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 const PPB_AudioBuffer_0_1 g_ppb_audiobuffer_thunk_0_1 = {&IsAudioBuffer, | 91 const PPB_AudioBuffer_0_1 g_ppb_audiobuffer_thunk_0_1 = { |
| 92 &GetTimestamp, | 92 &IsAudioBuffer, &GetTimestamp, &SetTimestamp, |
| 93 &SetTimestamp, | 93 &GetSampleRate, &GetSampleSize, &GetNumberOfChannels, |
| 94 &GetSampleRate, | 94 &GetNumberOfSamples, &GetDataBuffer, &GetDataBufferSize}; |
| 95 &GetSampleSize, | |
| 96 &GetNumberOfChannels, | |
| 97 &GetNumberOfSamples, | |
| 98 &GetDataBuffer, | |
| 99 &GetDataBufferSize}; | |
| 100 | 95 |
| 101 } // namespace | 96 } // namespace |
| 102 | 97 |
| 103 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { | 98 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { |
| 104 return &g_ppb_audiobuffer_thunk_0_1; | 99 return &g_ppb_audiobuffer_thunk_0_1; |
| 105 } | 100 } |
| 106 | 101 |
| 107 } // namespace thunk | 102 } // namespace thunk |
| 108 } // namespace ppapi | 103 } // namespace ppapi |
| OLD | NEW |