Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -305,8 +305,27 @@ int ff_poll_frame(AVFilterLink *link); |
305 | 305 |
/** |
306 | 306 |
* Request an input frame from the filter at the other end of the link. |
307 | 307 |
* |
308 |
+ * The input filter may pass the request on to its inputs, fulfill the |
|
309 |
+ * request from an internal buffer or any other means specific to its function. |
|
310 |
+ * |
|
311 |
+ * When the end of a stream is reached AVERROR_EOF is returned and no further |
|
312 |
+ * frames. |
|
313 |
+ * |
|
314 |
+ * When a filter is unable to output a frame for example due to its sources |
|
315 |
+ * being unable to do so or because it depends on external means pushing data |
|
316 |
+ * into it then AVERROR(EAGAIN) is returned. |
|
317 |
+ * It is important that a AVERROR(EAGAIN) return is returned all the way to the |
|
318 |
+ * caller (generally eventually a user application) as this step may (but does |
|
319 |
+ * not have to be) necessary to provide the input with the next frame. |
|
320 |
+ * |
|
321 |
+ * If a request is successful then the filter_frame() function will be called |
|
322 |
+ * at least once before ff_request_frame() returns |
|
323 |
+ * |
|
308 | 324 |
* @param link the input link |
309 | 325 |
* @return zero on success |
326 |
+ * AVERROR_EOF on end of file |
|
327 |
+ * AVERROR(EAGAIN) if the previous filter cannot output a frame |
|
328 |
+ * currently and can neither guarantee that EOF has been reached. |
|
310 | 329 |
*/ |
311 | 330 |
int ff_request_frame(AVFilterLink *link); |
312 | 331 |
|