FFmpeg
Classes | Macros | Typedefs | Functions | Variables
buffersink.c File Reference

buffer sink More...

#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "framequeue.h"
#include "audio.h"
#include "avfilter.h"
#include "buffersink.h"
#include "filters.h"
#include "internal.h"

Classes

struct  BufferSinkContext
 

Macros

#define FF_INTERNAL_FIELDS   1
 
#define NB_ITEMS(list)   (list ## _size / sizeof(*list))
 
#define FIFO_INIT_SIZE   8
 
#define FIFO_INIT_ELEMENT_SIZE   sizeof(void *)
 
#define MAKE_AVFILTERLINK_ACCESSOR(type, field)
 
#define CHECK_LIST_SIZE(field)
 
#define OFFSET(x)   offsetof(BufferSinkContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Typedefs

typedef struct BufferSinkContext BufferSinkContext
 

Functions

int attribute_align_arg av_buffersink_get_frame (AVFilterContext *ctx, AVFrame *frame)
 Get a frame with filtered data from sink and put it in frame. More...
 
int attribute_align_arg av_buffersink_get_frame_flags (AVFilterContext *ctx, AVFrame *frame, int flags)
 Get a frame with filtered data from sink and put it in frame. More...
 
int attribute_align_arg av_buffersink_get_samples (AVFilterContext *ctx, AVFrame *frame, int nb_samples)
 Same as av_buffersink_get_frame(), but with the ability to specify the number of samples read. More...
 
AVBufferSinkParamsav_buffersink_params_alloc (void)
 Create an AVBufferSinkParams structure. More...
 
AVABufferSinkParamsav_abuffersink_params_alloc (void)
 Create an AVABufferSinkParams structure. More...
 
void av_buffersink_set_frame_size (AVFilterContext *ctx, unsigned frame_size)
 Set the frame size for an audio buffer sink. More...
 
 AVFILTER_DEFINE_CLASS (buffersink)
 
 AVFILTER_DEFINE_CLASS (abuffersink)
 

Variables

AVFilter ff_vsink_buffer
 
AVFilter ff_asink_abuffer
 

Detailed Description

buffer sink

Macro Definition Documentation

§ CHECK_LIST_SIZE

#define CHECK_LIST_SIZE (   field)
Value:
if (buf->field ## _size % sizeof(*buf->field)) { \
av_log(ctx, AV_LOG_ERROR, "Invalid size for " #field ": %d, " \
"should be multiple of %d\n", \
buf->field ## _size, (int)sizeof(*buf->field)); \
return AVERROR(EINVAL); \
}
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176

§ MAKE_AVFILTERLINK_ACCESSOR

#define MAKE_AVFILTERLINK_ACCESSOR (   type,
  field 
)
Value:
type av_buffersink_get_##field(const AVFilterContext *ctx) { \
av_assert0(ctx->filter->activate == activate); \
return ctx->inputs[0]->field; \
}
int(* activate)(AVFilterContext *ctx)
Filter activation function.
Definition: avfilter.h:327
AVFilterLink ** inputs
array of pointers to input links
Definition: avfilter.h:346
An instance of a filter.
Definition: avfilter.h:338
const AVFilter * filter
the AVFilter of which this is an instance
Definition: avfilter.h:341

Variable Documentation

§ ff_asink_abuffer

AVFilter ff_asink_abuffer
Initial value:
= {
.name = "abuffersink",
.description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."),
.priv_class = &abuffersink_class,
.priv_size = sizeof(BufferSinkContext),
.init_opaque = asink_init,
.query_formats = asink_query_formats,
.activate = activate,
.inputs = avfilter_asink_abuffer_inputs,
.outputs = NULL,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: buffersink.c:41

§ ff_vsink_buffer

AVFilter ff_vsink_buffer
Initial value:
= {
.name = "buffersink",
.description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."),
.priv_size = sizeof(BufferSinkContext),
.priv_class = &buffersink_class,
.init_opaque = vsink_init,
.query_formats = vsink_query_formats,
.activate = activate,
.inputs = avfilter_vsink_buffer_inputs,
.outputs = NULL,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: buffersink.c:41