OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_THUNK_AUDIO_ENCODER_API_H_ |
| 6 #define PPAPI_THUNK_AUDIO_ENCODER_API_H_ |
| 7 |
| 8 #include "ppapi/c/ppb_audio_encoder.h" |
| 9 #include "ppapi/thunk/ppapi_thunk_export.h" |
| 10 |
| 11 namespace ppapi { |
| 12 namespace thunk { |
| 13 |
| 14 class PPAPI_THUNK_EXPORT PPB_AudioEncoder_API { |
| 15 public: |
| 16 virtual ~PPB_AudioEncoder_API() {} |
| 17 |
| 18 virtual int32_t GetSupportedProfiles( |
| 19 const PP_ArrayOutput& output, |
| 20 const scoped_refptr<TrackedCallback>& callback) = 0; |
| 21 virtual int32_t Initialize( |
| 22 uint32_t channels, |
| 23 PP_AudioBuffer_SampleRate input_sample_rate, |
| 24 PP_AudioBuffer_SampleSize input_sample_size, |
| 25 PP_AudioProfile output_profile, |
| 26 uint32_t initial_bitrate, |
| 27 PP_HardwareAcceleration acceleration, |
| 28 const scoped_refptr<TrackedCallback>& callback) = 0; |
| 29 virtual int32_t GetNumberOfSamples() = 0; |
| 30 virtual int32_t GetBuffer(PP_Resource* audio_buffer, |
| 31 const scoped_refptr<TrackedCallback>& callback) = 0; |
| 32 virtual int32_t Encode(PP_Resource audio_buffer, |
| 33 const scoped_refptr<TrackedCallback>& callback) = 0; |
| 34 virtual int32_t GetBitstreamBuffer( |
| 35 PP_AudioBitstreamBuffer* bitstream_buffer, |
| 36 const scoped_refptr<TrackedCallback>& callback) = 0; |
| 37 virtual void RecycleBitstreamBuffer( |
| 38 const PP_AudioBitstreamBuffer* bitstream_buffer) = 0; |
| 39 virtual void RequestBitrateChange(uint32_t bitrate) = 0; |
| 40 virtual void Close() = 0; |
| 41 }; |
| 42 |
| 43 } // namespace thunk |
| 44 } // namespace ppapi |
| 45 |
| 46 #endif // PPAPI_THUNK_AUDIO_ENCODER_API_H_ |
OLD | NEW |