00001 /* 00002 * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com> 00003 * 00004 * This file is part of Libav. 00005 * 00006 * Libav is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * Libav is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with Libav; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #ifndef AVRESAMPLE_INTERNAL_H 00022 #define AVRESAMPLE_INTERNAL_H 00023 00024 #include "libavutil/audio_fifo.h" 00025 #include "libavutil/log.h" 00026 #include "libavutil/opt.h" 00027 #include "libavutil/samplefmt.h" 00028 #include "avresample.h" 00029 #include "audio_convert.h" 00030 #include "audio_data.h" 00031 #include "audio_mix.h" 00032 #include "resample.h" 00033 00034 struct AVAudioResampleContext { 00035 const AVClass *av_class; 00037 uint64_t in_channel_layout; 00038 enum AVSampleFormat in_sample_fmt; 00039 int in_sample_rate; 00040 uint64_t out_channel_layout; 00041 enum AVSampleFormat out_sample_fmt; 00042 int out_sample_rate; 00043 enum AVSampleFormat internal_sample_fmt; 00044 enum AVMixCoeffType mix_coeff_type; 00045 double center_mix_level; 00046 double surround_mix_level; 00047 double lfe_mix_level; 00048 int force_resampling; 00049 int filter_size; 00050 int phase_shift; 00051 int linear_interp; 00052 double cutoff; 00054 int in_channels; 00055 int out_channels; 00056 int resample_channels; 00057 int downmix_needed; 00058 int upmix_needed; 00059 int mixing_needed; 00060 int resample_needed; 00061 int in_convert_needed; 00062 int out_convert_needed; 00064 AudioData *in_buffer; 00065 AudioData *resample_out_buffer; 00066 AudioData *out_buffer; 00067 AVAudioFifo *out_fifo; 00069 AudioConvert *ac_in; 00070 AudioConvert *ac_out; 00071 ResampleContext *resample; 00072 AudioMix *am; 00073 }; 00074 00075 #endif /* AVRESAMPLE_INTERNAL_H */