00001 00027 #ifndef ASYNC_AUDIO_DECODER_INCLUDED 00028 #define ASYNC_AUDIO_DECODER_INCLUDED 00029 00030 00031 /**************************************************************************** 00032 * 00033 * System Includes 00034 * 00035 ****************************************************************************/ 00036 00037 #include <string> 00038 #include <sigc++/sigc++.h> 00039 00040 00041 /**************************************************************************** 00042 * 00043 * Project Includes 00044 * 00045 ****************************************************************************/ 00046 00047 #include <AsyncAudioSource.h> 00048 00049 00050 /**************************************************************************** 00051 * 00052 * Local Includes 00053 * 00054 ****************************************************************************/ 00055 00056 00057 00058 /**************************************************************************** 00059 * 00060 * Forward declarations 00061 * 00062 ****************************************************************************/ 00063 00064 00065 00066 /**************************************************************************** 00067 * 00068 * Namespace 00069 * 00070 ****************************************************************************/ 00071 00072 namespace Async 00073 { 00074 00075 00076 /**************************************************************************** 00077 * 00078 * Forward declarations of classes inside of the declared namespace 00079 * 00080 ****************************************************************************/ 00081 00082 00083 00084 /**************************************************************************** 00085 * 00086 * Defines & typedefs 00087 * 00088 ****************************************************************************/ 00089 00090 00091 00092 /**************************************************************************** 00093 * 00094 * Exported Global Variables 00095 * 00096 ****************************************************************************/ 00097 00098 00099 00100 /**************************************************************************** 00101 * 00102 * Class definitions 00103 * 00104 ****************************************************************************/ 00105 00113 class AudioDecoder : public AudioSource, public SigC::Object 00114 { 00115 public: 00116 static AudioDecoder *create(const std::string &name); 00117 00121 AudioDecoder(void) {} 00122 00126 virtual ~AudioDecoder(void) {} 00127 00132 virtual const char *name(void) const = 0; 00133 00139 virtual void setOption(const std::string &name, const std::string &value) {} 00140 00144 virtual void printCodecParams(void) const {} 00145 00151 virtual void writeEncodedSamples(void *buf, int size) = 0; 00152 00156 virtual void flushEncodedSamples(void) { sinkFlushSamples(); } 00157 00165 virtual void resumeOutput(void) {} 00166 00170 SigC::Signal0<void> allEncodedSamplesFlushed; 00171 00172 00173 protected: 00181 virtual void allSamplesFlushed(void) { allEncodedSamplesFlushed(); } 00182 00183 00184 private: 00185 AudioDecoder(const AudioDecoder&); 00186 AudioDecoder& operator=(const AudioDecoder&); 00187 00188 }; /* class AudioDecoder */ 00189 00190 00191 } /* namespace */ 00192 00193 #endif /* ASYNC_AUDIO_DECODER_INCLUDED */ 00194 00195 00196 00197 /* 00198 * This file has not been truncated 00199 */ 00200