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

Side by Side Diff: ppapi/api/ppb_audio_frame.idl

Issue 140783004: [PPAPI] Pepper MediaStream API audio track implementation and example. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review issues 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
« no previous file with comments | « content/renderer/pepper/resource_converter.cc ('k') | ppapi/c/ppb_audio_frame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 6 /**
7 * Defines the <code>PPB_AudioFrame</code> interface. 7 * Defines the <code>PPB_AudioFrame</code> interface.
8 */ 8 */
9 9
10 [generate_thunk] 10 [generate_thunk]
11 11
12 label Chrome { 12 label Chrome {
13 [channel=dev] M34 = 0.1 13 [channel=dev] M34 = 0.1
14 }; 14 };
15 15
16 /** 16 /**
17 * PP_AudioFrame_SampleRate is an enumeration of the different audio sample 17 * PP_AudioFrame_SampleRate is an enumeration of the different audio sample
18 * rates. 18 * rates.
19 */ 19 */
20 enum PP_AudioFrame_SampleRate { 20 enum PP_AudioFrame_SampleRate {
21 PP_AUDIOFRAME_SAMPLERATE_UNKNOWN = 0, 21 PP_AUDIOFRAME_SAMPLERATE_UNKNOWN = 0,
22 PP_AUDIOFRAME_SAMPLERATE_8000 = 8000,
22 PP_AUDIOFRAME_SAMPLERATE_44100 = 44100 23 PP_AUDIOFRAME_SAMPLERATE_44100 = 44100
23 }; 24 };
24 25
25 /** 26 /**
26 * PP_AudioFrame_SampleSize is an enumeration of the different audio sample 27 * PP_AudioFrame_SampleSize is an enumeration of the different audio sample
27 * sizes. 28 * sizes.
28 */ 29 */
29 enum PP_AudioFrame_SampleSize { 30 enum PP_AudioFrame_SampleSize {
30 PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN = 0, 31 PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN = 0,
31 PP_AUDIOFRAME_SAMPLESIZE_16_BITS = 2 32 PP_AUDIOFRAME_SAMPLESIZE_16_BITS = 2
(...skipping 27 matching lines...) Expand all
59 * 60 *
60 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame 61 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
61 * resource. 62 * resource.
62 * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp 63 * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
63 * of the audio frame. Given in seconds since the start of the containing 64 * of the audio frame. Given in seconds since the start of the containing
64 * audio stream. 65 * audio stream.
65 */ 66 */
66 void SetTimestamp([in] PP_Resource frame, [in] PP_TimeDelta timestamp); 67 void SetTimestamp([in] PP_Resource frame, [in] PP_TimeDelta timestamp);
67 68
68 /** 69 /**
70 * Gets the sample rate of the audio frame.
71 *
72 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
73 * resource.
74 *
75 * @return The sample rate of the audio frame.
76 */
77 [on_failure=PP_AUDIOFRAME_SAMPLERATE_UNKNOWN]
78 PP_AudioFrame_SampleRate GetSampleRate([in] PP_Resource frame);
79
80 /**
69 * Gets the sample size of the audio frame. 81 * Gets the sample size of the audio frame.
70 * 82 *
71 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame 83 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
72 * resource. 84 * resource.
73 * 85 *
74 * @return The sample size of the audio frame. 86 * @return The sample size of the audio frame.
75 */ 87 */
76 [on_failure=PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN] 88 [on_failure=PP_AUDIOFRAME_SAMPLESIZE_UNKNOWN]
77 PP_AudioFrame_SampleSize GetSampleSize([in] PP_Resource frame); 89 PP_AudioFrame_SampleSize GetSampleSize([in] PP_Resource frame);
78 90
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 /** 123 /**
112 * Gets the size of the data buffer in bytes. 124 * Gets the size of the data buffer in bytes.
113 * 125 *
114 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame 126 * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
115 * resource. 127 * resource.
116 * 128 *
117 * @return The size of the data buffer in bytes. 129 * @return The size of the data buffer in bytes.
118 */ 130 */
119 uint32_t GetDataBufferSize([in] PP_Resource frame); 131 uint32_t GetDataBufferSize([in] PP_Resource frame);
120 }; 132 };
OLDNEW
« no previous file with comments | « content/renderer/pepper/resource_converter.cc ('k') | ppapi/c/ppb_audio_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698