Go to the documentation of this file.
28 #define FF_INTERNAL_FIELDS 1
36 unsigned nb,
size_t fmts_cfg_offset,
37 const char *inout_string)
39 for (
unsigned i = 0;
i < nb;
i++) {
46 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++) {
47 printf(
"%s[%u] %s: fmt:%s\n",
48 inout_string,
i, pad_name,
55 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++)
56 printf(
"%s[%u] %s: fmt:%s\n",
57 inout_string,
i, pad_name,
60 for (
unsigned j = 0;
layouts && j <
layouts->nb_channel_layouts; j++) {
63 printf(
"%s[%u] %s: chlayout:%s\n",
64 inout_string,
i, pad_name, buf);
80 int main(
int argc,
char **argv)
85 const char *filter_name;
86 const char *filter_args =
NULL;
93 fprintf(stderr,
"Missing filter name as argument\n");
97 filter_name = argv[1];
99 filter_args = argv[2];
108 fprintf(stderr,
"Unrecognized filter with name '%s'\n", filter_name);
114 fprintf(stderr,
"Impossible to open filter with name '%s'\n",
119 fprintf(stderr,
"Impossible to init filter '%s' with arguments '%s'\n",
120 filter_name, filter_args);
128 fprintf(stderr,
"Unable to allocate memory for filter input link\n");
138 fprintf(stderr,
"Unable to allocate memory for filter output link\n");
A list of supported channel layouts.
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
enum MovChannelLayoutTag * layouts
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
A link between two filters.
void avfilter_graph_free(AVFilterGraph **graph)
Free a graph, destroy its links, and set *graph to NULL.
AVFilterContext * avfilter_graph_alloc_filter(AVFilterGraph *graph, const AVFilter *filter, const char *name)
Create a new filter instance in a filter graph.
AVFilterGraph * avfilter_graph_alloc(void)
Allocate a filter graph.
static FilteringContext * filter_ctx
A filter pad used for either input or output.
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_size)
Get a human-readable string describing the channel layout properties.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static void print_formats(AVFilterContext *filter_ctx)
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a link
const AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
static void print_formats_internal(AVFilterLink **links, const AVFilterPad *pads, unsigned nb, size_t fmts_cfg_offset, const char *inout_string)
printf("static const uint8_t my_array[100] = {\n")
int avfilter_init_str(AVFilterContext *filter, const char *args)
Initialize a filter with the supplied parameters.
void av_log_set_level(int level)
Set the log level.
#define i(width, name, range_min, range_max)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int main(int argc, char **argv)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output links
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx)
Get the type of an AVFilterPad.
void avfilter_free(AVFilterContext *filter)
Free a filter context.
@ FF_FILTER_FORMATS_QUERY_FUNC
formats.query active.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.