Gnash  0.8.10
AudioDecoderHaiku.h
Go to the documentation of this file.
00001 // AudioDecoderHaiku.h: Audio decoding using the Haiku media kit.
00002 // 
00003 //   Copyright (C) 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 
00021 #ifndef GNASH_AUDIODECODERHAIKU_H
00022 #define GNASH_AUDIODECODERHAIKU_H
00023 
00024 #include "log.h"
00025 #include "AudioDecoder.h" // for inheritance
00026 
00027 // Forward declarations
00028 namespace gnash {
00029     namespace media {
00030         class SoundInfo;
00031         class AudioInfo;
00032     }
00033 }
00034 
00035 namespace gnash {
00036 namespace media {
00037 namespace haiku {
00038 
00040 class AudioDecoderHaiku : public AudioDecoder {
00041         
00042 public:
00047         AudioDecoderHaiku(const AudioInfo& info);
00048 
00053         AudioDecoderHaiku(SoundInfo& info);
00054         ~AudioDecoderHaiku();
00055 
00056     // See dox in AudioDecoder.h
00057         boost::uint8_t* decode(const boost::uint8_t* input, boost::uint32_t inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedBytes);
00058 
00059         boost::uint8_t* decode(const EncodedAudioFrame& af, boost::uint32_t& outputSize);
00060 
00061 private:
00062 //
00063 //      void setup(const AudioInfo& info);
00064 //      void setup(SoundInfo& info);
00065 //
00066 //      boost::uint8_t* decodeFrame(const boost::uint8_t* input, boost::uint32_t inputSize, boost::uint32_t& outputSize);
00067 //
00068 //      AVCodec* _audioCodec;
00069 //      AVCodecContext* _audioCodecCtx;
00070 //      AVCodecParserContext* _parser;
00071 //
00072 //      // Use for resampling audio
00073 //      AudioResamplerFfmpeg _resampler;
00074 //
00075 //    /// True if a parser is required to decode the format
00076 //    bool _needsParsing;
00077 //
00078 //    /// Parse input
00079 //    //
00080 //    /// @param input
00081 //    ///     Pointer to frame we want to start parsing at.
00082 //    ///
00083 //    /// @param inputSize
00084 //    ///     Number of bytes available in input
00085 //    ///
00086 //    /// @param outFrame
00087 //    ///     Output parameter, will be set to the start
00088 //    ///     of first frame found in input.
00089 //    ///
00090 //    /// @param outFrameSize
00091 //    ///     Output parameter, will be set to size in bytes
00092 //    ///     of the first frame found.
00093 //    ///
00094 //    /// @return number of input bytes parsed, or -1 on error
00095 //    ///
00096 //    int parseInput(const boost::uint8_t* input, boost::uint32_t inputSize,
00097 //            boost::uint8_t const ** outFrame, int* outFrameSize);
00098 };
00099         
00100 } // gnash.media.haiku namespace 
00101 } // gnash.media namespace 
00102 } // gnash namespace
00103 
00104 #endif // __AUDIODECODERHAIKU_H__