Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members
DataDump.hpp
00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: DataDump.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 #ifndef _DataDump_HPP 00045 #define _DataDump_HPP 00046 #include "Adaptor.hpp" 00047 #include "ESInfo.hpp" 00048 #include "IO.hpp" 00049 #include "io/DevNull.hpp" 00050 00051 00064 class DataDump : public Adaptor { 00065 public: 00066 00067 /* Constructor 00068 * @param outStream defines th IO class for writing the output 00069 * @param autoFix if set to <code>false</code>, automatic "missing frame" insertion feature turned off 00070 * 00071 */ 00072 DataDump(ESInfo* esi, IO *outStream, bool autoFix = true); 00073 00074 virtual ~DataDump(); 00075 00076 list < Frame * >adapt(Frame * frm); 00077 00078 Adaptor* clone() { return new DataDump(es, new DevNull(), autoFix); }; 00079 00080 void initialize(); 00081 00082 list < Frame * >close() { 00083 list < Frame * >tmp; 00084 return tmp; 00085 }; 00086 00091 void setESInfo(ESInfo * esi); 00092 00093 ESInfo * getESInfo(); 00094 00099 u32 getTranscodingCosts() const { 00100 return es->getAvgBandwidth()/8; 00101 } 00102 00103 private: 00104 protected: 00105 ESInfo *es; 00106 IO *out; 00107 bool autoFix; 00108 AU lastAU; 00109 u8* lastPayload; 00110 Frame *dummyFrame; 00111 int numFrames; 00112 }; 00113 #endif 00114