| 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 = { // |
| 90 &IsAudioBuffer, | 90 &IsAudioBuffer, // |
| 91 &GetTimestamp, | 91 &GetTimestamp, // |
| 92 &SetTimestamp, | 92 &SetTimestamp, // |
| 93 &GetSampleRate, | 93 &GetSampleRate, // |
| 94 &GetSampleSize, | 94 &GetSampleSize, // |
| 95 &GetNumberOfChannels, | 95 &GetNumberOfChannels, // |
| 96 &GetNumberOfSamples, | 96 &GetNumberOfSamples, // |
| 97 &GetDataBuffer, | 97 &GetDataBuffer, // |
| 98 &GetDataBufferSize | 98 &GetDataBufferSize // |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace | 101 } // namespace |
| 102 | 102 |
| 103 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { | 103 PPAPI_THUNK_EXPORT const PPB_AudioBuffer_0_1* GetPPB_AudioBuffer_0_1_Thunk() { |
| 104 return &g_ppb_audiobuffer_thunk_0_1; | 104 return &g_ppb_audiobuffer_thunk_0_1; |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace thunk | 107 } // namespace thunk |
| 108 } // namespace ppapi | 108 } // namespace ppapi |
| OLD | NEW |