diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h index c22b459..f3a7ec0 100644 --- a/ebml/EbmlElement.h +++ b/ebml/EbmlElement.h @@ -371,12 +371,12 @@ class EBML_DLL_API EbmlElement { int GetSizeLength() const {return SizeLength;} static EbmlElement * FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1); - static EbmlElement * FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize); + static EbmlElement * FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize); /*! \brief find the next element with the same ID */ - EbmlElement * FindNext(IOCallback & DataStream, const uint64 MaxDataSize); + EbmlElement * FindNext(IOCallback & DataStream, uint64 MaxDataSize); EbmlElement * SkipData(EbmlStream & DataStream, const EbmlSemanticContext & Context, EbmlElement * TestReadElt = NULL, bool AllowDummyElt = false); diff --git a/ebml/EbmlStream.h b/ebml/EbmlStream.h index 03e6091..7143007 100644 --- a/ebml/EbmlStream.h +++ b/ebml/EbmlStream.h @@ -1,76 +1,76 @@ -/**************************************************************************** -** libebml : parse EBML files, see http://embl.sourceforge.net/ -** -** -** -** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved. -** -** This file is part of libebml. -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU Lesser General Public -** License along with this library; if not, write to the Free Software -** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -** -** See http://www.matroska.org/license/lgpl/ for LGPL licensing information. -** -** Contact license@matroska.org if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -/*! - \file - \version \$Id: EbmlStream.h 639 2004-07-09 20:59:14Z mosu $ - \author Steve Lhomme -*/ -#ifndef LIBEBML_STREAM_H -#define LIBEBML_STREAM_H - -#include "EbmlTypes.h" -#include "IOCallback.h" -#include "EbmlElement.h" - -START_LIBEBML_NAMESPACE - -/*! - \class EbmlStream - \brief Handle an input/output stream of EBML elements -*/ -class EBML_DLL_API EbmlStream { - public: - EbmlStream(IOCallback & output); - ~EbmlStream(); - - /*! - \brief Find a possible next ID in the data stream - \param MaxDataSize The maximum possible of the data in the element (for sanity checks) - \note the user will have to delete that element later - */ - EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize); - - EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, const uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1); - - inline IOCallback & I_O() {return Stream;} - operator IOCallback &() {return Stream;} - -#if defined(EBML_STRICT_API) - private: -#else - protected: -#endif - IOCallback & Stream; -}; - -END_LIBEBML_NAMESPACE - -#endif // LIBEBML_STREAM_H +/**************************************************************************** +** libebml : parse EBML files, see http://embl.sourceforge.net/ +** +** +** +** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved. +** +** This file is part of libebml. +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Lesser General Public +** License as published by the Free Software Foundation; either +** version 2.1 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Lesser General Public License for more details. +** +** You should have received a copy of the GNU Lesser General Public +** License along with this library; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +** +** See http://www.matroska.org/license/lgpl/ for LGPL licensing information. +** +** Contact license@matroska.org if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +/*! + \file + \version \$Id$ + \author Steve Lhomme +*/ +#ifndef LIBEBML_STREAM_H +#define LIBEBML_STREAM_H + +#include "EbmlTypes.h" +#include "IOCallback.h" +#include "EbmlElement.h" + +START_LIBEBML_NAMESPACE + +/*! + \class EbmlStream + \brief Handle an input/output stream of EBML elements +*/ +class EBML_DLL_API EbmlStream { + public: + EbmlStream(IOCallback & output); + ~EbmlStream(); + + /*! + \brief Find a possible next ID in the data stream + \param MaxDataSize The maximum possible of the data in the element (for sanity checks) + \note the user will have to delete that element later + */ + EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize); + + EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1); + + inline IOCallback & I_O() {return Stream;} + operator IOCallback &() {return Stream;} + +#if defined(EBML_STRICT_API) + private: +#else + protected: +#endif + IOCallback & Stream; +}; + +END_LIBEBML_NAMESPACE + +#endif // LIBEBML_STREAM_H diff --git a/ebml/EbmlUInteger.h b/ebml/EbmlUInteger.h index 8076a6f..5422533 100644 --- a/ebml/EbmlUInteger.h +++ b/ebml/EbmlUInteger.h @@ -76,7 +76,7 @@ class EBML_DLL_API EbmlUInteger : public EbmlElement { void SetDefaultValue(uint64); - const uint64 DefaultVal() const; + uint64 DefaultVal() const; bool IsDefaultValue() const { return (DefaultISset() && Value == DefaultValue); diff --git a/src/EbmlElement.cpp b/src/EbmlElement.cpp index f1074be..5057322 100644 --- a/src/EbmlElement.cpp +++ b/src/EbmlElement.cpp @@ -257,7 +257,7 @@ EbmlElement::~EbmlElement() \todo this method is deprecated and should be called FindThisID \todo replace the new RawElement with the appropriate class (when known) */ -EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize) +EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbacks & ClassInfos, uint64 MaxDataSize) { binary PossibleId[4]; int PossibleID_Length = 0; diff --git a/src/EbmlStream.cpp b/src/EbmlStream.cpp index d32a79c..46e31eb 100644 --- a/src/EbmlStream.cpp +++ b/src/EbmlStream.cpp @@ -1,57 +1,57 @@ -/**************************************************************************** -** libebml : parse EBML files, see http://embl.sourceforge.net/ -** -** -** -** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved. -** -** This file is part of libebml. -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Lesser General Public -** License as published by the Free Software Foundation; either -** version 2.1 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Lesser General Public License for more details. -** -** You should have received a copy of the GNU Lesser General Public -** License along with this library; if not, write to the Free Software -** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -** -** See http://www.matroska.org/license/lgpl/ for LGPL licensing information. -** -** Contact license@matroska.org if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -/*! - \file - \version \$Id: EbmlStream.cpp 639 2004-07-09 20:59:14Z mosu $ - \author Steve Lhomme -*/ -#include "ebml/EbmlStream.h" - -START_LIBEBML_NAMESPACE - -EbmlStream::EbmlStream(IOCallback & DataStream) - :Stream(DataStream) -{} - -EbmlStream::~EbmlStream() -{} - -EbmlElement * EbmlStream::FindNextID(const EbmlCallbacks & ClassInfos, const uint64 MaxDataSize) -{ - return EbmlElement::FindNextID(Stream, ClassInfos, MaxDataSize); -} - -EbmlElement * EbmlStream::FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, const uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel) -{ - return EbmlElement::FindNextElement(Stream, Context, UpperLevel, MaxDataSize, AllowDummyElt, MaxLowerLevel); -} - -END_LIBEBML_NAMESPACE +/**************************************************************************** +** libebml : parse EBML files, see http://embl.sourceforge.net/ +** +** +** +** Copyright (C) 2002-2010 Steve Lhomme. All rights reserved. +** +** This file is part of libebml. +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Lesser General Public +** License as published by the Free Software Foundation; either +** version 2.1 of the License, or (at your option) any later version. +** +** This library is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** Lesser General Public License for more details. +** +** You should have received a copy of the GNU Lesser General Public +** License along with this library; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +** +** See http://www.matroska.org/license/lgpl/ for LGPL licensing information. +** +** Contact license@matroska.org if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +/*! + \file + \version \$Id$ + \author Steve Lhomme +*/ +#include "ebml/EbmlStream.h" + +START_LIBEBML_NAMESPACE + +EbmlStream::EbmlStream(IOCallback & DataStream) + :Stream(DataStream) +{} + +EbmlStream::~EbmlStream() +{} + +EbmlElement * EbmlStream::FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize) +{ + return EbmlElement::FindNextID(Stream, ClassInfos, MaxDataSize); +} + +EbmlElement * EbmlStream::FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel) +{ + return EbmlElement::FindNextElement(Stream, Context, UpperLevel, MaxDataSize, AllowDummyElt, MaxLowerLevel); +} + +END_LIBEBML_NAMESPACE diff --git a/src/EbmlUInteger.cpp b/src/EbmlUInteger.cpp index 5bc1415..68efb2a 100644 --- a/src/EbmlUInteger.cpp +++ b/src/EbmlUInteger.cpp @@ -30,7 +30,7 @@ /*! \file - \version \$Id: EbmlUInteger.cpp 1079 2005-03-03 13:18:14Z robux4 $ + \version \$Id$ \author Steve Lhomme \author Moritz Bunkus */ @@ -64,7 +64,7 @@ void EbmlUInteger::SetDefaultValue(uint64 aValue) SetDefaultIsSet(); } -const uint64 EbmlUInteger::DefaultVal() const +uint64 EbmlUInteger::DefaultVal() const { assert(DefaultISset()); return DefaultValue;