mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 09:52:17 +00:00
avfilter: add missing FF_API_AVFILTERBUFFER guards
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
0169c4dc81
commit
e6c20e214e
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user