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 Tue Jan 7 10:21:20 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 /** | 82 /** |
83 * Gets the next video frame from the MediaStream track. | 83 * Gets the next video frame from the MediaStream track. |
84 * If internal processing is slower than the incoming frame rate, new frames | 84 * 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, | 85 * 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 | 86 * frames will be dropped until <code>RecycleFrame()</code> is called to free |
87 * a spot for another frame to be buffered. | 87 * a spot for another frame to be buffered. |
88 * If there are no frames in the input buffer, | 88 * If there are no frames in the input buffer, |
89 * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the | 89 * <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 | 90 * <code>callback</code> will be called, when a new frame is received or an |
91 * error happens. | 91 * 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 * | 92 * |
96 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video | 93 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video |
97 * resource. | 94 * resource. |
98 * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame | 95 * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame |
99 * resource. | 96 * resource. |
100 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 97 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
101 * completion of GetFrame(). | 98 * completion of GetFrame(). |
102 * | 99 * |
103 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 100 * @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 | 101 * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer |
(...skipping 24 matching lines...) Expand all Loading... |
129 * MediaStream video track resource. | 126 * MediaStream video track resource. |
130 */ | 127 */ |
131 void (*Close)(PP_Resource video_track); | 128 void (*Close)(PP_Resource video_track); |
132 }; | 129 }; |
133 /** | 130 /** |
134 * @} | 131 * @} |
135 */ | 132 */ |
136 | 133 |
137 #endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ | 134 #endif /* PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_ */ |
138 | 135 |
OLD | NEW |