1 /*
2 * Copyright (c) 2011 Stefano Sabatini
3 * Copyright (c) 2011 Mina Nagy Zaki
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 /**
23 * @file
24 * resampling audio filter
25 */
26
36
43
45 {
47 int ret = 0;
49
52 if (!aresample->
swr) {
55 }
56
57 if (args) {
58 char *ptr = argd, *token;
59
60 while (token =
av_strtok(ptr,
":", &ptr)) {
63
64 if (value) {
67 } else {
68 int out_rate;
73 }
74 }
75 }
78 return ret;
79 }
80
82 {
85 }
86
88 {
93
96
103
107
108 if(out_rate > 0) {
110 } else {
112 }
114
117 } else
120
121 if(out_layout) {
123 } else
126
127 return 0;
128 }
129
130
132 {
133 int ret;
137 int out_rate;
138 uint64_t out_layout;
140 char inchl_buf[128], outchl_buf[128];
141
145 0, ctx);
152
154 if (ret < 0)
155 return ret;
156
161
165
167
170
174 return 0;
175 }
176
178 {
181 int n_out = n_in * aresample->
ratio * 2 + 256;
184 int ret;
185
186 if(!outsamplesref)
188
194
200 } else {
202 }
205 if (n_out <= 0) {
208 return 0;
209 }
210
212
216 return ret;
217 }
218
220 {
224 int ret;
225
227 do{
230
233 int n_out = 4096;
234
236 if (!outsamplesref)
239 if (n_out <= 0) {
242 }
243
246 #if 0
250 #else
253 #endif
254
256 return 0;
257 }
258 return ret;
259 }
260
262 {
267 },
269 };
270
272 {
277 },
279 };
280
288 .
inputs = aresample_inputs,
290 };