| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 /* From dev/ppb_audio_input_dev.idl modified Wed Nov 23 09:26:09 2011. */ | 6 /* From dev/ppb_audio_input_dev.idl modified Fri Dec 16 16:21:25 2011. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_ | 8 #ifndef PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_ |
| 9 #define PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_ | 9 #define PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 | 16 |
| 17 #define PPB_AUDIO_INPUT_DEV_INTERFACE_0_1 "PPB_AudioInput(Dev);0.1" | 17 #define PPB_AUDIO_INPUT_DEV_INTERFACE_0_1 "PPB_AudioInput(Dev);0.1" |
| 18 #define PPB_AUDIO_INPUT_DEV_INTERFACE PPB_AUDIO_INPUT_DEV_INTERFACE_0_1 | 18 #define PPB_AUDIO_INPUT_DEV_INTERFACE_0_2 "PPB_AudioInput(Dev);0.2" |
| 19 #define PPB_AUDIO_INPUT_DEV_INTERFACE PPB_AUDIO_INPUT_DEV_INTERFACE_0_2 |
| 19 | 20 |
| 20 /** | 21 /** |
| 21 * @file | 22 * @file |
| 22 * This file defines the <code>PPB_AudioInput_Dev</code> interface, which | 23 * This file defines the <code>PPB_AudioInput_Dev</code> interface, which |
| 23 * provides realtime audio input capture. | 24 * provides realtime audio input capture. |
| 24 */ | 25 */ |
| 25 | 26 |
| 26 | 27 |
| 27 /** | 28 /** |
| 28 * @addtogroup Typedefs | 29 * @addtogroup Typedefs |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 * @{ | 46 * @{ |
| 46 */ | 47 */ |
| 47 /** | 48 /** |
| 48 * The <code>PPB_AudioInput_Dev</code> interface contains pointers to several | 49 * The <code>PPB_AudioInput_Dev</code> interface contains pointers to several |
| 49 * functions for handling audio input resources. | 50 * functions for handling audio input resources. |
| 50 */ | 51 */ |
| 51 struct PPB_AudioInput_Dev { | 52 struct PPB_AudioInput_Dev { |
| 52 /** | 53 /** |
| 53 * Create is a pointer to a function that creates an audio input resource. | 54 * Create is a pointer to a function that creates an audio input resource. |
| 54 * No sound will be captured until StartCapture() is called. | 55 * No sound will be captured until StartCapture() is called. |
| 56 * |
| 57 * @param[in] device_ref A <code>PP_Resource</code> identifying an audio |
| 58 * input device, returned by <code>PPB_StreamDeviceEnumerator_Dev</code>. |
| 55 */ | 59 */ |
| 56 PP_Resource (*Create)(PP_Instance instance, | 60 PP_Resource (*Create)(PP_Instance instance, |
| 61 PP_Resource device_ref, |
| 57 PP_Resource config, | 62 PP_Resource config, |
| 58 PPB_AudioInput_Callback audio_input_callback, | 63 PPB_AudioInput_Callback audio_input_callback, |
| 59 void* user_data); | 64 void* user_data); |
| 60 /** | 65 /** |
| 61 * IsAudioInput is a pointer to a function that determines if the given | 66 * IsAudioInput is a pointer to a function that determines if the given |
| 62 * resource is an audio input resource. | 67 * resource is an audio input resource. |
| 63 * | 68 * |
| 64 * @param[in] resource A PP_Resource containing a resource. | 69 * @param[in] resource A PP_Resource containing a resource. |
| 65 * | 70 * |
| 66 * @return A PP_BOOL containing containing PP_TRUE if the given resource is | 71 * @return A PP_BOOL containing containing PP_TRUE if the given resource is |
| (...skipping 30 matching lines...) Expand all Loading... |
| 97 * | 102 * |
| 98 * @param[in] config A PP_Resource containing the audio input resource. | 103 * @param[in] config A PP_Resource containing the audio input resource. |
| 99 * | 104 * |
| 100 * @return A PP_BOOL containing PP_TRUE if successful, otherwise PP_FALSE. | 105 * @return A PP_BOOL containing PP_TRUE if successful, otherwise PP_FALSE. |
| 101 * Also returns PP_TRUE (and is a no-op) if called while capture is already | 106 * Also returns PP_TRUE (and is a no-op) if called while capture is already |
| 102 * stopped. If a buffer is being captured, StopCapture will block until the | 107 * stopped. If a buffer is being captured, StopCapture will block until the |
| 103 * call completes. | 108 * call completes. |
| 104 */ | 109 */ |
| 105 PP_Bool (*StopCapture)(PP_Resource audio_input); | 110 PP_Bool (*StopCapture)(PP_Resource audio_input); |
| 106 }; | 111 }; |
| 112 |
| 113 struct PPB_AudioInput_Dev_0_1 { |
| 114 PP_Resource (*Create)(PP_Instance instance, |
| 115 PP_Resource config, |
| 116 PPB_AudioInput_Callback audio_input_callback, |
| 117 void* user_data); |
| 118 PP_Bool (*IsAudioInput)(PP_Resource audio_input); |
| 119 PP_Resource (*GetCurrentConfig)(PP_Resource audio_input); |
| 120 PP_Bool (*StartCapture)(PP_Resource audio_input); |
| 121 PP_Bool (*StopCapture)(PP_Resource audio_input); |
| 122 }; |
| 107 /** | 123 /** |
| 108 * @} | 124 * @} |
| 109 */ | 125 */ |
| 110 | 126 |
| 111 #endif /* PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_ */ | 127 #endif /* PPAPI_C_DEV_PPB_AUDIO_INPUT_DEV_H_ */ |
| 112 | 128 |
| OLD | NEW |