OLD | NEW |
1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 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 ppb_media_stream_audio_track.idl modified Fri Mar 28 10:13:34 2014. */ | 6 /* From ppb_media_stream_audio_track.idl modified Wed May 28 09:36:15 2014. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ | 8 #ifndef PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ |
9 #define PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ | 9 #define PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.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 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 */ | 91 */ |
92 PP_Bool (*IsMediaStreamAudioTrack)(PP_Resource resource); | 92 PP_Bool (*IsMediaStreamAudioTrack)(PP_Resource resource); |
93 /** | 93 /** |
94 * Configures underlying buffers for incoming audio samples. | 94 * Configures underlying buffers for incoming audio samples. |
95 * If the application doesn't want to drop samples, then the | 95 * If the application doesn't want to drop samples, then the |
96 * <code>PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS</code> should be | 96 * <code>PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS</code> should be |
97 * chosen such that inter-buffer processing time variability won't overrun all | 97 * chosen such that inter-buffer processing time variability won't overrun all |
98 * the input buffers. If all buffers are filled, then samples will be | 98 * the input buffers. If all buffers are filled, then samples will be |
99 * dropped. The application can detect this by examining the timestamp on | 99 * dropped. The application can detect this by examining the timestamp on |
100 * returned buffers. If <code>Configure()</code> is not called, default | 100 * returned buffers. If <code>Configure()</code> is not called, default |
101 * settings will be used. | 101 * settings will be used. Calls to Configure while the plugin holds |
| 102 * buffers will fail. |
102 * Example usage from plugin code: | 103 * Example usage from plugin code: |
103 * @code | 104 * @code |
104 * int32_t attribs[] = { | 105 * int32_t attribs[] = { |
105 * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS, 4, | 106 * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_BUFFERS, 4, |
106 * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_DURATION, 10, | 107 * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_DURATION, 10, |
107 * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_NONE}; | 108 * PP_MEDIASTREAMAUDIOTRACK_ATTRIB_NONE}; |
108 * track_if->Configure(track, attribs, callback); | 109 * track_if->Configure(track, attribs, callback); |
109 * @endcode | 110 * @endcode |
110 * | 111 * |
111 * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio | 112 * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 void (*Close)(PP_Resource audio_track); | 206 void (*Close)(PP_Resource audio_track); |
206 }; | 207 }; |
207 | 208 |
208 typedef struct PPB_MediaStreamAudioTrack_0_1 PPB_MediaStreamAudioTrack; | 209 typedef struct PPB_MediaStreamAudioTrack_0_1 PPB_MediaStreamAudioTrack; |
209 /** | 210 /** |
210 * @} | 211 * @} |
211 */ | 212 */ |
212 | 213 |
213 #endif /* PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ */ | 214 #endif /* PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ */ |
214 | 215 |
OLD | NEW |