19 #ifndef AVFILTER_INTERNAL_H
20 #define AVFILTER_INTERNAL_H
36 #if FF_API_AVFILTERBUFFER
38 typedef struct AVFilterPool {
39 AVFilterBufferRef *pic[POOL_SIZE];
59 #if !FF_API_AVFILTERPAD_PUBLIC
167 #if FF_API_AVFILTERBUFFER
169 void ff_avfilter_default_free_buffer(AVFilterBuffer *
buf);
238 #ifdef FF_AVFILTER_TRACE
239 # define ff_tlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
241 # define ff_tlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
244 #define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func)
334 #define AVFILTER_DEFINE_CLASS(fname) \
335 static const AVClass fname##_class = { \
336 .class_name = #fname, \
337 .item_name = av_default_item_name, \
338 .option = fname##_options, \
339 .version = LIBAVUTIL_VERSION_INT, \
340 .category = AV_CLASS_CATEGORY_FILTER, \
348 #define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads))
349 #define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
int(* poll_frame)(AVFilterLink *link)
Frame poll callback.
This structure describes decoded (raw) audio or video data.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad)
Insert a new pad.
Main libavfilter public API header.
Libavfilter version macros.
enum AVMediaType type
AVFilterPad type.
void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link)
Update the position of a link in the age heap.
#define FF_QSCALE_TYPE_MPEG1
#define FF_QSCALE_TYPE_H264
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
AVFilterPad * output_pads
array of output pads
int(* request_frame)(AVFilterLink *link)
Frame request callback.
static av_cold int end(AVCodecContext *avctx)
int ff_fmt_is_in(int fmt, const int *fmts)
Tell is a format is contained in the provided list terminated by -1.
int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx)
Parse a pixel format.
void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
A filter pad used for either input or output.
A link between two filters.
AVFilterPad * input_pads
array of input pads
unsigned nb_outputs
number of output pads
int(* filter_frame)(AVFilterLink *link, AVFrame *frame)
Filtering callback.
int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx)
Parse a time base.
Libavcodec external API header.
common internal API header
unsigned nb_inputs
number of input pads
struct AVFilterCommand * next
void ff_command_queue_pop(AVFilterContext *filter)
int needs_writable
The filter expects writable frames from its input link, duplicating data buffers if needed...
Frame requests may need to loop in order to be fulfilled.
int( avfilter_execute_func)(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
A function executing multiple jobs, possibly in parallel.
char * ff_get_ref_perms_string(char *buf, size_t buf_size, int perms)
void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter)
Remove a filter from a graph;.
rational number numerator/denominator
#define FF_QSCALE_TYPE_VP56
AVFilterLink ** outputs
array of pointers to output links
static int ff_norm_qscale(int qscale, int type)
Normalize the qscale factor FIXME the H264 qscale is a log based scale, mpeg1/2 is not...
static int64_t pts
Global timestamp for the audio frames.
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
#define FF_DISABLE_DEPRECATION_WARNINGS
int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg, void *log_ctx)
Parse a channel layout or a corresponding integer representation.
int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx)
Parse a sample format name or a corresponding integer representation.
avfilter_execute_func * execute
void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
avfilter_execute_func * thread_execute
#define FF_ENABLE_DEPRECATION_WARNINGS
void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
#define FF_QSCALE_TYPE_MPEG2
int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx)
Parse a sample rate.
int ff_poll_frame(AVFilterLink *link)
Poll a frame from the filter chain.
AVFilterContext * ff_filter_alloc(const AVFilter *filter, const char *inst_name)
Allocate a new filter context and return it.
int(* config_props)(AVFilterLink *link)
Link configuration callback.
double time
time expressed in seconds
int needs_fifo
The filter expects a fifo to be inserted on its input link, typically because it has a delay...
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
static int ff_insert_outpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new output pad for the filter.
AVPixelFormat
Pixel format.
static int ff_insert_inpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new input pad for the filter.
char * arg
optional argument for the command