Index: ppapi/c/dev/ppb_video_capture_dev.h |
diff --git a/ppapi/c/dev/ppb_video_capture_dev.h b/ppapi/c/dev/ppb_video_capture_dev.h |
index 396879c5777484656a778fb216ebe63db7955ce3..3c35d507ad134a97e062d6117831dae869aada59 100644 |
--- a/ppapi/c/dev/ppb_video_capture_dev.h |
+++ b/ppapi/c/dev/ppb_video_capture_dev.h |
@@ -3,20 +3,22 @@ |
* found in the LICENSE file. |
*/ |
-/* From dev/ppb_video_capture_dev.idl modified Tue Oct 11 10:01:39 2011. */ |
+/* From dev/ppb_video_capture_dev.idl modified Thu Jan 26 11:39:48 2012. */ |
#ifndef PPAPI_C_DEV_PPB_VIDEO_CAPTURE_DEV_H_ |
#define PPAPI_C_DEV_PPB_VIDEO_CAPTURE_DEV_H_ |
#include "ppapi/c/dev/pp_video_capture_dev.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" |
#define PPB_VIDEOCAPTURE_DEV_INTERFACE_0_1 "PPB_VideoCapture(Dev);0.1" |
-#define PPB_VIDEOCAPTURE_DEV_INTERFACE PPB_VIDEOCAPTURE_DEV_INTERFACE_0_1 |
+#define PPB_VIDEOCAPTURE_DEV_INTERFACE_0_2 "PPB_VideoCapture(Dev);0.2" |
+#define PPB_VIDEOCAPTURE_DEV_INTERFACE PPB_VIDEOCAPTURE_DEV_INTERFACE_0_2 |
/** |
* @file |
@@ -53,7 +55,7 @@ |
* 4:2:0, one byte per pixel, tightly packed (width x height Y values, then |
* width/2 x height/2 U values, then width/2 x height/2 V values). |
*/ |
-struct PPB_VideoCapture_Dev_0_1 { |
+struct PPB_VideoCapture_Dev_0_2 { |
/** |
* Creates a new VideoCapture. |
*/ |
@@ -63,20 +65,35 @@ struct PPB_VideoCapture_Dev_0_1 { |
*/ |
PP_Bool (*IsVideoCapture)(PP_Resource video_capture); |
/** |
- * Starts the capture. |requested_info| is a pointer to a structure containing |
- * the requested resolution and frame rate. |buffer_count| is the number of |
- * buffers requested by the plugin. Note: it is only used as advisory, the |
- * browser may allocate more of fewer based on available resources. |
- * How many buffers depends on usage. At least 2 to make sure latency doesn't |
- * cause lost frames. If the plugin expects to hold on to more than one buffer |
- * at a time (e.g. to do multi-frame processing, like video encoding), it |
- * should request that many more. |
+ * Enumerates video capture devices. Once the operation is completed |
+ * successfully. |GetDevices()| can be used to retrieve the devices. |
+ */ |
+ int32_t (*EnumerateDevices)(PP_Resource video_capture, |
+ struct PP_CompletionCallback callback); |
+ /** |
+ * Gets video capture devices. The returned value is a PPB_ResourceArray_Dev |
+ * resource if successful, which holds a list of PPB_DeviceRef_Dev resources. |
+ */ |
+ PP_Resource (*GetDevices)(PP_Resource video_capture); |
+ /** |
+ * Starts the capture. |device_ref| identifies a video capture device. It |
+ * could be one of the resource in the array returned by |GetDevices()|, or 0 |
+ * which means the default device. |
+ * |requested_info| is a pointer to a structure containing the requested |
+ * resolution and frame rate. |buffer_count| is the number of buffers |
+ * requested by the plugin. Note: it is only used as advisory, the browser may |
+ * allocate more or fewer based on available resources. How many buffers |
+ * depends on usage. At least 2 to make sure latency doesn't cause lost |
+ * frames. If the plugin expects to hold on to more than one buffer at a time |
+ * (e.g. to do multi-frame processing, like video encoding), it should request |
+ * that many more. |
* |
* Returns PP_ERROR_FAILED if called when the capture was already started, or |
* PP_OK on success. |
*/ |
int32_t (*StartCapture)( |
PP_Resource video_capture, |
+ PP_Resource device_ref, |
const struct PP_VideoCaptureDeviceInfo_Dev* requested_info, |
uint32_t buffer_count); |
/** |
@@ -98,7 +115,18 @@ struct PPB_VideoCapture_Dev_0_1 { |
int32_t (*StopCapture)(PP_Resource video_capture); |
}; |
-typedef struct PPB_VideoCapture_Dev_0_1 PPB_VideoCapture_Dev; |
+typedef struct PPB_VideoCapture_Dev_0_2 PPB_VideoCapture_Dev; |
+ |
+struct PPB_VideoCapture_Dev_0_1 { |
+ PP_Resource (*Create)(PP_Instance instance); |
+ PP_Bool (*IsVideoCapture)(PP_Resource video_capture); |
+ int32_t (*StartCapture)( |
+ PP_Resource video_capture, |
+ const struct PP_VideoCaptureDeviceInfo_Dev* requested_info, |
+ uint32_t buffer_count); |
+ int32_t (*ReuseBuffer)(PP_Resource video_capture, uint32_t buffer); |
+ int32_t (*StopCapture)(PP_Resource video_capture); |
+}; |
/** |
* @} |
*/ |