Chromium Code Reviews| Index: ppapi/api/dev/ppb_video_capture_dev.idl |
| diff --git a/ppapi/api/dev/ppb_video_capture_dev.idl b/ppapi/api/dev/ppb_video_capture_dev.idl |
| index fd7919094ba69a667362e5424cc2628df3c3a1e9..d95f446a3e874ae453c3cbe6043dd71c9bf456a0 100644 |
| --- a/ppapi/api/dev/ppb_video_capture_dev.idl |
| +++ b/ppapi/api/dev/ppb_video_capture_dev.idl |
| @@ -7,7 +7,8 @@ |
| * This file defines the <code>PPB_VideoCapture_Dev</code> interface. |
| */ |
| label Chrome { |
| - M14 = 0.1 |
| + M14 = 0.1, |
| + M18 = 0.2 |
| }; |
| /** |
| @@ -52,7 +53,7 @@ interface PPB_VideoCapture_Dev { |
| * 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. |
| + * 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 |
| @@ -61,12 +62,53 @@ interface PPB_VideoCapture_Dev { |
| * Returns PP_ERROR_FAILED if called when the capture was already started, or |
| * PP_OK on success. |
| */ |
| + [version=0.1] |
| int32_t StartCapture( |
| [in] PP_Resource video_capture, |
| [in] PP_VideoCaptureDeviceInfo_Dev requested_info, |
| [in] uint32_t buffer_count); |
| /** |
| + * Enumerates video capture devices. Once the operation is completed |
| + * successfully. |GetDevices()| can be used to retrieve the devices. |
| + */ |
| + [version=0.2] |
| + int32_t EnumerateDevices( |
|
brettw
2012/02/06 21:51:52
Thinking about this, I think it would be better to
yzshen1
2012/02/06 22:42:56
I agree that this is more intuitive. However, it i
brettw
2012/02/06 23:01:42
Yeah, I agree. The other way to do this is the way
yzshen1
2012/02/07 00:15:01
IMHO, the way how PPB_Transport_Dev.GetNextAddress
|
| + [in] PP_Resource video_capture, |
| + [in] 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. |
| + */ |
| + [version=0.2] |
| + PP_Resource GetDevices( |
| + [in] 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. |
| + */ |
| + [version=0.2] |
| + int32_t StartCapture( |
| + [in] PP_Resource video_capture, |
| + [in] PP_Resource device_ref, |
| + [in] PP_VideoCaptureDeviceInfo_Dev requested_info, |
| + [in] uint32_t buffer_count); |
| + |
| + /** |
| * Allows the browser to reuse a buffer that was previously sent by |
| * PPP_VideoCapture_Dev.OnBufferReady. |buffer| is the index of the buffer in |
| * the array returned by PPP_VideoCapture_Dev.OnDeviceInfo. |