Lines Matching +full:- +full:outfile
2 * Copyright (c) 2008-2010 Stefano Sabatini
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
43 "-i INFILE set INFILE as input file, stdin if omitted\n" in usage()
44 "-o OUTFILE set OUTFILE as output file, stdout if omitted\n" in usage()
45 "-h print this help\n"); in usage()
53 static void print_digraph(FILE *outfile, AVFilterGraph *graph) in print_digraph() argument
57 fprintf(outfile, "digraph G {\n"); in print_digraph()
58 fprintf(outfile, "node [shape=box]\n"); in print_digraph()
59 fprintf(outfile, "rankdir=LR\n"); in print_digraph()
61 for (i = 0; i < graph->nb_filters; i++) { in print_digraph()
63 const AVFilterContext *filter_ctx = graph->filters[i]; in print_digraph()
66 filter_ctx->name, in print_digraph()
67 filter_ctx->filter->name); in print_digraph()
69 for (j = 0; j < filter_ctx->nb_outputs; j++) { in print_digraph()
70 AVFilterLink *link = filter_ctx->outputs[j]; in print_digraph()
73 const AVFilterContext *dst_filter_ctx = link->dst; in print_digraph()
77 dst_filter_ctx->name, in print_digraph()
78 dst_filter_ctx->filter->name); in print_digraph()
80 fprintf(outfile, "\"%s\" -> \"%s\" [ label= \"inpad:%s -> outpad:%s\\n", in print_digraph()
82 avfilter_pad_get_name(link->srcpad, 0), in print_digraph()
83 avfilter_pad_get_name(link->dstpad, 0)); in print_digraph()
85 if (link->type == AVMEDIA_TYPE_VIDEO) { in print_digraph()
86 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format); in print_digraph()
87 fprintf(outfile, in print_digraph()
89 desc->name, in print_digraph()
90 link->w, link->h, in print_digraph()
91 link->time_base.num, link->time_base.den); in print_digraph()
92 } else if (link->type == AVMEDIA_TYPE_AUDIO) { in print_digraph()
94 av_channel_layout_describe(&link->ch_layout, buf, sizeof(buf)); in print_digraph()
95 fprintf(outfile, in print_digraph()
97 av_get_sample_fmt_name(link->format), in print_digraph()
98 link->sample_rate, buf, in print_digraph()
99 link->time_base.num, link->time_base.den); in print_digraph()
101 fprintf(outfile, "\" ];\n"); in print_digraph()
105 fprintf(outfile, "}\n"); in print_digraph()
112 FILE *outfile = NULL; in main() local
120 while ((c = getopt(argc, argv, "hi:o:")) != -1) { in main()
136 if (!infilename || !strcmp(infilename, "-")) in main()
145 if (!outfilename || !strcmp(outfilename, "-")) in main()
147 outfile = fopen(outfilename, "w"); in main()
148 if (!outfile) { in main()
165 while (fgets(last_line->data, sizeof(last_line->data), infile)) { in main()
171 count += strlen(last_line->data); in main()
172 last_line->next = new_line; in main()
175 last_line->next = NULL; in main()
183 for (line = first_line; line->next; line = line->next) { in main()
184 size_t l = strlen(line->data); in main()
185 memcpy(p, line->data, l); in main()
205 print_digraph(outfile, graph); in main()
206 fflush(outfile); in main()