24 #include "libavutil/channel_layout.h"
25 #include "libavutil/bprint.h"
26 #include "libavutil/pixdesc.h"
67 unsigned max_src_name = 0, max_dst_name = 0;
68 unsigned max_in_name = 0, max_out_name = 0;
69 unsigned max_in_fmt = 0, max_out_fmt = 0;
71 unsigned lname = strlen(filter->
name);
77 max_src_name =
FFMAX(max_src_name, ln);
84 max_dst_name =
FFMAX(max_dst_name, ln);
88 in_indent = max_src_name + max_in_name + max_in_fmt;
89 in_indent += in_indent ? 4 : 0;
90 width =
FFMAX(lname + 2, ltype + 4);
96 for (j = 0; j <
height; j++) {
97 unsigned in_no = j - (height - filter->
nb_inputs ) / 2;
98 unsigned out_no = j - (height - filter->
nb_outputs) / 2;
101 if (in_no < filter->nb_inputs) {
103 e = buf->len + max_src_name + 2;
106 e = buf->len + max_in_fmt + 2 +
117 if (j == (height - 2) / 2) {
118 x = (width - lname) / 2;
120 }
else if (j == (height - 2) / 2 + 1) {
121 x = (width - ltype - 2) / 2;
123 width - ltype - 2 - x,
"");
130 if (out_no < filter->nb_outputs) {
132 unsigned ln = strlen(l->
dst->
name) + 1 +
134 e = buf->len + max_out_name + 2;
137 e = buf->len + max_out_fmt + 2 +
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
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.
const char * name
Filter name.
int h
agreed upon image height
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 char * name
Pad name.
static void avfilter_graph_dump_to_buf(AVBPrint *buf, AVFilterGraph *graph)
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
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
AVFilterContext * src
source filter
AVFilterPad * dstpad
input pad on the dest filter
int w
agreed upon image width
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
Init a print buffer.
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
Buffer to print data progressively.
char * name
name of this filter instance
unsigned nb_inputs
number of input pads
const AVFilter * filter
the AVFilter of which this is an instance
int format
agreed upon media format
Main libavfilter public API header.
AVFilterLink ** outputs
array of pointers to output links
BYTE int const BYTE int int int height
AVFilterLink ** inputs
array of pointers to input links
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterContext * dst
dest filter
enum AVMediaType type
filter media type
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
int channels
Number of channels.
AVFilterContext ** filters
void av_bprintf(AVBPrint *buf, const char *fmt,...) av_printf_format(2
Append a formatted string to a print buffer.
AVFilterPad * srcpad
output pad on the source filter
char * avfilter_graph_dump(AVFilterGraph *graph, const char *options)
Dump a graph into a human-readable string representation.
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.