2 * Copyright (c) Stefano Sabatini | stefasab at gmail.com
3 * Copyright (c) S.N. Hemanth Meenakshisundaram | smeenaks at ucsd.edu
5 * This file is part of FFmpeg.
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.
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.
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
22 #ifndef AVFILTER_AUDIO_H
23 #define AVFILTER_AUDIO_H
29 * An AVFilterPad array whose only entry has name "default"
30 * and is of type AVMEDIA_TYPE_AUDIO.
32 extern const AVFilterPad ff_audio_default_filterpad
[1];
34 /** default handler for get_audio_buffer() for audio inputs */
35 AVFrame
*ff_default_get_audio_buffer(AVFilterLink
*link
, int nb_samples
);
37 /** get_audio_buffer() handler for filters which simply pass audio along */
38 AVFrame
*ff_null_get_audio_buffer(AVFilterLink
*link
, int nb_samples
);
41 * Request an audio samples buffer with a specific set of permissions.
43 * @param link the output link to the filter from which the buffer will
45 * @param nb_samples the number of samples per channel
46 * @return on success an AVFrame owned by the caller, NULL on error
48 AVFrame
*ff_get_audio_buffer(AVFilterLink
*link
, int nb_samples
);
51 * Parse a sample rate.
53 * @param ret unsigned integer pointer to where the value should be written
54 * @param arg string to parse
55 * @param log_ctx log context
56 * @return >= 0 in case of success, a negative AVERROR code on error
59 int ff_parse_sample_rate(int *ret
, const char *arg
, void *log_ctx
);
62 * Parse a channel layout or a corresponding integer representation.
64 * @param ret 64bit integer pointer to where the value should be written.
65 * @param nret integer pointer to the number of channels;
66 * if not NULL, then unknown channel layouts are accepted
67 * @param arg string to parse
68 * @param log_ctx log context
69 * @return >= 0 in case of success, a negative AVERROR code on error
72 int ff_parse_channel_layout(AVChannelLayout
*ret
, int *nret
, const char *arg
,
75 #endif /* AVFILTER_AUDIO_H */