Libav
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavutil
samplefmt.h
Go to the documentation of this file.
1
/*
2
* This file is part of Libav.
3
*
4
* Libav is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* Libav is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with Libav; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#ifndef AVUTIL_SAMPLEFMT_H
20
#define AVUTIL_SAMPLEFMT_H
21
22
#include <stdint.h>
23
24
#include "
avutil.h
"
25
#include "
attributes.h
"
26
49
enum
AVSampleFormat
{
50
AV_SAMPLE_FMT_NONE
= -1,
51
AV_SAMPLE_FMT_U8
,
52
AV_SAMPLE_FMT_S16
,
53
AV_SAMPLE_FMT_S32
,
54
AV_SAMPLE_FMT_FLT
,
55
AV_SAMPLE_FMT_DBL
,
56
57
AV_SAMPLE_FMT_U8P
,
58
AV_SAMPLE_FMT_S16P
,
59
AV_SAMPLE_FMT_S32P
,
60
AV_SAMPLE_FMT_FLTP
,
61
AV_SAMPLE_FMT_DBLP
,
62
63
AV_SAMPLE_FMT_NB
64
};
65
70
const
char
*
av_get_sample_fmt_name
(
enum
AVSampleFormat
sample_fmt
);
71
76
enum
AVSampleFormat
av_get_sample_fmt
(
const
char
*
name
);
77
87
enum
AVSampleFormat
av_get_packed_sample_fmt
(
enum
AVSampleFormat
sample_fmt
);
88
98
enum
AVSampleFormat
av_get_planar_sample_fmt
(
enum
AVSampleFormat
sample_fmt
);
99
112
char
*
av_get_sample_fmt_string
(
char
*buf,
int
buf_size,
enum
AVSampleFormat
sample_fmt
);
113
121
int
av_get_bytes_per_sample
(
enum
AVSampleFormat
sample_fmt
);
122
129
int
av_sample_fmt_is_planar
(
enum
AVSampleFormat
sample_fmt
);
130
141
int
av_samples_get_buffer_size
(
int
*linesize,
int
nb_channels
,
int
nb_samples,
142
enum
AVSampleFormat
sample_fmt
,
int
align);
143
168
int
av_samples_fill_arrays
(
uint8_t
**audio_data,
int
*linesize,
169
const
uint8_t
*buf,
170
int
nb_channels
,
int
nb_samples,
171
enum
AVSampleFormat
sample_fmt
,
int
align);
172
190
int
av_samples_alloc
(
uint8_t
**audio_data,
int
*linesize,
int
nb_channels
,
191
int
nb_samples,
enum
AVSampleFormat
sample_fmt
,
int
align);
192
204
int
av_samples_copy
(
uint8_t
**dst,
uint8_t
*
const
*src,
int
dst_offset,
205
int
src_offset,
int
nb_samples,
int
nb_channels
,
206
enum
AVSampleFormat
sample_fmt
);
207
217
int
av_samples_set_silence
(
uint8_t
**audio_data,
int
offset,
int
nb_samples,
218
int
nb_channels
,
enum
AVSampleFormat
sample_fmt
);
219
220
#endif
/* AVUTIL_SAMPLEFMT_H */
Generated on Thu Sep 30 2021 23:03:22 for Libav by
1.8.1.2