Go to the documentation of this file.
35 unsigned nb,
size_t fmts_cfg_offset,
36 const char *inout_string)
38 for (
unsigned i = 0;
i < nb;
i++) {
45 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++) {
46 printf(
"%s[%u] %s: fmt:%s\n",
47 inout_string,
i, pad_name,
54 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++)
55 printf(
"%s[%u] %s: fmt:%s\n",
56 inout_string,
i, pad_name,
59 for (
unsigned j = 0;
layouts && j <
layouts->nb_channel_layouts; j++) {
62 printf(
"%s[%u] %s: chlayout:%s\n",
63 inout_string,
i, pad_name, buf);
79 int main(
int argc,
char **argv)
84 const char *filter_name;
85 const char *filter_args =
NULL;
92 fprintf(stderr,
"Missing filter name as argument\n");
96 filter_name = argv[1];
98 filter_args = argv[2];
107 fprintf(stderr,
"Unrecognized filter with name '%s'\n", filter_name);
113 fprintf(stderr,
"Impossible to open filter with name '%s'\n",
118 fprintf(stderr,
"Impossible to init filter '%s' with arguments '%s'\n",
119 filter_name, filter_args);
127 fprintf(stderr,
"Unable to allocate memory for filter input link\n");
137 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.