Skip to content

Commit

Permalink
Changed all @code to <code> and @Endcode to </code> as per dmichael. …
Browse files Browse the repository at this point in the history
…Adding Polina to the review to look at url_loader.h and give approval of text that points to example.

Review URL: http://codereview.chromium.org/7715005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98856 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jond@google.com committed Aug 30, 2011
1 parent 5ce7b1d commit 216326c
Show file tree
Hide file tree
Showing 14 changed files with 188 additions and 211 deletions.
98 changes: 55 additions & 43 deletions ppapi/api/ppb_audio.idl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ label Chrome {
/**
* <code>PPB_Audio_Callback</code> defines the type of an audio callback
* function used to fill the audio buffer with data. Please see the
* <code>Create()</code> function in the <code>PPB_Audio</code> interface for
* Create() function in the <code>PPB_Audio</code> interface for
* more details on this callback.
*/
typedef void PPB_Audio_Callback([out] mem_t sample_buffer,
Expand All @@ -28,18 +28,21 @@ typedef void PPB_Audio_Callback([out] mem_t sample_buffer,
* <a href="/chrome/nativeclient/docs/audio.html">Pepper
* Audio API</a> for information on using this interface.
* Please see descriptions for each <code>PPB_Audio</code> and
* <code>PPB_AudioConfig</code> function for more details.
* <code>PPB_AudioConfig</code> function for more details. A C example using
* <code>PPB_Audio</code> and <code>PPB_AudioConfig</code> follows.
*
* A C example using PPB_Audio and PPB_AudioConfig:
* @code
* <strong>Example: </strong>
*
* <code>
* void audio_callback(void* sample_buffer,
* uint32_t buffer_size_in_bytes,
* void* user_data) {
* ... quickly fill in the buffer with samples and return to caller ...
* }
*
* ...Assume the application has cached the audio configuration interface in
* |audio_config_interface| and the audio interface in |audio_interface|...
* <code>audio_config_interface</code> and the audio interface in
* <code>audio_interface</code>...
*
* uint32_t count = audio_config_interface->RecommendSampleFrameCount(
* PP_AUDIOSAMPLERATE_44100, 4096);
Expand All @@ -49,30 +52,33 @@ typedef void PPB_Audio_Callback([out] mem_t sample_buffer,
* audio_callback, NULL);
* audio_interface->StartPlayback(pp_audio);
*
* ...audio_callback() will now be periodically invoked on a seperate thread...
* @endcode
* ...audio_callback() will now be periodically invoked on a separate thread...
* </code>
*/
interface PPB_Audio {
/**
* Create is a pointer to a function that creates an audio resource.
* No sound will be heard until StartPlayback() is called. The callback
* is called with the buffer address and given user data whenever the
* buffer needs to be filled. From within the callback, you should not
* call PPB_Audio functions. The callback will be called on a different
* thread than the one which created the interface. For performance-critical
* applications (i.e. low-latency audio), the callback should avoid blocking
* or calling functions that can obtain locks, such as malloc. The layout and
* the size of the buffer passed to the audio callback will be determined by
* the device configuration and is specified in the AudioConfig documentation.
* Create() creates an audio resource. No sound will be heard until
* StartPlayback() is called. The callback is called with the buffer address
* and given user data whenever the buffer needs to be filled. From within the
* callback, you should not call <code>PPB_Audio</code> functions. The
* callback will be called on a different thread than the one which created
* the interface. For performance-critical applications (i.e. low-latency
* audio), the callback should avoid blocking or calling functions that can
* obtain locks, such as malloc. The layout and the size of the buffer passed
* to the audio callback will be determined by the device configuration and is
* specified in the <code>AudioConfig</code> documentation.
*
* @param[in] instance A PP_Instance indentifying one instance of a module.
* @param[in] config A PP_Resource containing the audio config resource.
* @param[in] audio_callback A PPB_Audio_Callback callback function that the
* browser calls when it needs more samples to play.
* @param[in] instance A <code>PP_Instance</code> identifying one instance
* of a module.
* @param[in] config A <code>PP_Resource</code> corresponding to an audio
* config resource.
* @param[in] audio_callback A <code>PPB_Audio_Callback</code> callback
* function that the browser calls when it needs more samples to play.
* @param[in] user_data A pointer to user data used in the callback function.
*
* @return A PP_Resource containing the audio resource if successful or
* 0 if the configuration cannot be honored or the callback is null.
* @return A <code>PP_Resource</code> containing the audio resource if
* successful or 0 if the configuration cannot be honored or the callback is
* null.
*/
PP_Resource Create(
[in] PP_Instance instance,
Expand All @@ -81,50 +87,56 @@ interface PPB_Audio {
[inout] mem_t user_data);

/**
* IsAudio is a pointer to a function that determines if the given
* resource is an audio resource.
* IsAudio() determines if the provided resource is an audio resource.
*
* @param[in] resource A PP_Resource containing a resource.
* @param[in] resource A <code>PP_Resource</code> corresponding to a generic
* resource.
*
* @return A PP_BOOL containing containing PP_TRUE if the given resource is
* an Audio resource, otherwise PP_FALSE.
* @return A <code>PP_Bool</code> containing containing <code>PP_TRUE</code>
* if the given resource is an Audio resource, otherwise
* <code>PP_FALSE</code>.
*/
PP_Bool IsAudio(
[in] PP_Resource resource);

/**
* GetCurrrentConfig is a pointer to a function that returns an audio config
* resource for the given audio resource.
* GetCurrrentConfig() returns an audio config resource for the given audio
* resource.
*
* @param[in] config A PP_Resource containing the audio resource.
* @param[in] config A <code>PP_Resource</code> corresponding to an audio
* resource.
*
* @return A PP_Resource containing the audio config resource if successful.
* @return A <code>PP_Resource</code> containing the audio config resource if
* successful.
*/
PP_Resource GetCurrentConfig(
[in] PP_Resource audio);

/**
* StartPlayback is a pointer to a function that starts the playback of
* the audio resource and begins periodically calling the callback.
* StartPlayback() starts the playback of the audio resource and begins
* periodically calling the callback.
*
* @param[in] config A PP_Resource containing the audio resource.
* @param[in] config A <code>PP_Resource</code> corresponding to an audio
* resource.
*
* @return A PP_BOOL containing PP_TRUE if successful, otherwise PP_FALSE.
* Also returns PP_TRUE (and be a no-op) if called while playback is already
* @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if
* successful, otherwise <code>PP_FALSE</code>. Also returns
* <code>PP_TRUE</code> (and be a no-op) if called while playback is already
* in progress.
*/
PP_Bool StartPlayback(
[in] PP_Resource audio);

/**
* StopPlayback is a pointer to a function that stops the playback of
* the audio resource.
* StopPlayback() stops the playback of the audio resource.
*
* @param[in] config A PP_Resource containing the audio resource.
* @param[in] config A <code>PP_Resource</code> corresponding to an audio
* resource.
*
* @return A PP_BOOL containing PP_TRUE if successful, otherwise PP_FALSE.
* Also returns PP_TRUE (and is a no-op) if called while playback is already
* stopped. If a callback is in progress, StopPlayback will block until the
* @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if
* successful, otherwise <code>PP_FALSE</code>. Also returns
* <code>PP_TRUE</code> (and is a no-op) if called while playback is already
* stopped. If a callback is in progress, StopPlayback() will block until the
* callback completes.
*/
PP_Bool StopPlayback(
Expand Down
23 changes: 14 additions & 9 deletions ppapi/api/ppb_audio_config.idl
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ interface PPB_AudioConfig {
* right channel sample.
* Data will always be in the native endian format of the platform.
*
* @param[in] instance A <code>PP_Instance indentifying</code> one instance
* @param[in] instance A <code>PP_Instance</code> identifying one instance
* of a module.
* @param[in] sample_rate A P<code>P_AudioSampleRate</code> which is either
* <code>PP_AUDIOSAMPLERATE_44100</code> or
* <code>PP_AUDIOSAMPLERATE_48000</code>.
* @param[in] sample_frame_count A <code>uint32_t</code> frame count returned
* from the <code>RecommendSampleFrameCount</code> function.
*
* @return A <code>PP_Resource</code> containing the
* <code>PPB_Audio_Config</code> if successful or a null resource if the
* sample frame count or bit rate are not supported.
Expand Down Expand Up @@ -106,6 +107,7 @@ interface PPB_AudioConfig {
* <code>PP_AUDIOSAMPLERATE_48000.</code>
* @param[in] requested_sample_frame_count A <code>uint_32t</code> requested
* frame count.
*
* @return A <code>uint32_t</code> containing the recommended sample frame
* count if successful.
*/
Expand All @@ -117,9 +119,10 @@ interface PPB_AudioConfig {
* IsAudioConfig() determines if the given resource is a
* <code>PPB_Audio_Config</code>.
*
* @param[in] resource A <code>PP_Resource</code> containing the audio config
* resource.
* @return A <code>PP_BOOL</code> containing <code>PP_TRUE</code> if the given
* @param[in] resource A <code>PP_Resource</code> corresponding to an audio
* config resource.
*
* @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the given
* resource is an <code>AudioConfig</code> resource, otherwise
* <code>PP_FALSE</code>.
*/
Expand All @@ -130,8 +133,9 @@ interface PPB_AudioConfig {
* GetSampleRate() returns the sample rate for the given
* <code>PPB_Audio_Config</code>.
*
* @param[in] config A <code>PP_Resource</code> containing the
* @param[in] config A <code>PP_Resource</code> corresponding to a
* <code>PPB_Audio_Config</code>.
*
* @return A <code>PP_AudioSampleRate</code> containing sample rate or
* <code>PP_AUDIOSAMPLERATE_NONE</code> if the resource is invalid.
*/
Expand All @@ -142,11 +146,12 @@ interface PPB_AudioConfig {
* GetSampleFrameCount() returns the sample frame count for the given
* <code>PPB_Audio_Config</code>.
*
* @param[in] config A <code>PP_Resource</code> containing the audio config
* resource.
* @param[in] config A <code>PP_Resource</code> corresponding to an audio
* config resource.
*
* @return A <code>uint32_t</code> containing sample frame count or
* 0 if the resource is invalid. See <code>RecommendSampleFrameCount</code>
* for more on sample frame counts.
* 0 if the resource is invalid. Refer to
* RecommendSampleFrameCount() for more on sample frame counts.
*/
uint32_t GetSampleFrameCount(
[in] PP_Resource config);
Expand Down
10 changes: 5 additions & 5 deletions ppapi/api/ppb_messaging.idl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface PPB_Messaging {
* the DOM element for the given module instance. A call to PostMessage()
* will not block while the message is processed.
*
* @param[in] instance A <code>PP_Instance</code> indentifying one instance
* @param[in] instance A <code>PP_Instance</code> identifying one instance
* of a module.
* @param[in] message A <code>PP_Var</code> containing the data to be sent to
* JavaScript.
Expand All @@ -44,7 +44,7 @@ interface PPB_Messaging {
*
* <strong>Example:</strong>
*
* @code
* <code>
*
* <body>
* <object id="plugin"
Expand All @@ -57,11 +57,11 @@ interface PPB_Messaging {
* </script>
* </body>
*
* @endcode
* </code>
*
* The module instance then invokes PostMessage() as follows:
*
* @code
* <code>
*
*
* char hello_world[] = "Hello world!";
Expand All @@ -71,7 +71,7 @@ interface PPB_Messaging {
* ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var.
* ppb_var_interface->Release(hello_var);
*
* @endcode
* </code>
*
* The browser will pop-up an alert saying "Hello world!"
*/
Expand Down
10 changes: 5 additions & 5 deletions ppapi/api/ppp_messaging.idl
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ interface PPP_Messaging {
* JavaScript execution will not be blocked while HandleMessage() is
* processing the message.
*
* @param[in] instance A <code>PP_Instance</code> indentifying one instance
* @param[in] instance A <code>PP_Instance</code> identifying one instance
* of a module.
* @param[in] message A <code>PP_Var</code> containing the data to be sent
* to JavaScript. Message can have an int32_t, double, bool, or string value
* (objects are not supported).
*
* <strong>Example:</strong>
*
* The following JavaScript code invokes <code>HandleMessage</code>, passing
* the module instance on which it was invoked, with <code>message</code>
* being a string <code>PP_Var</code> containing "Hello world!"
*
* @code
* <strong>Example:</strong>
*
* <code>
*
* <body>
* <object id="plugin"
Expand All @@ -49,7 +49,7 @@ interface PPP_Messaging {
* </script>
* </body>
*
* @endcode
* </code>
*
*/
void HandleMessage([in] PP_Instance instance, [in] PP_Var message);
Expand Down
Loading

0 comments on commit 216326c

Please sign in to comment.