| Index: ppapi/api/ppb_media_stream_audio_track.idl
|
| diff --git a/ppapi/api/ppb_media_stream_video_track.idl b/ppapi/api/ppb_media_stream_audio_track.idl
|
| similarity index 66%
|
| copy from ppapi/api/ppb_media_stream_video_track.idl
|
| copy to ppapi/api/ppb_media_stream_audio_track.idl
|
| index bf29e308b00c85c49587ec78fa3951e16357e5f6..d57ca21604b3e78ec9fac3d8bab3384e523eac7a 100644
|
| --- a/ppapi/api/ppb_media_stream_video_track.idl
|
| +++ b/ppapi/api/ppb_media_stream_audio_track.idl
|
| @@ -4,8 +4,8 @@
|
| */
|
|
|
| /**
|
| - * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for
|
| - * receiving video frames from a MediaStream video track in the browser.
|
| + * Defines the <code>PPB_MediaStreamAudioTrack</code> interface. Used for
|
| + * receiving audio frames from a MediaStream audio track in the browser.
|
| * This interface is still in development (Dev API status) and may change.
|
| */
|
| label Chrome {
|
| @@ -14,17 +14,17 @@ label Chrome {
|
|
|
| /**
|
| */
|
| -interface PPB_MediaStreamVideoTrack {
|
| +interface PPB_MediaStreamAudioTrack {
|
| /**
|
| - * Determines if a resource is a MediaStream video track resource.
|
| + * Determines if a resource is a MediaStream audio track resource.
|
| *
|
| * @param[in] resource The <code>PP_Resource</code> to test.
|
| *
|
| * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
|
| - * resource is a Mediastream video track resource or <code>PP_FALSE</code>
|
| + * resource is a Mediastream audio track resource or <code>PP_FALSE</code>
|
| * otherwise.
|
| */
|
| - PP_Bool IsMediaStreamVideoTrack([in] PP_Resource resource);
|
| + PP_Bool IsMediaStreamAudioTrack([in] PP_Resource resource);
|
|
|
| /**
|
| * Configures underlying frame buffers for incoming frames.
|
| @@ -35,40 +35,42 @@ interface PPB_MediaStreamVideoTrack {
|
| * this by examining the timestamp on returned frames.
|
| * If <code>Configure()</code> is not used, default settings will be used.
|
| *
|
| - * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
|
| + * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
|
| * resource.
|
| - * @param[in] max_buffered_frames The maximum number of video frames to
|
| + * @param[in] samples_per_frame The number of audio samples in an audio frame.
|
| + * @param[in] max_buffered_frames The maximum number of audio frames to
|
| * hold in the input buffer.
|
| *
|
| * @return An int32_t containing a result code from <code>pp_errors.h</code>.
|
| */
|
| - int32_t Configure([in] PP_Resource video_track,
|
| + int32_t Configure([in] PP_Resource audio_track,
|
| + [in] uint32_t samples_per_frame,
|
| [in] uint32_t max_buffered_frames);
|
|
|
| /**
|
| - * Returns the track ID of the underlying MediaStream video track.
|
| + * Returns the track ID of the underlying MediaStream audio track.
|
| *
|
| - * @param[in] video_track The <code>PP_Resource</code> to check.
|
| + * @param[in] audio_track The <code>PP_Resource</code> to check.
|
| *
|
| * @return A <code>PP_Var</code> containing the MediaStream track ID as
|
| * a string.
|
| */
|
| - PP_Var GetId([in] PP_Resource video_track);
|
| + PP_Var GetId([in] PP_Resource audio_track);
|
|
|
| /**
|
| * Checks whether the underlying MediaStream track has ended.
|
| * Calls to GetFrame while the track has ended are safe to make and will
|
| * complete, but will fail.
|
| *
|
| - * @param[in] video_track The <code>PP_Resource</code> to check.
|
| + * @param[in] audio_track The <code>PP_Resource</code> to check.
|
| *
|
| * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
|
| * MediaStream track has ended or <code>PP_FALSE</code> otherwise.
|
| */
|
| - PP_Bool HasEnded([in] PP_Resource video_track);
|
| + PP_Bool HasEnded([in] PP_Resource audio_track);
|
|
|
| /**
|
| - * Gets the next video frame from the MediaStream track.
|
| + * Gets the next audio frame from the MediaStream track.
|
| * If internal processing is slower than the incoming frame rate, new frames
|
| * will be dropped from the incoming stream. Once the input buffer is full,
|
| * frames will be dropped until <code>RecycleFrame()</code> is called to free
|
| @@ -78,9 +80,9 @@ interface PPB_MediaStreamVideoTrack {
|
| * <code>callback</code> will be called, when a new frame is received or an
|
| * error happens.
|
| *
|
| - * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
|
| + * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
|
| * resource.
|
| - * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame
|
| + * @param[out] frame A <code>PP_Resource</code> corresponding to an AudioFrame
|
| * resource.
|
| * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
|
| * completion of GetFrame().
|
| @@ -89,7 +91,7 @@ interface PPB_MediaStreamVideoTrack {
|
| * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer
|
| * was not allocated successfully.
|
| */
|
| - int32_t GetFrame([in] PP_Resource video_track,
|
| + int32_t GetFrame([in] PP_Resource audio_track,
|
| [out] PP_Resource frame,
|
| [in] PP_CompletionCallback callback);
|
|
|
| @@ -99,23 +101,23 @@ interface PPB_MediaStreamVideoTrack {
|
| * invalid. The caller should release all references it holds to
|
| * <code>frame</code> and not use it anymore.
|
| *
|
| - * @param[in] video_track A <code>PP_Resource</code> corresponding to a video
|
| + * @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
|
| * resource.
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a VideoFrame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an AudioFrame
|
| * resource returned by <code>GetFrame()</code>.
|
| *
|
| * @return An int32_t containing a result code from <code>pp_errors.h</code>.
|
| */
|
| - int32_t RecycleFrame([in] PP_Resource video_track,
|
| + int32_t RecycleFrame([in] PP_Resource audio_track,
|
| [in] PP_Resource frame);
|
|
|
| /**
|
| - * Closes the MediaStream video track and disconnects it from video source.
|
| - * After calling <code>Close()</code>, no new frames will be received.
|
| + * Closes the MediaStream audio track and disconnects it from the audio
|
| + * source. After calling <code>Close()</code>, no new frames will be received.
|
| *
|
| - * @param[in] video_track A <code>PP_Resource</code> corresponding to a
|
| - * MediaStream video track resource.
|
| + * @param[in] audio_track A <code>PP_Resource</code> corresponding to a
|
| + * MediaStream audio track resource.
|
| */
|
| - void Close([in] PP_Resource video_track);
|
| + void Close([in] PP_Resource audio_track);
|
| };
|
|
|
|
|