Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPB_VideoCapture_Dev</code> interface. | 7 * This file defines the <code>PPB_VideoCapture_Dev</code> interface. |
| 8 */ | 8 */ |
| 9 label Chrome { | 9 label Chrome { |
| 10 M19 = 0.2, | |
| 11 M25 = 0.3 | 10 M25 = 0.3 |
|
yzshen1
2014/01/06 17:23:19
Can we auto gen the thunk?
| |
| 12 }; | 11 }; |
| 13 | 12 |
| 14 /** | 13 /** |
| 15 * Video capture interface. It goes hand-in-hand with PPP_VideoCapture_Dev. | 14 * Video capture interface. It goes hand-in-hand with PPP_VideoCapture_Dev. |
| 16 * | 15 * |
| 17 * Theory of operation: | 16 * Theory of operation: |
| 18 * 1- Create a VideoCapture resource using Create. | 17 * 1- Create a VideoCapture resource using Create. |
| 19 * 2- Find available video capture devices using EnumerateDevices. | 18 * 2- Find available video capture devices using EnumerateDevices. |
| 20 * 3- Open a video capture device. In addition to a device reference (0 can be | 19 * 3- Open a video capture device. In addition to a device reference (0 can be |
| 21 * used to indicate the default device), you pass in the requested info | 20 * used to indicate the default device), you pass in the requested info |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 47 PP_Resource Create( | 46 PP_Resource Create( |
| 48 [in] PP_Instance instance); | 47 [in] PP_Instance instance); |
| 49 | 48 |
| 50 /** | 49 /** |
| 51 * Returns PP_TRUE if the given resource is a VideoCapture. | 50 * Returns PP_TRUE if the given resource is a VideoCapture. |
| 52 */ | 51 */ |
| 53 PP_Bool IsVideoCapture( | 52 PP_Bool IsVideoCapture( |
| 54 [in] PP_Resource video_capture); | 53 [in] PP_Resource video_capture); |
| 55 | 54 |
| 56 /** | 55 /** |
| 57 * Enumerates video capture devices. Once the operation is completed | |
| 58 * successfully, |devices| will be set to a PPB_ResourceArray_Dev resource, | |
| 59 * which holds a list of PPB_DeviceRef_Dev resources. | |
| 60 * | |
| 61 * Please note that: | |
| 62 * - this method ignores the previous value pointed to by |devices| (won't | |
| 63 * release reference even if it is not 0); | |
| 64 * - |devices| must be valid until |callback| is called, if the method | |
| 65 * returns PP_OK_COMPLETIONPENDING; | |
| 66 * - the ref count of the returned |devices| has already been increased by 1 | |
| 67 * for the caller. | |
| 68 */ | |
| 69 [deprecate=0.3] | |
| 70 int32_t EnumerateDevices( | |
| 71 [in] PP_Resource video_capture, | |
| 72 [out] PP_Resource devices, | |
| 73 [in] PP_CompletionCallback callback); | |
| 74 | |
| 75 /** | |
| 76 * Enumerates video capture devices. | 56 * Enumerates video capture devices. |
| 77 * | 57 * |
| 78 * @param[in] video_capture A <code>PP_Resource</code> corresponding to a | 58 * @param[in] video_capture A <code>PP_Resource</code> corresponding to a |
| 79 * video capture resource. | 59 * video capture resource. |
| 80 * @param[in] output An output array which will receive | 60 * @param[in] output An output array which will receive |
| 81 * <code>PPB_DeviceRef_Dev</code> resources on success. Please note that the | 61 * <code>PPB_DeviceRef_Dev</code> resources on success. Please note that the |
| 82 * ref count of those resources has already been increased by 1 for the | 62 * ref count of those resources has already been increased by 1 for the |
| 83 * caller. | 63 * caller. |
| 84 * @param[in] callback A <code>PP_CompletionCallback</code> to run on | 64 * @param[in] callback A <code>PP_CompletionCallback</code> to run on |
| 85 * completion. | 65 * completion. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 | 149 |
| 170 /** | 150 /** |
| 171 * Closes the video capture device, and stops capturing if necessary. It is | 151 * Closes the video capture device, and stops capturing if necessary. It is |
| 172 * not valid to call |Open()| again after a call to this method. | 152 * not valid to call |Open()| again after a call to this method. |
| 173 * If a video capture resource is destroyed while a device is still open, then | 153 * If a video capture resource is destroyed while a device is still open, then |
| 174 * it will be implicitly closed, so you are not required to call this method. | 154 * it will be implicitly closed, so you are not required to call this method. |
| 175 */ | 155 */ |
| 176 void Close( | 156 void Close( |
| 177 [in] PP_Resource video_capture); | 157 [in] PP_Resource video_capture); |
| 178 }; | 158 }; |
| OLD | NEW |