Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: ppapi/c/ppb_audio_frame.h

Issue 140783004: [PPAPI] Pepper MediaStream API audio track implementation and example. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_audio_frame.idl modified Wed Jan 22 21:25:31 2014. */ 6 /* From ppb_audio_frame.idl modified Wed Jan 29 13:24:24 2014. */
7 7
8 #ifndef PPAPI_C_PPB_AUDIO_FRAME_H_ 8 #ifndef PPAPI_C_PPB_AUDIO_FRAME_H_
9 #define PPAPI_C_PPB_AUDIO_FRAME_H_ 9 #define PPAPI_C_PPB_AUDIO_FRAME_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h" 12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_resource.h" 13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_time.h" 15 #include "ppapi/c/pp_time.h"
16 16
17 #define PPB_AUDIOFRAME_INTERFACE_0_1 "PPB_AudioFrame;0.1" /* dev */ 17 #define PPB_AUDIOFRAME_INTERFACE_0_1 "PPB_AudioFrame;0.1" /* dev */
18 /** 18 /**
19 * @file 19 * @file
20 * Defines the <code>PPB_AudioFrame</code> interface. 20 * Defines the <code>PPB_AudioFrame</code> interface.
21 */ 21 */
22 22
23 23
24 /** 24 /**
25 * @addtogroup Enums 25 * @addtogroup Enums
26 * @{ 26 * @{
27 */ 27 */
28 /** 28 /**
29 * PP_AudioFrame_SampleRate is an enumeration of the different audio sample 29 * PP_AudioFrame_SampleRate is an enumeration of the different audio sample
30 * rates. 30 * rates.
31 */ 31 */
32 typedef enum { 32 typedef enum {
33 PP_AUDIOFRAME_SAMPLERATE_UNKNOWN = 0, 33 PP_AUDIOFRAME_SAMPLERATE_UNKNOWN = 0,
34 PP_AUDIOFRAME_SAMPLERATE_8000 = 8000,
34 PP_AUDIOFRAME_SAMPLERATE_44100 = 44100 35 PP_AUDIOFRAME_SAMPLERATE_44100 = 44100
35 } PP_AudioFrame_SampleRate; 36 } PP_AudioFrame_SampleRate;
36 37
37 /** 38 /**
38 * PP_AudioFrame_SampleSize is an enumeration of the different audio sample 39 * PP_AudioFrame_SampleSize is an enumeration of the different audio sample
39 * sizes. 40 * sizes.
40 */ 41 */
41 typedef enum { 42 typedef enum {
42 PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN = 0, 43 PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN = 0,
43 PP_AUDIOFRAME_SAMPLESIZE_16_BITS = 2 44 PP_AUDIOFRAME_SAMPLESIZE_16_BITS = 2
(...skipping 30 matching lines...) Expand all
74 * Sets the timestamp of the audio frame. 75 * Sets the timestamp of the audio frame.
75 * 76 *
76 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame 77 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
77 * resource. 78 * resource.
78 * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp 79 * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
79 * of the audio frame. Given in seconds since the start of the containing 80 * of the audio frame. Given in seconds since the start of the containing
80 * audio stream. 81 * audio stream.
81 */ 82 */
82 void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp); 83 void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp);
83 /** 84 /**
85 * Gets the sample rate of the audio frame.
86 *
87 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
88 * resource.
89 *
90 * @return The sample rate of the audio frame.
91 */
92 PP_AudioFrame_SampleRate (*GetSampleRate)(PP_Resource frame);
93 /**
84 * Gets the sample size of the audio frame. 94 * Gets the sample size of the audio frame.
85 * 95 *
86 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame 96 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
87 * resource. 97 * resource.
88 * 98 *
89 * @return The sample size of the audio frame. 99 * @return The sample size of the audio frame.
90 */ 100 */
91 PP_AudioFrame_SampleSize (*GetSampleSize)(PP_Resource frame); 101 PP_AudioFrame_SampleSize (*GetSampleSize)(PP_Resource frame);
92 /** 102 /**
93 * Gets the number of channels in the audio frame. 103 * Gets the number of channels in the audio frame.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 * @return The size of the data buffer in bytes. 137 * @return The size of the data buffer in bytes.
128 */ 138 */
129 uint32_t (*GetDataBufferSize)(PP_Resource frame); 139 uint32_t (*GetDataBufferSize)(PP_Resource frame);
130 }; 140 };
131 /** 141 /**
132 * @} 142 * @}
133 */ 143 */
134 144
135 #endif /* PPAPI_C_PPB_AUDIO_FRAME_H_ */ 145 #endif /* PPAPI_C_PPB_AUDIO_FRAME_H_ */
136 146
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698