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 {
45 int ret = 0;
47
50
51 if ((arg =
av_strtok(args,
":", &ptr)) && strcmp(arg,
"auto")) {
54 }
55 if ((arg =
av_strtok(
NULL,
":", &ptr)) && strcmp(arg,
"auto")) {
58 }
59
62 return ret;
63 }
64
66 {
69 }
70
72 {
78
85 } else
88
95 } else
98
99 return 0;
100 }
101
103 {
104 int ret;
108 char buf1[64], buf2[64];
109
110 /* if not specified in args, use the format and layout of the output */
115
119 0, ctx);
123 if (ret < 0)
124 return ret;
125
127 -1, inlink ->channel_layout);
131 "fmt:%s cl:%s -> fmt:%s cl:%s\n",
134
135 return 0;
136 }
137
139 {
144 int ret;
145
147 (
void *)insamplesref->
data, n);
148
152
155 return ret;
156 }
157
159 {
164 },
166 };
167
169 {
173 },
175 };
176
184 .
inputs = aconvert_inputs,
186 };