summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavfilter/audio.c4
-rw-r--r--libavfilter/avfilter.h6
-rw-r--r--libavfilter/buffersink.c4
-rw-r--r--libavfilter/buffersrc.h3
-rw-r--r--libavfilter/internal.h2
5 files changed, 18 insertions, 1 deletions
diff --git a/libavfilter/audio.c b/libavfilter/audio.c
index a49bcf4f20..e32229881b 100644
--- a/libavfilter/audio.c
+++ b/libavfilter/audio.c
@@ -28,10 +28,14 @@
#include "avfilter.h"
#include "internal.h"
+#if FF_API_AVFILTERBUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
int avfilter_ref_get_channels(AVFilterBufferRef *ref)
{
return ref->audio ? ref->audio->channels : 0;
}
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
AVFrame *ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
{
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 296f2d3c9a..584623f0b6 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -234,13 +234,13 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref);
*/
attribute_deprecated
void avfilter_unref_bufferp(AVFilterBufferRef **ref);
-#endif
/**
* Get the number of channels of a buffer reference.
*/
attribute_deprecated
int avfilter_ref_get_channels(AVFilterBufferRef *ref);
+#endif
#if FF_API_AVFILTERPAD_PUBLIC
/**
@@ -763,7 +763,9 @@ struct AVFilterLink {
AVLINK_INIT ///< complete
} init_state;
+#if FF_API_AVFILTERBUFFER
struct AVFilterPool *pool;
+#endif
/**
* Graph the filter belongs to.
@@ -819,6 +821,7 @@ struct AVFilterLink {
*/
int max_samples;
+#if FF_API_AVFILTERBUFFER
/**
* The buffer reference currently being received across the link by the
* destination filter. This is used internally by the filter system to
@@ -827,6 +830,7 @@ struct AVFilterLink {
* by the filters.
*/
AVFilterBufferRef *cur_buf_copy;
+#endif
/**
* True if the link is closed.
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 36b9e42728..8d2e7d73d5 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -363,6 +363,8 @@ AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)
return ctx->inputs[0]->frame_rate;
}
+#if FF_API_AVFILTERBUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx)
{
BufferSinkContext *buf = ctx->priv;
@@ -375,6 +377,8 @@ int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx)
return av_fifo_size(buf->fifo)/FIFO_INIT_ELEMENT_SIZE + ff_poll_frame(inlink);
}
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
static av_cold int vsink_init(AVFilterContext *ctx, void *opaque)
{
diff --git a/libavfilter/buffersrc.h b/libavfilter/buffersrc.h
index ea34c04ee9..4eff77be0f 100644
--- a/libavfilter/buffersrc.h
+++ b/libavfilter/buffersrc.h
@@ -63,6 +63,7 @@ enum {
};
+#if FF_API_AVFILTERBUFFER
/**
* Add buffer data in picref to buffer_src.
*
@@ -72,8 +73,10 @@ enum {
* @return >= 0 in case of success, a negative AVERROR code
* in case of failure
*/
+attribute_deprecated
int av_buffersrc_add_ref(AVFilterContext *buffer_src,
AVFilterBufferRef *picref, int flags);
+#endif
/**
* Get the number of failed requests.
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 797c88437c..7dde2e1334 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -33,6 +33,7 @@
#include "video.h"
#include "libavcodec/avcodec.h"
+#if FF_API_AVFILTERBUFFER
#define POOL_SIZE 32
typedef struct AVFilterPool {
AVFilterBufferRef *pic[POOL_SIZE];
@@ -40,6 +41,7 @@ typedef struct AVFilterPool {
int refcount;
int draining;
} AVFilterPool;
+#endif
typedef struct AVFilterCommand {
double time; ///< time expressed in seconds