Index: ppapi/c/ppb_media_stream_audio_track.h |
diff --git a/ppapi/c/ppb_media_stream_video_track.h b/ppapi/c/ppb_media_stream_audio_track.h |
similarity index 62% |
copy from ppapi/c/ppb_media_stream_video_track.h |
copy to ppapi/c/ppb_media_stream_audio_track.h |
index ff12c200fc65fda0a042656fc03bba64983a5a00..89c78d07b47309e2871f725e81aaf5d3e8d90d1b 100644 |
--- a/ppapi/c/ppb_media_stream_video_track.h |
+++ b/ppapi/c/ppb_media_stream_audio_track.h |
@@ -3,10 +3,10 @@ |
* found in the LICENSE file. |
*/ |
-/* From ppb_media_stream_video_track.idl modified Fri Dec 27 17:28:11 2013. */ |
+/* From ppb_media_stream_audio_track.idl modified Tue Jan 7 17:05:06 2014. */ |
-#ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ |
-#define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ |
+#ifndef PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ |
+#define PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ |
#include "ppapi/c/pp_bool.h" |
#include "ppapi/c/pp_completion_callback.h" |
@@ -15,12 +15,12 @@ |
#include "ppapi/c/pp_stdint.h" |
#include "ppapi/c/pp_var.h" |
-#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1 \ |
- "PPB_MediaStreamVideoTrack;0.1" /* dev */ |
+#define PPB_MEDIASTREAMAUDIOTRACK_INTERFACE_0_1 \ |
+ "PPB_MediaStreamAudioTrack;0.1" /* dev */ |
/** |
* @file |
- * 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. |
*/ |
@@ -31,17 +31,17 @@ |
*/ |
/** |
*/ |
-struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ |
+struct PPB_MediaStreamAudioTrack_0_1 { /* dev */ |
/** |
- * 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)(PP_Resource resource); |
+ PP_Bool (*IsMediaStreamAudioTrack)(PP_Resource resource); |
/** |
* Configures underlying frame buffers for incoming frames. |
* If the application doesn't want to drop frames, then the |
@@ -51,36 +51,39 @@ struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ |
* 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)(PP_Resource video_track, uint32_t max_buffered_frames); |
+ int32_t (*Configure)(PP_Resource audio_track, |
+ uint32_t samples_per_frame, |
+ 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. |
*/ |
- struct PP_Var (*GetId)(PP_Resource video_track); |
+ struct PP_Var (*GetId)(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)(PP_Resource video_track); |
+ PP_Bool (*HasEnded)(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 |
@@ -89,13 +92,10 @@ struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ |
* <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the |
* <code>callback</code> will be called, when a new frame is received or an |
* error happens. |
- * If the caller holds a frame returned by the previous call of |
- * <code>GetFrame()</code>, <code>PP_ERROR_INPROGRESS</code> will be returned. |
- * The caller should recycle the previous frame before getting the next frame. |
* |
- * @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(). |
@@ -104,7 +104,7 @@ struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ |
* Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer |
* was not allocated successfully. |
*/ |
- int32_t (*GetFrame)(PP_Resource video_track, |
+ int32_t (*GetFrame)(PP_Resource audio_track, |
PP_Resource* frame, |
struct PP_CompletionCallback callback); |
/** |
@@ -113,26 +113,26 @@ struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ |
* 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)(PP_Resource video_track, PP_Resource frame); |
+ int32_t (*RecycleFrame)(PP_Resource audio_track, 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)(PP_Resource video_track); |
+ void (*Close)(PP_Resource audio_track); |
}; |
/** |
* @} |
*/ |
-#endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ |
+#endif /* PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ */ |