src_buffer: update get_nb_failed_requests name.
authorNicolas George <nicolas.george@normalesup.org>
Sat, 5 May 2012 07:50:30 +0000 (09:50 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Sun, 6 May 2012 14:18:10 +0000 (16:18 +0200)
Implement av_buffersrc_get_nb_failed_requests.
Deprecate av_vsrc_buffer_get_nb_failed_requests.

libavfilter/buffersrc.h
libavfilter/src_buffer.c
libavfilter/vsrc_buffer.h

index 2bbbb8f..f1f566b 100644 (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 */
index f247f2c..a64a6e2 100644 (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;
index 7f25c98..17c4498 100644 (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 */