comparison audioconvert.h @ 7453:d1d15f2dca4c libavcodec

Add sample format support functions: avcodec_get_sample_fmt_name(), avcodec_get_sample_fmt(), avcodec_sample_fmt_string()
author pross
date Thu, 31 Jul 2008 12:55:06 +0000
parents
children 283eeda62184
comparison
equal deleted inserted replaced
7452:2240c6340eac 7453:d1d15f2dca4c
1 /*
2 * audio conversion
3 * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
4 * Copyright (c) 2008 Peter Ross
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 #ifndef FFMPEG_AUDIOCONVERT_H
24 #define FFMPEG_AUDIOCONVERT_H
25
26 /**
27 * @file audioconvert.h
28 * Audio format conversion routines
29 */
30
31
32 #include "avcodec.h"
33
34
35 /**
36 * Generate string corresponding to the sample format with
37 * number sample_fmt, or a header if sample_fmt is negative.
38 *
39 * @param[in] buf the buffer where to write the string
40 * @param[in] buf_size the size of buf
41 * @param[in] sample_fmt the number of the sample format to print the corresponding info string, or
42 * a negative value to print the corresponding header.
43 * Meaningful values for obtaining a sample format info vary from 0 to SAMPLE_FMT_NB -1.
44 */
45 void avcodec_sample_fmt_string(char *buf, int buf_size, int sample_fmt);
46
47 /**
48 * @return NULL on error
49 */
50 const char *avcodec_get_sample_fmt_name(int sample_fmt);
51
52 /**
53 * @return SAMPLE_FMT_NONE on error
54 */
55 enum SampleFormat avcodec_get_sample_fmt(const char* name);
56
57 #endif /* FFMPEG_AUDIOCONVERT_H */