1 /*
2 * Copyright (c) 2010 S.N. Hemanth Meenakshisundaram <smeenaks@ucsd.edu>
3 * Copyright (c) 2011 Stefano Sabatini
4 * Copyright (c) 2011 Mina Nagy Zaki
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 /**
24 * @file
25 * sample format and channel layout conversion audio filter
26 */
27
34
40
42 {
44 char *
arg, *ptr = NULL;
47
49
52
53 if ((arg =
av_strtok(args,
":", &ptr)) && strcmp(arg,
"auto")) {
56 }
57 if ((arg =
av_strtok(NULL,
":", &ptr)) && strcmp(arg,
"auto")) {
60 }
61
65 }
66
68 {
71 }
72
74 {
80
84 formats = NULL;
87 } else
90
94 layouts = NULL;
97 } else
100
101 return 0;
102 }
103
105 {
110 char buf1[64], buf2[64];
111
112 /* if not specified in args, use the format and layout of the output */
117
121 0, ctx);
125 if (ret < 0)
127
129 -1, inlink ->channel_layout);
133 "fmt:%s cl:%s -> fmt:%s cl:%s\n",
136
137 return 0;
138 }
139
141 {
147
148 if (!outsamplesref)
152
156
160 }
161
163 {
167 },
168 { NULL }
169 };
170
172 {
176 },
177 { NULL }
178 };
179
187 .
inputs = aconvert_inputs,
189 };