[FFmpeg-devel] [PATCH] avfilter/internal: Improve docs about ff_request_frame()

James Darnley james.darnley at gmail.com
Tue Jul 14 20:42:40 CEST 2015


On 2015-07-14 19:50, Michael Niedermayer wrote:
> From: Michael Niedermayer <michael at niedermayer.cc>
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavfilter/internal.h |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/libavfilter/internal.h b/libavfilter/internal.h
> index a7ec751..fcd1a5a 100644
> --- a/libavfilter/internal.h
> +++ b/libavfilter/internal.h
> @@ -305,8 +305,25 @@ int ff_poll_frame(AVFilterLink *link);
>  /**
>   * Request an input frame from the filter at the other end of the link.
>   *
> + * The source filter may pass the request on to its sources, fullfill the
> + * request from an internal buffer or any other means specific to its function.

fulfill (US) or fulfil (UK).

I don't think "source filter" is very clear here.  You mean the filter
you send a request to, right?  Not the "source filter" (if that is the
term used in lavfi) that puts frames into the filter chain.

> + * One example of a source returning AVERROR(EAGAIN) is a buffer into which the
> + * user application pushes new data, it cannot fullfill a request
> + * or know its at EOF until the user application has given it this
> + * information

I don't find this clear.  This is internal, isn't it?  What does a "user
application" matter to a filter, or someone writing a filter?

Perhaps something about filters rather than applications?

One example of a source returning AVERROR(EAGAIN) is a filter which
buffers frames and cannot fulfil a request until "some event happens" or
the filter cannot know it is as EOF until "some other event happens".

> + * If a request is successfull then the filter_frame() function will be called
> + * at least once before ff_request_frame() returns

successful

> + *
>   * @param link the input link
>   * @return     zero on success
> + *             AVERROR_EOF on end of file
> + *             AVERROR(EAGAIN) if the previous filter cannot output a frame
> + *             currently and can neither gurantee that EOF has been reached.

guarantee



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150714/566a12b6/attachment.sig>


More information about the ffmpeg-devel mailing list