mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02: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 "avfilter.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
#if FF_API_AVFILTERBUFFER
|
||||||
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
int avfilter_ref_get_channels(AVFilterBufferRef *ref)
|
int avfilter_ref_get_channels(AVFilterBufferRef *ref)
|
||||||
{
|
{
|
||||||
return ref->audio ? ref->audio->channels : 0;
|
return ref->audio ? ref->audio->channels : 0;
|
||||||
}
|
}
|
||||||
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
#endif
|
||||||
|
|
||||||
AVFrame *ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
|
AVFrame *ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
|
||||||
{
|
{
|
||||||
|
@ -234,13 +234,13 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref);
|
|||||||
*/
|
*/
|
||||||
attribute_deprecated
|
attribute_deprecated
|
||||||
void avfilter_unref_bufferp(AVFilterBufferRef **ref);
|
void avfilter_unref_bufferp(AVFilterBufferRef **ref);
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of channels of a buffer reference.
|
* Get the number of channels of a buffer reference.
|
||||||
*/
|
*/
|
||||||
attribute_deprecated
|
attribute_deprecated
|
||||||
int avfilter_ref_get_channels(AVFilterBufferRef *ref);
|
int avfilter_ref_get_channels(AVFilterBufferRef *ref);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if FF_API_AVFILTERPAD_PUBLIC
|
#if FF_API_AVFILTERPAD_PUBLIC
|
||||||
/**
|
/**
|
||||||
@ -763,7 +763,9 @@ struct AVFilterLink {
|
|||||||
AVLINK_INIT ///< complete
|
AVLINK_INIT ///< complete
|
||||||
} init_state;
|
} init_state;
|
||||||
|
|
||||||
|
#if FF_API_AVFILTERBUFFER
|
||||||
struct AVFilterPool *pool;
|
struct AVFilterPool *pool;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Graph the filter belongs to.
|
* Graph the filter belongs to.
|
||||||
@ -819,6 +821,7 @@ struct AVFilterLink {
|
|||||||
*/
|
*/
|
||||||
int max_samples;
|
int max_samples;
|
||||||
|
|
||||||
|
#if FF_API_AVFILTERBUFFER
|
||||||
/**
|
/**
|
||||||
* The buffer reference currently being received across the link by the
|
* The buffer reference currently being received across the link by the
|
||||||
* destination filter. This is used internally by the filter system to
|
* destination filter. This is used internally by the filter system to
|
||||||
@ -827,6 +830,7 @@ struct AVFilterLink {
|
|||||||
* by the filters.
|
* by the filters.
|
||||||
*/
|
*/
|
||||||
AVFilterBufferRef *cur_buf_copy;
|
AVFilterBufferRef *cur_buf_copy;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True if the link is closed.
|
* True if the link is closed.
|
||||||
|
@ -363,6 +363,8 @@ AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)
|
|||||||
return ctx->inputs[0]->frame_rate;
|
return ctx->inputs[0]->frame_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FF_API_AVFILTERBUFFER
|
||||||
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx)
|
int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
BufferSinkContext *buf = ctx->priv;
|
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);
|
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)
|
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.
|
* Add buffer data in picref to buffer_src.
|
||||||
*
|
*
|
||||||
@ -72,8 +73,10 @@ enum {
|
|||||||
* @return >= 0 in case of success, a negative AVERROR code
|
* @return >= 0 in case of success, a negative AVERROR code
|
||||||
* in case of failure
|
* in case of failure
|
||||||
*/
|
*/
|
||||||
|
attribute_deprecated
|
||||||
int av_buffersrc_add_ref(AVFilterContext *buffer_src,
|
int av_buffersrc_add_ref(AVFilterContext *buffer_src,
|
||||||
AVFilterBufferRef *picref, int flags);
|
AVFilterBufferRef *picref, int flags);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of failed requests.
|
* Get the number of failed requests.
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
|
|
||||||
|
#if FF_API_AVFILTERBUFFER
|
||||||
#define POOL_SIZE 32
|
#define POOL_SIZE 32
|
||||||
typedef struct AVFilterPool {
|
typedef struct AVFilterPool {
|
||||||
AVFilterBufferRef *pic[POOL_SIZE];
|
AVFilterBufferRef *pic[POOL_SIZE];
|
||||||
@ -40,6 +41,7 @@ typedef struct AVFilterPool {
|
|||||||
int refcount;
|
int refcount;
|
||||||
int draining;
|
int draining;
|
||||||
} AVFilterPool;
|
} AVFilterPool;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct AVFilterCommand {
|
typedef struct AVFilterCommand {
|
||||||
double time; ///< time expressed in seconds
|
double time; ///< time expressed in seconds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user