19 #ifndef AVFILTER_INTERNAL_H
20 #define AVFILTER_INTERNAL_H
250 #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))
385 #define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0)
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.
int ff_filter_activate(AVFilterContext *filter)
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
void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
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 if an integer is contained in the provided -1-terminated list of integers.
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, uint8_t clip)
int ff_filter_graph_run_once(AVFilterGraph *graph)
Run one round of processing on a filter graph.
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
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
unsigned nb_outputs
number of output pads
int(* filter_frame)(AVFilterLink *link, AVFrame *frame)
Filtering callback.
common internal API header
av_warn_unused_result int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx)
Parse a pixel format.
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...
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)
Libavcodec external API header.
av_warn_unused_result 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.
void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter)
Remove a filter from a graph;.
void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the destination filter.
Rational number (pair of numerator and 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.
#define av_warn_unused_result
av_warn_unused_result int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx)
Parse a time base.
common internal api header.
av_warn_unused_result int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx)
Parse a sample format name or a corresponding integer representation.
static int ref[MAX_W *MAX_W]
av_warn_unused_result int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx)
Parse a sample rate.
avfilter_execute_func * execute
void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
avfilter_execute_func * thread_execute
void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
#define FF_QSCALE_TYPE_MPEG2
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.
FFFrameQueueGlobal frame_queues
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.
Structure to hold global options and statistics for frame queues.
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