1 /*
2 * Copyright (c) 2009 Stefano Sabatini
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include <stdio.h>
22
27
33
35 unsigned nb, size_t fmts_cfg_offset,
36 const char *inout_string)
37 {
38 for (
unsigned i = 0;
i < nb;
i++) {
42
45 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++) {
46 printf(
"%s[%u] %s: fmt:%s\n",
47 inout_string,
i, pad_name,
49 }
53
54 for (
unsigned j = 0; fmts && j < fmts->
nb_formats; j++)
55 printf(
"%s[%u] %s: fmt:%s\n",
56 inout_string,
i, pad_name,
58
59 for (
unsigned j = 0;
layouts && j <
layouts->nb_channel_layouts; j++) {
60 char buf[256];
62 printf(
"%s[%u] %s: chlayout:%s\n",
63 inout_string,
i, pad_name, buf);
64 }
65 }
66 }
67 }
68
70 {
77 }
78
79 int main(
int argc,
char **argv)
80 {
84 const char *filter_name;
85 const char *filter_args =
NULL;
88
90
91 if (argc < 2) {
92 fprintf(stderr, "Missing filter name as argument\n");
93 return 1;
94 }
95
96 filter_name = argv[1];
97 if (argc > 2)
98 filter_args = argv[2];
99
100 /* allocate graph */
102 if (!graph_ctx)
103 return 1;
104
105 /* get a corresponding filter and open it */
107 fprintf(stderr, "Unrecognized filter with name '%s'\n", filter_name);
108 return 1;
109 }
110
111 /* open filter and add it to the graph */
113 fprintf(stderr, "Impossible to open filter with name '%s'\n",
114 filter_name);
115 return 1;
116 }
118 fprintf(stderr, "Impossible to init filter '%s' with arguments '%s'\n",
119 filter_name, filter_args);
120 return 1;
121 }
122
123 /* create a link for each of the input pads */
127 fprintf(stderr, "Unable to allocate memory for filter input link\n");
130 }
133 }
137 fprintf(stderr, "Unable to allocate memory for filter output link\n");
140 }
143 }
144
147 else
149
151
155 fflush(stdout);
157 }