* found in the LICENSE file.
*/
-/* From ppb_media_stream_video_track.idl modified Wed Feb 19 11:06:48 2014. */
+/* From ppb_media_stream_video_track.idl modified Mon Apr 7 15:25:56 2014. */
#ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_
#define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#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_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1 "PPB_MediaStreamVideoTrack;0.1"
+#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_1_0 \
+ "PPB_MediaStreamVideoTrack;1.0" /* dev */
+#define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE \
+ PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1
+
/**
* @file
* Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for
* receiving video frames from a MediaStream video track in the browser.
- * This interface is still in development (Dev API status) and may change.
*/
* @addtogroup Interfaces
* @{
*/
-struct PPB_MediaStreamVideoTrack_0_1 { /* dev */
+struct PPB_MediaStreamVideoTrack_1_0 { /* dev */
+ /**
+ * Creates a PPB_MediaStreamVideoTrack resource for video output. Call this
+ * when you will be creating frames and putting them to the track.
+ *
+ * @param[in] instance A <code>PP_Instance</code> identifying one instance of
+ * a module.
+ *
+ * @return A <code>PP_Resource</code> corresponding to a
+ * PPB_MediaStreamVideoTrack resource if successful, 0 if failed.
+ */
+ PP_Resource (*Create)(PP_Instance instance);
/**
* Determines if a resource is a MediaStream video track resource.
*
* MediaStream video track resource.
*/
void (*Close)(PP_Resource video_track);
+ /**
+ * Gets a free frame for output. The frame is allocated by
+ * <code>Configure()</code>. The caller should fill it with frame data, and
+ * then use |PutFrame()| to send the frame back.
+ */
+ int32_t (*GetEmptyFrame)(PP_Resource video_track,
+ PP_Resource* frame,
+ struct PP_CompletionCallback callback);
+ /**
+ * Sends a frame returned by |GetEmptyFrame()| to the output track.
+ * After this function, the |frame| should not be used anymore and the
+ * caller should release the reference that it holds.
+ */
+ int32_t (*PutFrame)(PP_Resource video_track, PP_Resource frame);
+};
+
+struct PPB_MediaStreamVideoTrack_0_1 {
+ PP_Bool (*IsMediaStreamVideoTrack)(PP_Resource resource);
+ int32_t (*Configure)(PP_Resource video_track,
+ const int32_t attrib_list[],
+ struct PP_CompletionCallback callback);
+ int32_t (*GetAttrib)(PP_Resource video_track,
+ PP_MediaStreamVideoTrack_Attrib attrib,
+ int32_t* value);
+ struct PP_Var (*GetId)(PP_Resource video_track);
+ PP_Bool (*HasEnded)(PP_Resource video_track);
+ int32_t (*GetFrame)(PP_Resource video_track,
+ PP_Resource* frame,
+ struct PP_CompletionCallback callback);
+ int32_t (*RecycleFrame)(PP_Resource video_track, PP_Resource frame);
+ void (*Close)(PP_Resource video_track);
};
+
+typedef struct PPB_MediaStreamVideoTrack_0_1 PPB_MediaStreamVideoTrack;
/**
* @}
*/