34 AVBPrint dummy_buffer;
70 unsigned max_src_name = 0, max_dst_name = 0;
71 unsigned max_in_name = 0, max_out_name = 0;
72 unsigned max_in_fmt = 0, max_out_fmt = 0;
74 unsigned lname = strlen(
filter->name);
75 unsigned ltype = strlen(
filter->filter->name);
77 for (j = 0; j <
filter->nb_inputs; j++) {
80 max_src_name =
FFMAX(max_src_name, ln);
84 for (j = 0; j <
filter->nb_outputs; j++) {
87 max_dst_name =
FFMAX(max_dst_name, ln);
91 in_indent = max_src_name + max_in_name + max_in_fmt;
92 in_indent += in_indent ? 4 : 0;
99 for (j = 0; j <
height; j++) {
101 unsigned out_no = j - (
height -
filter->nb_outputs) / 2;
104 if (in_no < filter->nb_inputs) {
106 e = buf->len + max_src_name + 2;
109 e = buf->len + max_in_fmt + 2 +
120 if (j == (
height - 2) / 2) {
121 x = (
width - lname) / 2;
123 }
else if (j == (
height - 2) / 2 + 1) {
124 x = (
width - ltype - 2) / 2;
126 width - ltype - 2 - x,
"");
133 if (out_no < filter->nb_outputs) {
135 unsigned ln = strlen(l->
dst->
name) + 1 +
137 e = buf->len + max_out_name + 2;
140 e = buf->len + max_out_fmt + 2 +
static const char *const format[]
Main libavfilter public API header.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_COUNT_ONLY
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
static void avfilter_graph_dump_to_buf(AVBPrint *buf, AVFilterGraph *graph)
static int print_link_prop(AVBPrint *buf, AVFilterLink *link)
char * avfilter_graph_dump(AVFilterGraph *graph, const char *options)
Dump a graph into a human-readable string representation.
int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout, AVBPrint *bp)
bprint variant of av_channel_layout_describe().
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size)
Init a print buffer using a pre-existing buffer.
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.
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.
Memory handling functions.
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.
char * name
name of this filter instance
AVFilterContext ** filters
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
enum AVMediaType type
filter media type
AVFilterContext * src
source filter
int sample_rate
samples per second
AVChannelLayout ch_layout
channel layout of current buffer (see libavutil/channel_layout.h)
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterPad * srcpad
output pad on the source filter
AVFilterPad * dstpad
input pad on the dest filter
AVFilterContext * dst
dest filter
int format
agreed upon media format
const char * name
Pad name.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)