| OLD | NEW |
| 1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 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 /* From ppb_media_stream_video_track.idl modified Thu Jan 23 14:09:56 2014. */ | 6 /* From ppb_media_stream_video_track.idl modified Tue Feb 18 17:20:43 2014. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ | 8 #ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ |
| 9 #define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ | 9 #define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ |
| 10 | 10 |
| 11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
| 16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 * Attribute list terminator. | 38 * Attribute list terminator. |
| 39 */ | 39 */ |
| 40 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE = 0, | 40 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE = 0, |
| 41 /** | 41 /** |
| 42 * The maximum number of frames to hold in the input buffer. | 42 * The maximum number of frames to hold in the input buffer. |
| 43 * Note: this is only used as advisory; the browser may allocate more or fewer | 43 * Note: this is only used as advisory; the browser may allocate more or fewer |
| 44 * based on available resources. How many frames to buffer depends on usage - | 44 * based on available resources. How many frames to buffer depends on usage - |
| 45 * request at least 2 to make sure latency doesn't cause lost frames. If | 45 * request at least 2 to make sure latency doesn't cause lost frames. If |
| 46 * the plugin expects to hold on to more than one frame at a time (e.g. to do | 46 * the plugin expects to hold on to more than one frame at a time (e.g. to do |
| 47 * multi-frame processing), it should request that many more. | 47 * multi-frame processing), it should request that many more. |
| 48 * If 0 is specified, the default value will be used. |
| 48 */ | 49 */ |
| 49 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES = 1, | 50 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES = 1, |
| 50 /** | 51 /** |
| 51 * The width of video frames in pixels. It should be a multiple of 4. | 52 * The width of video frames in pixels. It should be a multiple of 4. |
| 53 * If the specified size is different from the video source (webcam), |
| 54 * frames will be scaled to specified size. If 0 is specified, the original |
| 55 * frame size of the video track will be used. |
| 52 * | 56 * |
| 53 * Maximum value: 4096 (4K resolution). | 57 * Maximum value: 4096 (4K resolution). |
| 54 */ | 58 */ |
| 55 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_WIDTH = 2, | 59 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_WIDTH = 2, |
| 56 /** | 60 /** |
| 57 * The height of video frames in pixels. It should be a multiple of 4. | 61 * The height of video frames in pixels. It should be a multiple of 4. |
| 62 * If the specified size is different from the video source (webcam), |
| 63 * frames will be scaled to specified size. If 0 is specified, the original |
| 64 * frame size of the video track will be used. |
| 58 * | 65 * |
| 59 * Maximum value: 4096 (4K resolution). | 66 * Maximum value: 4096 (4K resolution). |
| 60 */ | 67 */ |
| 61 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_HEIGHT = 3, | 68 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_HEIGHT = 3, |
| 62 /** | 69 /** |
| 63 * The format of video frames. The attribute value is | 70 * The format of video frames. The attribute value is |
| 64 * a <code>PP_VideoFrame_Format</code>. | 71 * a <code>PP_VideoFrame_Format</code>. If the specified format is different |
| 72 * from the video source (webcam), frames will be converted to specified |
| 73 * format. If <code>PP_VIDEOFRAME_FORMAT_UNKNOWN</code> is specified, the |
| 74 * orignal frame format of the video track will be used. |
| 65 */ | 75 */ |
| 66 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_FORMAT = 4 | 76 PP_MEDIASTREAMVIDEOTRACK_ATTRIB_FORMAT = 4 |
| 67 } PP_MediaStreamVideoTrack_Attrib; | 77 } PP_MediaStreamVideoTrack_Attrib; |
| 68 /** | 78 /** |
| 69 * @} | 79 * @} |
| 70 */ | 80 */ |
| 71 | 81 |
| 72 /** | 82 /** |
| 73 * @addtogroup Interfaces | 83 * @addtogroup Interfaces |
| 74 * @{ | 84 * @{ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 104 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video | 114 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video |
| 105 * resource. | 115 * resource. |
| 106 * @param[in] attrib_list A list of attribute name-value pairs in which each | 116 * @param[in] attrib_list A list of attribute name-value pairs in which each |
| 107 * attribute is immediately followed by the corresponding desired value. | 117 * attribute is immediately followed by the corresponding desired value. |
| 108 * The list is terminated by | 118 * The list is terminated by |
| 109 * <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE</code>. | 119 * <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE</code>. |
| 110 * @param[in] callback <code>PP_CompletionCallback</code> to be called upon | 120 * @param[in] callback <code>PP_CompletionCallback</code> to be called upon |
| 111 * completion of <code>Configure()</code>. | 121 * completion of <code>Configure()</code>. |
| 112 * | 122 * |
| 113 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 123 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
| 124 * Returns <code>PP_ERROR_INPROGRESS</code> if there is a pending call of |
| 125 * <code>Configure()</code> or <code>GetFrame()</code>, or the plugin |
| 126 * holds some frames which are not recycled with <code>RecycleFrame()</code>. |
| 127 * If an error is returned, all attributes and the underlying buffer will not |
| 128 * be changed. |
| 114 */ | 129 */ |
| 115 int32_t (*Configure)(PP_Resource video_track, | 130 int32_t (*Configure)(PP_Resource video_track, |
| 116 const int32_t attrib_list[], | 131 const int32_t attrib_list[], |
| 117 struct PP_CompletionCallback callback); | 132 struct PP_CompletionCallback callback); |
| 118 /** | 133 /** |
| 119 * Gets attribute value for a given attribute name. | 134 * Gets attribute value for a given attribute name. |
| 120 * | 135 * |
| 121 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video | 136 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video |
| 122 * resource. | 137 * resource. |
| 123 * @param[in] attrib A <code>PP_MediaStreamVideoTrack_Attrib</code> for | 138 * @param[in] attrib A <code>PP_MediaStreamVideoTrack_Attrib</code> for |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 * MediaStream video track resource. | 212 * MediaStream video track resource. |
| 198 */ | 213 */ |
| 199 void (*Close)(PP_Resource video_track); | 214 void (*Close)(PP_Resource video_track); |
| 200 }; | 215 }; |
| 201 /** | 216 /** |
| 202 * @} | 217 * @} |
| 203 */ | 218 */ |
| 204 | 219 |
| 205 #endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ | 220 #endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ |
| 206 | 221 |
| OLD | NEW |