AudioDecoderFfmpeg.h

Go to the documentation of this file.
00001 // AudioDecoderFfmpeg.h: Audio decoding using the FFMPEG library.
00002 // 
00003 //   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 // $Id: AudioDecoderFfmpeg_8h-source.html,v 1.1 2008/03/07 02:36:16 bjacques Exp $
00020 
00021 #ifndef __AUDIODECODERFFMPEG_H__
00022 #define __AUDIODECODERFFMPEG_H__
00023 
00024 #ifndef __STDC_CONSTANT_MACROS
00025 #define __STDC_CONSTANT_MACROS
00026 #endif
00027 
00028 extern "C" {
00029 #include <ffmpeg/avcodec.h>
00030 }
00031 
00032 #include "log.h"
00033 #include "AudioDecoder.h"
00034 #include "ffmpegNetStreamUtil.h"
00035 
00036 namespace gnash {
00037 namespace media {
00038 
00039 class AudioDecoderFfmpeg : public AudioDecoder {
00040         
00041 public:
00042         AudioDecoderFfmpeg();
00043         ~AudioDecoderFfmpeg();
00044 
00045         bool setup(AudioInfo* info);
00046         bool setup(SoundInfo* info);
00047 
00048         boost::uint8_t* decode(boost::uint8_t* input, boost::uint32_t inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedBytes, bool parse);
00049 
00050 private:
00051 
00052         AVCodec* _audioCodec;
00053         AVCodecContext* _audioCodecCtx;
00054         AVCodecParserContext* _parser;
00055 
00056         // Use for resampling audio
00057         AudioResampler _resampler;
00058 };
00059         
00060 } // gnash.media namespace 
00061 } // gnash namespace
00062 
00063 #endif // __AUDIODECODERFFMPEG_H__

Generated on Thu Mar 6 18:25:06 2008 for Gnash by  doxygen 1.5.4