00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVRESAMPLE_AVRESAMPLE_H
00022 #define AVRESAMPLE_AVRESAMPLE_H
00023
00029 #include "libavutil/audioconvert.h"
00030 #include "libavutil/avutil.h"
00031 #include "libavutil/dict.h"
00032 #include "libavutil/log.h"
00033
00034 #include "libavresample/version.h"
00035
00036 #define AVRESAMPLE_MAX_CHANNELS 32
00037
00038 typedef struct AVAudioResampleContext AVAudioResampleContext;
00039
00041 enum AVMixCoeffType {
00042 AV_MIX_COEFF_TYPE_Q8,
00043 AV_MIX_COEFF_TYPE_Q15,
00044 AV_MIX_COEFF_TYPE_FLT,
00045 AV_MIX_COEFF_TYPE_NB,
00046 };
00047
00051 unsigned avresample_version(void);
00052
00057 const char *avresample_configuration(void);
00058
00062 const char *avresample_license(void);
00063
00074 const AVClass *avresample_get_class(void);
00075
00081 AVAudioResampleContext *avresample_alloc_context(void);
00082
00089 int avresample_open(AVAudioResampleContext *avr);
00090
00104 void avresample_close(AVAudioResampleContext *avr);
00105
00113 void avresample_free(AVAudioResampleContext **avr);
00114
00136 int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout,
00137 double center_mix_level, double surround_mix_level,
00138 double lfe_mix_level, int normalize, double *matrix,
00139 int stride);
00140
00150 int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix,
00151 int stride);
00152
00170 int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix,
00171 int stride);
00172
00187 int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta,
00188 int compensation_distance);
00189
00229 int avresample_convert(AVAudioResampleContext *avr, void **output,
00230 int out_plane_size, int out_samples, void **input,
00231 int in_plane_size, int in_samples);
00232
00246 int avresample_get_delay(AVAudioResampleContext *avr);
00247
00263 int avresample_available(AVAudioResampleContext *avr);
00264
00282 int avresample_read(AVAudioResampleContext *avr, void **output, int nb_samples);
00283
00284 #endif