Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / thunk / ppb_audio_encoder_api.h
blob68e13788c8f13b56db560bf35e16fdda6b3281ae
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.
5 #ifndef PPAPI_THUNK_AUDIO_ENCODER_API_H_
6 #define PPAPI_THUNK_AUDIO_ENCODER_API_H_
8 #include "ppapi/c/ppb_audio_encoder.h"
9 #include "ppapi/thunk/ppapi_thunk_export.h"
11 namespace ppapi {
12 namespace thunk {
14 class PPAPI_THUNK_EXPORT PPB_AudioEncoder_API {
15 public:
16 virtual ~PPB_AudioEncoder_API() {}
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;
43 } // namespace thunk
44 } // namespace ppapi
46 #endif // PPAPI_THUNK_AUDIO_ENCODER_API_H_