00001 /**************************************************************************** 00002 ** libebml : parse EBML files, see http://embl.sourceforge.net/ 00003 ** 00004 ** <file/class description> 00005 ** 00006 ** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved. 00007 ** 00008 ** This file is part of libebml. 00009 ** 00010 ** This library is free software; you can redistribute it and/or 00011 ** modify it under the terms of the GNU Lesser General Public 00012 ** License as published by the Free Software Foundation; either 00013 ** version 2.1 of the License, or (at your option) any later version. 00014 ** 00015 ** This library is distributed in the hope that it will be useful, 00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 ** Lesser General Public License for more details. 00019 ** 00020 ** You should have received a copy of the GNU Lesser General Public 00021 ** License along with this library; if not, write to the Free Software 00022 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 ** 00024 ** See http://www.matroska.org/license/lgpl/ for LGPL licensing information. 00025 ** 00026 ** Contact license@matroska.org if any conditions of this licensing are 00027 ** not clear to you. 00028 ** 00029 **********************************************************************/ 00030 00036 #ifndef LIBEBML_STREAM_H 00037 #define LIBEBML_STREAM_H 00038 00039 #include "EbmlTypes.h" 00040 #include "IOCallback.h" 00041 #include "EbmlElement.h" 00042 00043 START_LIBEBML_NAMESPACE 00044 00049 class EBML_DLL_API EbmlStream { 00050 public: 00051 EbmlStream(IOCallback & output); 00052 ~EbmlStream(); 00053 00059 EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize); 00060 00061 EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1); 00062 00063 inline IOCallback & I_O() {return Stream;} 00064 operator IOCallback &() {return Stream;} 00065 00066 #if defined(EBML_STRICT_API) 00067 private: 00068 #else 00069 protected: 00070 #endif 00071 IOCallback & Stream; 00072 }; 00073 00074 END_LIBEBML_NAMESPACE 00075 00076 #endif // LIBEBML_STREAM_H