Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavresample
avresample.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>
3
*
4
* This file is part of Libav.
5
*
6
* Libav is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* Libav is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with Libav; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef AVRESAMPLE_AVRESAMPLE_H
22
#define AVRESAMPLE_AVRESAMPLE_H
23
96
#include "
libavutil/avutil.h
"
97
#include "
libavutil/channel_layout.h
"
98
#include "
libavutil/dict.h
"
99
#include "
libavutil/log.h
"
100
101
#include "
libavresample/version.h
"
102
103
#define AVRESAMPLE_MAX_CHANNELS 32
104
105
typedef
struct
AVAudioResampleContext
AVAudioResampleContext
;
106
108
enum
AVMixCoeffType
{
109
AV_MIX_COEFF_TYPE_Q8
,
110
AV_MIX_COEFF_TYPE_Q15
,
111
AV_MIX_COEFF_TYPE_FLT
,
112
AV_MIX_COEFF_TYPE_NB
,
113
};
114
116
enum
AVResampleFilterType
{
117
AV_RESAMPLE_FILTER_TYPE_CUBIC
,
118
AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL
,
119
AV_RESAMPLE_FILTER_TYPE_KAISER
,
120
};
121
122
enum
AVResampleDitherMethod
{
123
AV_RESAMPLE_DITHER_NONE
,
124
AV_RESAMPLE_DITHER_RECTANGULAR
,
125
AV_RESAMPLE_DITHER_TRIANGULAR
,
126
AV_RESAMPLE_DITHER_TRIANGULAR_HP
,
127
AV_RESAMPLE_DITHER_TRIANGULAR_NS
,
128
AV_RESAMPLE_DITHER_NB
,
129
};
130
134
unsigned
avresample_version
(
void
);
135
140
const
char
*
avresample_configuration
(
void
);
141
145
const
char
*
avresample_license
(
void
);
146
157
const
AVClass
*
avresample_get_class
(
void
);
158
164
AVAudioResampleContext
*
avresample_alloc_context
(
void
);
165
172
int
avresample_open
(
AVAudioResampleContext
*avr);
173
187
void
avresample_close
(
AVAudioResampleContext
*avr);
188
196
void
avresample_free
(
AVAudioResampleContext
**avr);
197
220
int
avresample_build_matrix
(uint64_t in_layout, uint64_t out_layout,
221
double
center_mix_level
,
double
surround_mix_level
,
222
double
lfe_mix_level
,
int
normalize,
double
*matrix,
223
int
stride
,
enum
AVMatrixEncoding
matrix_encoding
);
224
237
int
avresample_get_matrix
(
AVAudioResampleContext
*avr,
double
*matrix,
238
int
stride
);
239
258
int
avresample_set_matrix
(
AVAudioResampleContext
*avr,
const
double
*matrix,
259
int
stride
);
260
274
int
avresample_set_compensation
(
AVAudioResampleContext
*avr,
int
sample_delta,
275
int
compensation_distance);
276
320
int
avresample_convert
(
AVAudioResampleContext
*avr,
uint8_t
**output,
321
int
out_plane_size,
int
out_samples,
uint8_t
**input,
322
int
in_plane_size,
int
in_samples);
323
337
int
avresample_get_delay
(
AVAudioResampleContext
*avr);
338
354
int
avresample_available
(
AVAudioResampleContext
*avr);
355
373
int
avresample_read
(
AVAudioResampleContext
*avr,
uint8_t
**output,
int
nb_samples
);
374
379
#endif
/* AVRESAMPLE_AVRESAMPLE_H */