[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 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_INPUT_API_H_ |
| 6 | #define PPAPI_THUNK_AUDIO_INPUT_API_H_ |
| 7 | |
avi | e029c413 | 2015-12-23 06:45:22 | [diff] [blame^] | 8 | #include <stdint.h> |
| 9 | |
[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 10 | #include <string> |
[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 11 | |
[email protected] | aed9653 | 2012-06-23 14:27:42 | [diff] [blame] | 12 | #include "base/memory/ref_counted.h" |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 13 | #include "ppapi/c/dev/ppb_audio_input_dev.h" |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 14 | |
| 15 | namespace ppapi { |
[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 16 | |
[email protected] | aed9653 | 2012-06-23 14:27:42 | [diff] [blame] | 17 | class TrackedCallback; |
[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 18 | |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 19 | namespace thunk { |
| 20 | |
[email protected] | 77b5550 | 2012-11-08 22:20:20 | [diff] [blame] | 21 | class PPB_AudioInput_API { |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 22 | public: |
| 23 | virtual ~PPB_AudioInput_API() {} |
| 24 | |
[email protected] | 4f01c76 | 2012-12-05 02:44:18 | [diff] [blame] | 25 | virtual int32_t EnumerateDevices(const PP_ArrayOutput& output, |
[email protected] | aed9653 | 2012-06-23 14:27:42 | [diff] [blame] | 26 | scoped_refptr<TrackedCallback> callback) = 0; |
[email protected] | 4f01c76 | 2012-12-05 02:44:18 | [diff] [blame] | 27 | virtual int32_t MonitorDeviceChange(PP_MonitorDeviceChangeCallback callback, |
| 28 | void* user_data) = 0; |
[email protected] | a23089d0 | 2014-01-06 23:51:40 | [diff] [blame] | 29 | virtual int32_t Open0_3(PP_Resource device_ref, |
[email protected] | c90ffec7 | 2013-07-03 11:57:45 | [diff] [blame] | 30 | PP_Resource config, |
[email protected] | a23089d0 | 2014-01-06 23:51:40 | [diff] [blame] | 31 | PPB_AudioInput_Callback_0_3 audio_input_callback_0_3, |
[email protected] | c90ffec7 | 2013-07-03 11:57:45 | [diff] [blame] | 32 | void* user_data, |
| 33 | scoped_refptr<TrackedCallback> callback) = 0; |
[email protected] | 8917a67 | 2013-02-25 17:18:04 | [diff] [blame] | 34 | virtual int32_t Open(PP_Resource device_ref, |
[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 35 | PP_Resource config, |
| 36 | PPB_AudioInput_Callback audio_input_callback, |
| 37 | void* user_data, |
[email protected] | aed9653 | 2012-06-23 14:27:42 | [diff] [blame] | 38 | scoped_refptr<TrackedCallback> callback) = 0; |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 39 | virtual PP_Resource GetCurrentConfig() = 0; |
| 40 | virtual PP_Bool StartCapture() = 0; |
| 41 | virtual PP_Bool StopCapture() = 0; |
[email protected] | eed2456 | 2012-03-07 07:48:48 | [diff] [blame] | 42 | virtual void Close() = 0; |
[email protected] | 1f8a089 | 2011-11-18 00:14:24 | [diff] [blame] | 43 | }; |
| 44 | |
| 45 | } // namespace thunk |
| 46 | } // namespace ppapi |
| 47 | |
| 48 | #endif // PPAPI_THUNK_AUDIO_INPUT_API_H_ |