| 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 Fri Dec 27 17:28:11 2013. */ | 6 /* From ppb_media_stream_video_track.idl modified Wed Jan 8 13:26:36 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" |
| 17 | 17 |
| 18 #define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1 \ | 18 #define PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1 \ |
| 19 "PPB_MediaStreamVideoTrack;0.1" /* dev */ | 19 "PPB_MediaStreamVideoTrack;0.1" /* dev */ |
| 20 /** | 20 /** |
| 21 * @file | 21 * @file |
| 22 * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for | |
| 23 * receiving video frames from a MediaStream video track in the browser. | |
| 24 * This interface is still in development (Dev API status) and may change. | |
| 25 */ | 22 */ |
| 26 | 23 |
| 27 | 24 |
| 28 /** | 25 /** |
| 29 * @addtogroup Interfaces | 26 * @addtogroup Interfaces |
| 30 * @{ | 27 * @{ |
| 31 */ | 28 */ |
| 32 /** | 29 /** |
| 33 */ | 30 */ |
| 34 struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ | 31 struct PPB_MediaStreamVideoTrack_0_1 { /* dev */ |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 /** | 79 /** |
| 83 * Gets the next video frame from the MediaStream track. | 80 * Gets the next video frame from the MediaStream track. |
| 84 * If internal processing is slower than the incoming frame rate, new frames | 81 * If internal processing is slower than the incoming frame rate, new frames |
| 85 * will be dropped from the incoming stream. Once the input buffer is full, | 82 * will be dropped from the incoming stream. Once the input buffer is full, |
| 86 * frames will be dropped until <code>RecycleFrame()</code> is called to free | 83 * frames will be dropped until <code>RecycleFrame()</code> is called to free |
| 87 * a spot for another frame to be buffered. | 84 * a spot for another frame to be buffered. |
| 88 * If there are no frames in the input buffer, | 85 * If there are no frames in the input buffer, |
| 89 * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the | 86 * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the |
| 90 * <code>callback</code> will be called, when a new frame is received or an | 87 * <code>callback</code> will be called, when a new frame is received or an |
| 91 * error happens. | 88 * error happens. |
| 92 * If the caller holds a frame returned by the previous call of | |
| 93 * <code>GetFrame()</code>, <code>PP_ERROR_INPROGRESS</code> will be returned. | |
| 94 * The caller should recycle the previous frame before getting the next frame. | |
| 95 * | 89 * |
| 96 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video | 90 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video |
| 97 * resource. | 91 * resource. |
| 98 * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame | 92 * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame |
| 99 * resource. | 93 * resource. |
| 100 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 94 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 101 * completion of GetFrame(). | 95 * completion of GetFrame(). |
| 102 * | 96 * |
| 103 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 97 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
| 104 * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer | 98 * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer |
| (...skipping 24 matching lines...) Expand all Loading... |
| 129 * MediaStream video track resource. | 123 * MediaStream video track resource. |
| 130 */ | 124 */ |
| 131 void (*Close)(PP_Resource video_track); | 125 void (*Close)(PP_Resource video_track); |
| 132 }; | 126 }; |
| 133 /** | 127 /** |
| 134 * @} | 128 * @} |
| 135 */ | 129 */ |
| 136 | 130 |
| 137 #endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ | 131 #endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ |
| 138 | 132 |
| OLD | NEW |