Go to the documentation of this file.
34 unsigned nb,
size_t fmts_cfg_offset,
35 const char *inout_string)
37 for (
unsigned i = 0;
i < nb;
i++) {
44 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++) {
45 printf(
"%s[%u] %s: fmt:%s\n",
46 inout_string,
i, pad_name,
53 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++)
54 printf(
"%s[%u] %s: fmt:%s\n",
55 inout_string,
i, pad_name,
58 for (
unsigned j = 0;
layouts && j <
layouts->nb_channel_layouts; j++) {
61 printf(
"%s[%u] %s: chlayout:%s\n",
62 inout_string,
i, pad_name, buf);
78 int main(
int argc,
char **argv)
83 const char *filter_name;
84 const char *filter_args =
NULL;
91 fprintf(stderr,
"Missing filter name as argument\n");
95 filter_name = argv[1];
97 filter_args = argv[2];
106 fprintf(stderr,
"Unrecognized filter with name '%s'\n", filter_name);
112 fprintf(stderr,
"Impossible to open filter with name '%s'\n",
117 fprintf(stderr,
"Impossible to init filter '%s' with arguments '%s'\n",
118 filter_name, filter_args);
126 fprintf(stderr,
"Unable to allocate memory for filter input link\n");
136 fprintf(stderr,
"Unable to allocate memory for filter output link\n");
A list of supported channel layouts.
@ FF_FILTER_FORMATS_QUERY_FUNC
formats.query active.
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
enum MovChannelLayoutTag * layouts
void(* filter)(uint8_t *src, int stride, int qscale)
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)
#define av_malloc_array(a, b)
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
@ FF_FILTER_FORMATS_QUERY_FUNC2
formats.query_func2 active.
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.
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.