AudioIO.hpp

00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: AudioIO.hpp * 00006 * * 00007 * * 00008 * * 00009 * ITEC institute of the University of Klagenfurt (Austria) * 00010 * http://www.itec.uni-klu.ac.at * 00011 * * 00012 * * 00013 * For more information visit the ViTooKi homepage: * 00014 * http://ViTooKi.sourceforge.net * 00015 * vitooki-user@lists.sourceforge.net * 00016 * vitooki-devel@lists.sourceforge.net * 00017 * * 00018 * This file is part of ViTooKi, a free video toolkit. * 00019 * ViTooKi is free software; you can redistribute it and/or * 00020 * modify it under the terms of the GNU General Public License * 00021 * as published by the Free Software Foundation; either version 2 * 00022 * of the License, or (at your option) any later version. * 00023 * * 00024 * This program is distributed in the hope that it will be useful, * 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00027 * GNU General Public License for more details. * 00028 * * 00029 * You should have received a copy of the GNU General Public License * 00030 * along with this program; if not, write to the Free Software * 00031 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * 00032 * MA 02111-1307, USA. * 00033 * * 00034 ***********************************************************************/ 00035 00036 /*********************************************************************** 00037 * * 00038 * REVISION HISTORY: * 00039 * * 00040 * * 00041 * * 00042 ***********************************************************************/ 00043 00044 // AudioIO.hpp: Class for Audio output. 00045 // 00047 00048 #ifdef ISOMP4 00049 #include "ISOMovies.h" //XXX for data types definition 00050 #endif 00051 00052 #ifndef _AUDIO_HPP_ 00053 #define _AUDIO_HPP_ 00054 00055 #if _MSC_VER > 1000 00056 #pragma once 00057 #endif // _MSC_VER > 1000 00058 00059 #include "IO.hpp" 00060 #include "adaptors/ESSynchronizer.hpp" 00061 00062 #include "AudioESInfo.hpp" 00063 #include "Frame.hpp" 00064 #include "adaptors/GlobalTimer.hpp" 00065 #include "Rtp.hpp" 00066 00067 class Frame; 00068 class AudioESInfo; 00069 00081 class AudioIO : public IO { 00082 public: 00083 00084 AudioIO(AudioESInfo *es, ESSynchronizer *ess = NULL); 00085 00086 virtual ~AudioIO(); 00087 00088 void setESInfo(ESInfo * es); 00089 00090 ESInfo* getESInfo() { return (ESInfo*)es;}; 00091 00092 void setTicksPerSecond(u32 uiTicksPerSeconds); 00093 00096 bool destroy(); 00097 00099 int getBufferFillLevel() const; 00100 00102 const char *getURL() const; 00103 00111 bool setToFrameNumber(u32 frameNumber) { 00112 return false; 00113 }; 00114 00115 void setDimension(); 00116 00117 ESSynchronizer *getESSync() { return essync; }; 00118 00119 long getLastPTS() { return lastPTSseen; }; 00120 00121 void setLastPTS(long pts) { lastPTSseen = pts; }; 00122 00123 00124 protected: 00125 ESSynchronizer *essync; 00126 const AudioESInfo *es; 00127 u32 muiTicksPerSecond; 00129 long lastPTSseen; 00130 bool firstFrame; 00131 long num_frames; 00132 }; 00133 #endif