28 int main(
int argc,
char **argv)
33 const char *filter_args =
NULL;
39 fprintf(stderr,
"Missing filter name as argument\n");
43 filter_name = argv[1];
45 filter_args = argv[2];
51 fprintf(stderr,
"Unrecognized filter with name '%s'\n", filter_name);
56 fprintf(stderr,
"Impossible to open filter with name '%s'\n",
61 fprintf(stderr,
"Impossible to init filter '%s' with arguments '%s'\n",
62 filter_name, filter_args);
67 for (i = 0; i < filter_ctx->input_count; i++) {
70 filter_ctx->
inputs[i] = link;
72 for (i = 0; i < filter_ctx->output_count; i++) {
84 for (i = 0; i < filter_ctx->input_count; i++) {
87 printf(
"INPUT[%d] %s: %s\n",
93 for (i = 0; i < filter_ctx->output_count; i++) {
96 printf(
"OUTPUT[%d] %s: %s\n",
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
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.
AVFilterFormats * in_formats
Lists of formats supported by the input and output filters respectively.
void av_log_set_level(int level)
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
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
AVFilter * filter
the AVFilter of which this is an instance
int main(int argc, char **argv)
const AVFilterPad * outputs
NULL terminated list of outputs. NULL if none.
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.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
AVFilterFormats * out_formats