OLD | NEW |
---|---|
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 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 | 5 |
6 /** | 6 /** |
7 * This file defines the <code>PPB_AudioInput_Dev</code> interface, which | 7 * This file defines the <code>PPB_AudioInput_Dev</code> interface, which |
8 * provides realtime audio input capture. | 8 * provides realtime audio input capture. |
9 */ | 9 */ |
10 | 10 |
11 label Chrome { | 11 label Chrome { |
12 M19 = 0.2, | |
13 M25 = 0.3, | 12 M25 = 0.3, |
yzshen1
2014/01/06 17:23:19
I don't remember, is v0.2 the reason why we cannot
| |
14 M30 = 0.4 | 13 M30 = 0.4 |
15 }; | 14 }; |
16 | 15 |
17 /** | 16 /** |
18 * <code>PPB_AudioInput_Callback</code> defines the type of an audio callback | 17 * <code>PPB_AudioInput_Callback</code> defines the type of an audio callback |
19 * function used to provide the audio buffer with data. This callback will be | 18 * function used to provide the audio buffer with data. This callback will be |
20 * called on a separate thread from the creation thread. | 19 * called on a separate thread from the creation thread. |
21 * | 20 * |
22 * @param[in] sample_buffer A buffer providing audio input data. | 21 * @param[in] sample_buffer A buffer providing audio input data. |
23 * @param[in] buffer_size_in_bytes The size of the buffer in bytes. | 22 * @param[in] buffer_size_in_bytes The size of the buffer in bytes. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 * | 67 * |
69 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given | 68 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given |
70 * resource is an audio input resource, otherwise <code>PP_FALSE</code>. | 69 * resource is an audio input resource, otherwise <code>PP_FALSE</code>. |
71 */ | 70 */ |
72 PP_Bool IsAudioInput( | 71 PP_Bool IsAudioInput( |
73 [in] PP_Resource resource); | 72 [in] PP_Resource resource); |
74 | 73 |
75 /** | 74 /** |
76 * Enumerates audio input devices. | 75 * Enumerates audio input devices. |
77 * | 76 * |
78 * Please note that: | |
79 * - this method ignores the previous value pointed to by <code>devices</code> | |
80 * (won't release reference even if it is not 0); | |
81 * - <code>devices</code> must be valid until <code>callback</code> is called, | |
82 * if the method returns <code>PP_OK_COMPLETIONPENDING</code>; | |
83 * - the ref count of the returned <code>devices</code> has already been | |
84 * increased by 1 for the caller. | |
85 * | |
86 * @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio | |
87 * input resource. | |
88 * @param[out] devices Once the operation is completed successfully, | |
89 * <code>devices</code> will be set to a <code>PPB_ResourceArray_Dev</code> | |
90 * resource, which holds a list of <code>PPB_DeviceRef_Dev</code> resources. | |
91 * @param[in] callback A <code>PP_CompletionCallback</code> to run on | |
92 * completion. | |
93 * | |
94 * @return An error code from <code>pp_errors.h</code>. | |
95 */ | |
96 [deprecate=0.3] | |
97 int32_t EnumerateDevices( | |
98 [in] PP_Resource audio_input, | |
99 [out] PP_Resource devices, | |
100 [in] PP_CompletionCallback callback); | |
101 | |
102 /** | |
103 * Enumerates audio input devices. | |
104 * | |
105 * @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio | 77 * @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio |
106 * input resource. | 78 * input resource. |
107 * @param[in] output An output array which will receive | 79 * @param[in] output An output array which will receive |
108 * <code>PPB_DeviceRef_Dev</code> resources on success. Please note that the | 80 * <code>PPB_DeviceRef_Dev</code> resources on success. Please note that the |
109 * ref count of those resources has already been increased by 1 for the | 81 * ref count of those resources has already been increased by 1 for the |
110 * caller. | 82 * caller. |
111 * @param[in] callback A <code>PP_CompletionCallback</code> to run on | 83 * @param[in] callback A <code>PP_CompletionCallback</code> to run on |
112 * completion. | 84 * completion. |
113 * | 85 * |
114 * @return An error code from <code>pp_errors.h</code>. | 86 * @return An error code from <code>pp_errors.h</code>. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 * not valid to call Open() again after a call to this method. | 189 * not valid to call Open() again after a call to this method. |
218 * If an audio input resource is destroyed while a device is still open, then | 190 * If an audio input resource is destroyed while a device is still open, then |
219 * it will be implicitly closed, so you are not required to call this method. | 191 * it will be implicitly closed, so you are not required to call this method. |
220 * | 192 * |
221 * @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio | 193 * @param[in] audio_input A <code>PP_Resource</code> corresponding to an audio |
222 * input resource. | 194 * input resource. |
223 */ | 195 */ |
224 void Close( | 196 void Close( |
225 [in] PP_Resource audio_input); | 197 [in] PP_Resource audio_input); |
226 }; | 198 }; |
OLD | NEW |