Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members
BifsESInfo.cpp
00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: BifsESInfo.cpp * 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 #include "BifsESInfo.hpp" 00036 #include "ReferenceCounter.hpp" 00037 #include "BitField.hpp" 00044 BifsESInfo::BifsESInfo(u32 streamId, u32 streamtype, ContainerInfo * vob, u32 timeIncrement, 00045 u8 * encodeddecconf, u32 objtype, u32 bufsize, 00046 u32 avgBW, u32 maxBW, u32 timeScale, 00047 u64 duration, u32 size, bool complete, 00048 CodecID codec_id, float quality):ESInfo(streamId, 00049 streamtype,vob,timeIncrement,encodeddecconf, 00050 objtype,bufsize,avgBW,maxBW, 00051 timeScale,duration,size,complete,codec_id,quality) 00052 { 00053 generateDescriptionText(); 00054 }; 00055 00056 BifsESInfo::~BifsESInfo() 00057 { 00058 00059 }; 00060 00061 u32 BifsESInfo::getHandlerType() const 00062 { 00063 return MP4SceneDescriptionHandlerType; 00064 }; 00065 00066 bool BifsESInfo::isVisualStream() const 00067 { 00068 return false; 00069 }; 00070 bool BifsESInfo::isAudioStream() const 00071 { 00072 return false; 00073 }; 00074 bool BifsESInfo::isODStream() const 00075 { 00076 return false; 00077 }; 00078 bool BifsESInfo::isSceneDescriptionStream() const 00079 { 00080 return true; 00081 }; 00082 00084 ESInfo *BifsESInfo::clone(ContainerInfo * mp4) 00085 { 00086 dprintf_full("ESInfo::clone id %llu\n",streamId); 00087 u8 *decConf = new u8[strlen((char *) encodedDecoderConfig) + 1]; 00088 strcpy((char *) decConf, (const char *) encodedDecoderConfig); 00089 ESInfo *es = new BifsESInfo(streamId, streamType, mp4, vopTimeIncrement, decConf, objectType, 00090 bufferSize, avgBandwidth, maxBandwidth, 00091 mediaTimeScale, duration, mediaSize, 00092 complete, codec_id, this->quality); 00093 es->setInput(input); 00094 if(!existingClones) { 00095 existingClones=new ReferenceCounter(); 00096 existingClones->increase(); 00097 } 00098 existingClones->increase(); 00099 es->setCloneCounter(existingClones); 00100 BitField* fs=getFrameStatistic(); 00101 if(fs) { 00102 es->setFrameStatistic(fs->createWithNewSize(fs->getSize(),false)); 00103 } 00104 return es; 00105 }; 00106 00107 void BifsESInfo::generateDescriptionText() 00108 { 00109 snprintf(description,MAX_STR_LEN,"Unknown Streamtype"); 00110 } 00111