35 AVBPrint dummy_buffer = { 0 };
69 unsigned max_src_name = 0, max_dst_name = 0;
70 unsigned max_in_name = 0, max_out_name = 0;
71 unsigned max_in_fmt = 0, max_out_fmt = 0;
73 unsigned lname = strlen(filter->
name);
79 max_src_name =
FFMAX(max_src_name, ln);
86 max_dst_name =
FFMAX(max_dst_name, ln);
90 in_indent = max_src_name + max_in_name + max_in_fmt;
91 in_indent += in_indent ? 4 : 0;
92 width =
FFMAX(lname + 2, ltype + 4);
98 for (j = 0; j <
height; j++) {
99 unsigned in_no = j - (height - filter->
nb_inputs ) / 2;
100 unsigned out_no = j - (height - filter->
nb_outputs) / 2;
103 if (in_no < filter->nb_inputs) {
105 e = buf->len + max_src_name + 2;
108 e = buf->len + max_in_fmt + 2 +
119 if (j == (height - 2) / 2) {
120 x = (width - lname) / 2;
122 }
else if (j == (height - 2) / 2 + 1) {
123 x = (width - ltype - 2) / 2;
125 width - ltype - 2 - x,
"");
132 if (out_no < filter->nb_outputs) {
134 unsigned ln = strlen(l->
dst->
name) + 1 +
136 e = buf->len + max_out_name + 2;
139 e = buf->len + max_out_fmt + 2 +
AVFilterContext ** filters
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Main libavfilter public API header.
int h
agreed upon image height
AVFilterPad * dstpad
input pad on the dest filter
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
char * name
name of this filter instance
static void avfilter_graph_dump_to_buf(AVBPrint *buf, AVFilterGraph *graph)
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, uint8_t clip)
const OptionDef options[]
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.
A link between two filters.
static int print_link_prop(AVBPrint *buf, AVFilterLink *link)
int sample_rate
samples per second
unsigned nb_outputs
number of output pads
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
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.
int w
agreed upon image width
audio channel layout utility functions
unsigned nb_inputs
number of input pads
AVFilterContext * src
source filter
int format
agreed upon media format
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
Return a description of a channel layout.
static const char * format
const char * name
Filter name.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterLink ** outputs
array of pointers to output links
enum AVMediaType type
filter media type
char * avfilter_graph_dump(AVFilterGraph *graph, const char *options)
Dump a graph into a human-readable string representation.
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
int channels
Number of channels.
AVFilterContext * dst
dest filter
AVFilterPad * srcpad
output pad on the source filter
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.
const AVFilter * filter
the AVFilter of which this is an instance
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.