| @@ -54,6 +54,48 @@ int ff_inlink_process_commands(AVFilterLink *link, const AVFrame *frame); · 53 unmodified lines |
| 54 | */ | 54 | */ |
| 55 | int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame); | 55 | int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame); |
| 56 | | 56 | |
| | 57 | /** |
| | 58 | * Test if a frame is available on the link. |
| | 59 | * @return >0 if a frame is available |
| | 60 | */ |
| | 61 | int ff_inlink_check_available_frame(AVFilterLink *link); |
| | 62 | |
| | 63 | /** |
| | 64 | * Test if enough samples are available on the link. |
| | 65 | * @return >0 if enough samples are available |
| | 66 | * @note on EOF and error, min becomes 1 |
| | 67 | */ |
| | 68 | int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min); |
| | 69 | |
| | 70 | /** |
| | 71 | * Take a frame from the link's FIFO and update the link's stats. |
| | 72 | * |
| | 73 | * If ff_inlink_check_available_frame() was previously called, the |
| | 74 | * preferred way of expressing it is "av_assert1(ret);" immediately after |
| | 75 | * ff_inlink_consume_frame(). Negative error codes must still be checked. |
| | 76 | * |
| | 77 | * @note May trigger process_command() and/or update is_disabled. |
| | 78 | * @return >0 if a frame is available, |
| | 79 | * 0 and set rframe to NULL if no frame available, |
| | 80 | * or AVERROR code |
| | 81 | */ |
| | 82 | int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe); |
| | 83 | |
| | 84 | /** |
| | 85 | * Take samples from the link's FIFO and update the link's stats. |
| | 86 | * |
| | 87 | * If ff_inlink_check_available_samples() was previously called, the |
| | 88 | * preferred way of expressing it is "av_assert1(ret);" immediately after |
| | 89 | * ff_inlink_consume_samples(). Negative error codes must still be checked. |
| | 90 | * |
| | 91 | * @note May trigger process_command() and/or update is_disabled. |
| | 92 | * @return >0 if a frame is available, |
| | 93 | * 0 and set rframe to NULL if no frame available, |
| | 94 | * or AVERROR code |
| | 95 | */ |
| | 96 | int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, |
| | 97 | AVFrame **rframe); |
| | 98 | |
| 57 | /** | 99 | /** |
| 58 | * Make sure a frame is writable. | 100 | * Make sure a frame is writable. |
| 59 | * This is similar to av_frame_make_writable() except it uses the link's | 101 | * This is similar to av_frame_make_writable() except it uses the link's |