25 int main(
int argc,
char **argv)
30 const char *filter_args =
NULL;
36 fprintf(stderr,
"Missing filter name as argument\n");
40 filter_name = argv[1];
42 filter_args = argv[2];
48 fprintf(stderr,
"Unrecognized filter with name '%s'\n", filter_name);
53 fprintf(stderr,
"Inpossible to open filter with name '%s'\n", filter_name);
57 fprintf(stderr,
"Impossible to init filter '%s' with arguments '%s'\n", filter_name, filter_args);
65 filter_ctx->
inputs[i] = link;
82 printf(
"INPUT[%d] %s: %s\n",
91 printf(
"OUTPUT[%d] %s: %s\n",
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
void avfilter_register_all(void)
Initialize the filter system.
static const char * filter_name(void *p)
void avfilter_free(AVFilterContext *filter)
Free a filter context.
enum AVMediaType type
AVFilterPad type.
int(* query_formats)(AVFilterContext *)
Queries formats supported by the filter and its pads, and sets the in_formats for links connected to ...
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
unsigned input_count
number of input pads
int avfilter_default_query_formats(AVFilterContext *ctx)
Default handler for query_formats()
A link between two filters.
int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque)
Initialize a filter.
AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
int main(int argc, char **argv)
AVFilterFormats * in_formats
Lists of formats supported by the input and output filters respectively.
void av_log_set_level(int level)
const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB]
The array of all the pixel format descriptors.
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
unsigned output_count
number of output pads
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name)
Create a filter instance.
const AVFilterPad * inputs
NULL terminated list of inputs. NULL if none.
AVFilterLink ** outputs
array of pointers to output links
enum AVMediaType type
filter media type
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
AVFilter * filter
the AVFilter of which this is an instance
const AVFilterPad * outputs
NULL terminated list of outputs. NULL if none.
AVFilterFormats * out_formats