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);
78int 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);
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");
Main libavfilter public API header.
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
__device__ int printf(const char *,...)
static CheckasmConfig cfg
static void print_formats_internal(AVFilterLink **links, const AVFilterPad *pads, unsigned nb, size_t fmts_cfg_offset, const char *inout_string)
static void print_formats(AVFilterContext *filter_ctx)
int avfilter_init_str(AVFilterContext *filter, const char *args)
Initialize a filter with the supplied parameters.
void avfilter_free(AVFilterContext *filter)
Free a filter context.
const AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx)
Get the type of an AVFilterPad.
AVFilterContext * avfilter_graph_alloc_filter(AVFilterGraph *graph, const AVFilter *filter, const char *name)
Create a new filter instance in a filter graph.
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
void avfilter_graph_free(AVFilterGraph **graph)
Free a graph, destroy its links, and set *graph to NULL.
AVFilterGraph * avfilter_graph_alloc(void)
Allocate a filter graph.
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.
void av_log_set_level(int level)
Set the log level.
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.
@ FF_FILTER_FORMATS_QUERY_FUNC
formats.query active.
@ FF_FILTER_FORMATS_QUERY_FUNC2
formats.query_func2 active.
static const FFFilter * fffilter(const AVFilter *f)
Memory handling functions.
enum MovChannelLayoutTag * layouts
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.
A list of supported channel layouts.
A link between two filters.
enum AVMediaType type
filter media type
A filter pad used for either input or output.
union FFFilter::@003362370206325206235327213200257027224372065311 formats
The state of the following union is determined by formats_state.
int(* query_func2)(const AVFilterContext *, struct AVFilterFormatsConfig **cfg_in, struct AVFilterFormatsConfig **cfg_out)
Same as query_func(), except this function writes the results into provided arrays.
int(* query_func)(AVFilterContext *)
Query formats supported by the filter on its inputs and outputs.
uint8_t formats_state
This field determines the state of the formats union.
#define av_malloc_array(a, b)
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
static FilteringContext * filter_ctx