00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00057 AudioResampler _resampler;
00058 };
00059
00060 }
00061 }
00062
00063 #endif // __AUDIODECODERFFMPEG_H__