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

Unified Diff: ppapi/api/ppb_media_stream_audio_track.idl

Issue 126373003: [PPAPI] API definition for audio media stream artifacts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_track_impl_cl
Patch Set: Update Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
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 68%
copy from ppapi/api/ppb_media_stream_video_track.idl
copy to ppapi/api/ppb_media_stream_audio_track.idl
index bf29e308b00c85c49587ec78fa3951e16357e5f6..54d922b1cebe44a6aa3e81de8e4e2dd154f93a2f 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 {
dmichael (off chromium) 2014/01/07 22:00:59 We had a discussion about the names before holiday
Peng 2014/01/07 22:29:27 I asked yuzhu, the dev API can be changed. So I la
dmichael (off chromium) 2014/01/09 17:07:46 No, that's totally fine. We can come back around a
Peng 2014/01/09 20:59:58 Right now, I can not image how a plugin side track
/**
- * 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.
+ * Closes the MediaStream audio track and disconnects it from audio source.
dmichael (off chromium) 2014/01/07 22:00:59 from +the+ audio
Peng 2014/01/07 22:29:27 Done.
* 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);
};

Powered by Google App Engine
This is Rietveld 408576698