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++) {
64 printf(
"%s[%u] %s: chlayout:%s\n",
65 inout_string,
i, pad_name, buf);
81 int main(
int argc,
char **argv)
86 const char *filter_name;
87 const char *filter_args =
NULL;
94 fprintf(stderr,
"Missing filter name as argument\n");
98 filter_name = argv[1];
100 filter_args = argv[2];
109 fprintf(stderr,
"Unrecognized filter with name '%s'\n", filter_name);
115 fprintf(stderr,
"Impossible to open filter with name '%s'\n",
120 fprintf(stderr,
"Impossible to init filter '%s' with arguments '%s'\n",
121 filter_name, filter_args);
129 fprintf(stderr,
"Unable to allocate memory for filter input link\n");
139 fprintf(stderr,
"Unable to allocate memory for filter output link\n");
A list of supported channel layouts.
static FilteringContext * filter_ctx
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
enum MovChannelLayoutTag * layouts
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
Return a description of a channel layout.
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.
A filter pad used for either input or output.
#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.