src_buffer: update get_nb_failed_requests name.

Implement av_buffersrc_get_nb_failed_requests.
Deprecate av_vsrc_buffer_get_nb_failed_requests.
This commit is contained in:
Nicolas George 2012-05-05 09:50:30 +02:00
parent fe511b6e32
commit 4d4350f47a
3 changed files with 17 additions and 0 deletions

View File

@ -53,4 +53,13 @@ enum {
int av_buffersrc_add_ref(AVFilterContext *buffer_src,
AVFilterBufferRef *picref, int flags);
/**
* Get the number of failed requests.
*
* A failed request is when the request_frame method is called while no
* frame is present in the buffer.
* The number is reset when a frame is added.
*/
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src);
#endif /* AVFILTER_BUFFERSRC_H */

View File

@ -331,6 +331,11 @@ int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src,
}
#endif
unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src)
{
return ((BufferSourceContext *)buffer_src->priv)->nb_failed_requests;
}
unsigned av_vsrc_buffer_get_nb_failed_requests(AVFilterContext *buffer_src)
{
return ((BufferSourceContext *)buffer_src->priv)->nb_failed_requests;

View File

@ -52,7 +52,10 @@ int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_src,
* A failed request is when the request_frame method is called while no
* frame is present in the buffer.
* The number is reset when a frame is added.
*
* @deprecated use av_buffersrc_get_nb_failed_requests() instead.
*/
attribute_deprecated
unsigned av_vsrc_buffer_get_nb_failed_requests(AVFilterContext *buffer_src);
#endif /* AVFILTER_VSRC_BUFFER_H */