summaryrefslogtreecommitdiff
path: root/doc/filter_design.txt
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2015-08-25 20:33:48 +0200
committerNicolas George <george@nsup.org>2015-09-20 19:02:33 +0200
commit2a351f6c5521c199b4285e4e42f2321e312170bd (patch)
tree12eb1841bec672aab701b908d37416b28826bc9e /doc/filter_design.txt
parent598f8a7afae6d0b8a49f85ec2de69acdc5e7ac6a (diff)
lavfi: drop the requirement that request_frame returns a frame.
It requires a loop in filters or the framework, that makes the scheduling less efficient and more complex. This is purely an internal change since the loop is now present in buffersink. Note that no filter except buffersink did rely on the requirement.
Diffstat (limited to 'doc/filter_design.txt')
-rw-r--r--doc/filter_design.txt19
1 files changed, 9 insertions, 10 deletions
diff --git a/doc/filter_design.txt b/doc/filter_design.txt
index d784d8471e..e8a7c53ee9 100644
--- a/doc/filter_design.txt
+++ b/doc/filter_design.txt
@@ -232,7 +232,8 @@ Frame scheduling
one of its inputs, repeatedly until at least one frame has been pushed.
Return values:
- if request_frame could produce a frame, it should return 0;
+ if request_frame could produce a frame, or at least make progress
+ towards producing a frame, it should return 0;
if it could not for temporary reasons, it should return AVERROR(EAGAIN);
if it could not because there are no more frames, it should return
AVERROR_EOF.
@@ -244,20 +245,18 @@ Frame scheduling
push_one_frame();
return 0;
}
- while (!frame_pushed) {
- input = input_where_a_frame_is_most_needed();
- ret = ff_request_frame(input);
- if (ret == AVERROR_EOF) {
- process_eof_on_input();
- } else if (ret < 0) {
- return ret;
- }
+ input = input_where_a_frame_is_most_needed();
+ ret = ff_request_frame(input);
+ if (ret == AVERROR_EOF) {
+ process_eof_on_input();
+ } else if (ret < 0) {
+ return ret;
}
return 0;
Note that, except for filters that can have queued frames, request_frame
does not push frames: it requests them to its input, and as a reaction,
- the filter_frame method will be called and do the work.
+ the filter_frame method possibly will be called and do the work.
Legacy API
==========