VideoESInfo.hpp

00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: VideoESInfo.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 #ifndef PS_VIDEOELEMENTARYSTREAMINFO_HPP 00037 #define PS_VIDEOELEMENTARYSTREAMINFO_HPP 00038 #include "ESInfo.hpp" 00039 00040 class VideoESInfo: public ESInfo 00041 { 00042 public: 00051 VideoESInfo(u32 streamId, u32 streamtype, ContainerInfo * vob, u32 timeIncrement, 00052 u8 * encodeddecconf, u32 objtype, u32 bufsize, 00053 u32 avgBW, u32 maxBW, u32 timeScale, 00054 u64 duration, u32 size, 00055 u32 w, u32 h, bool colorVideo=true, 00056 bool complete=true, 00057 CodecID codec_id = CODEC_ID_MPEG4, float quality = 1.0, 00058 float aspect_ratio = 352.0/288.0, bool staticFramePattern=true, u32 GOP_size = 50, 00059 u32 num_B_frames = 0, float avgBFrameSize=-1.0); 00060 00061 virtual ~VideoESInfo(){}; 00062 00063 u32 getHandlerType() const; 00064 00065 u32 getWidth() const; 00066 00067 u32 getHeight() const; 00068 00069 void setWidth(u32 uiWidth); 00070 00071 void setHeight(u32 uiHeight); 00072 00074 void setFPS(float fps); 00075 00077 float getFPS() const; 00078 00079 bool getHasColor() const; 00080 00081 void setHasColor(bool col); 00082 00083 bool isVisualStream() const; 00084 00085 bool isAudioStream() const; 00086 00087 bool isODStream() const; 00088 00089 bool isSceneDescriptionStream() const; 00090 00091 void setEncodedDecoderConfig(u8 * enc); 00092 00093 float getAspectRatio() const; 00094 00095 void setAspectRatio(float AspectRatio); 00096 00101 u32 getGOP_size() const; 00102 00103 void setGOP_size(u32 gop_size); 00104 00108 u32 getNum_B_frames() const; 00109 00110 void setNum_B_frames(u32 num_B_Frames); 00111 00116 bool hasStaticFramePattern() const; 00117 00118 void setStaticFramePattern(bool pattern); 00119 00121 ESInfo *clone(ContainerInfo * mp4); 00122 00123 void setAvgBFrameSize(float avg); 00126 float getAvgBFrameSize() const; 00127 void generateDescriptionText(); 00128 00129 protected: 00130 u32 width; 00131 u32 height; 00132 float aspect_ratio; 00133 bool hasColor; 00134 u32 GOP_size; 00135 u32 num_B_frames; 00136 bool staticFramePattern; 00138 float avgBFrameSize; 00139 }; 00140 00141 #endif