Gnash
0.8.10
|
00001 // AudioResamplerFfmpeg.h - FFMPEG based audio resampler 00002 // 00003 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 00004 // Free Software Foundation, Inc 00005 // 00006 // This program is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 3 of the License, or 00009 // (at your option) any later version. 00010 00011 // This program 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 00014 // GNU General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with this program; if not, write to the Free Software 00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 00020 #ifndef GNASH_MEDIA_FFMPEG_AUDIORESAMPLERFFMPEG_H 00021 #define GNASH_MEDIA_FFMPEG_AUDIORESAMPLERFFMPEG_H 00022 00023 #include "log.h" 00024 #include "dsodefs.h" //For DSOEXPORT 00025 00026 #include "ffmpegHeaders.h" 00027 00028 #include <boost/cstdint.hpp> 00029 00030 namespace gnash { 00031 namespace media { 00032 namespace ffmpeg { 00033 00035 // 00038 class AudioResamplerFfmpeg 00039 { 00040 public: 00041 DSOEXPORT AudioResamplerFfmpeg(); 00042 00043 DSOEXPORT ~AudioResamplerFfmpeg(); 00044 00046 // 00052 DSOEXPORT bool init(AVCodecContext* ctx); 00053 00055 // 00067 DSOEXPORT int resample( 00068 boost::int16_t* input, boost::int16_t* output, int samples 00069 ); 00070 00071 private: 00072 // The container of the resample format information. 00073 ReSampleContext* _context; 00074 }; 00075 00076 } // gnash.media.ffmpeg namespace 00077 } // gnash.media namespace 00078 } // namespace gnash 00079 00080 00081 #endif // GNASH_MEDIA_FFMPEG_AUDIORESAMPLERFFMPEG_H