diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-05-05 09:50:30 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-05-06 16:18:10 +0200 |
commit | 4d4350f47a2abb600721cd1c1281d0d0c0169bff (patch) | |
tree | e9610ff066c44fce8b4dbaad6a98507156427759 | |
parent | fe511b6e32be8ce0db9bd8b2a7091936f6f29651 (diff) | |
download | ffmpeg-4d4350f47a2abb600721cd1c1281d0d0c0169bff.tar.gz |
src_buffer: update get_nb_failed_requests name.
Implement av_buffersrc_get_nb_failed_requests.
Deprecate av_vsrc_buffer_get_nb_failed_requests.
-rw-r--r-- | libavfilter/buffersrc.h | 9 | ||||
-rw-r--r-- | libavfilter/src_buffer.c | 5 | ||||
-rw-r--r-- | libavfilter/vsrc_buffer.h | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/libavfilter/buffersrc.h b/libavfilter/buffersrc.h index 2bbbb8f2c4..f1f566b46e 100644 --- a/libavfilter/buffersrc.h +++ b/libavfilter/buffersrc.h @@ -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 */ diff --git a/libavfilter/src_buffer.c b/libavfilter/src_buffer.c index f247f2c788..a64a6e2f6c 100644 --- a/libavfilter/src_buffer.c +++ b/libavfilter/src_buffer.c @@ -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; diff --git a/libavfilter/vsrc_buffer.h b/libavfilter/vsrc_buffer.h index 7f25c9868d..17c4498659 100644 --- a/libavfilter/vsrc_buffer.h +++ b/libavfilter/vsrc_buffer.h @@ -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 */ |