Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members
YUVinYUVoverlay.hpp
00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: YUVinYUVoverlay.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 _YUVinYUVoverlay_HPP 00045 #define _YUVinYUVoverlay_HPP 00046 #include "VideoAdaptor.hpp" 00047 #include "VideoESInfo.hpp" 00048 #include "io/YUVStreamIO.hpp" 00049 #include "io/DevNull.hpp" 00050 00051 00067 class YUVinYUVoverlay : public VideoAdaptor { 00068 public: 00069 00070 /* Constructor 00071 * @param watermarkStream defines th IO class for writing the output 00072 * @param loopWatermark if set to <code>true</code>, the watermarkStream is replayed forever 00073 * @param x and y depict the coordiates, where the watermarkStream should be overlayed 00074 * 00075 */ 00076 YUVinYUVoverlay(VideoESInfo* esi, YUVStreamIO *watermarkStream, int x, int y, bool loopWatermark = true); 00077 00078 virtual ~YUVinYUVoverlay(); 00079 00080 list < Frame * >adapt(Frame * frm); 00081 00082 Adaptor* clone() { return new YUVinYUVoverlay(es, (YUVStreamIO*)waterStream->clone(), posX, posY, loopWatermark); }; 00083 00084 void initialize(); 00085 00086 list < Frame * >close() { 00087 list < Frame * >tmp; 00088 return tmp; 00089 }; 00090 00095 void setESInfo(ESInfo * esi); 00096 00097 ESInfo * getESInfo(); 00098 00103 u32 getTranscodingCosts() const { 00104 return es->getAvgBandwidth()/8; 00105 } 00106 00107 private: 00108 protected: 00109 VideoESInfo *es; 00110 YUVStreamIO *waterStream; 00111 int posX, posY; 00112 bool loopWatermark; 00113 AU lastAU; 00114 u8* lastPayload; 00115 UncompressedVideoFrame *waterFrame; 00116 int numFrames; 00117 }; 00118 #endif 00119