1 /****************************************************************************
2 ** libebml : parse EBML files, see http://embl.sourceforge.net/
4 ** <file/class description>
6 ** Copyright (C) 2002-2004 Steve Lhomme. All rights reserved.
8 ** This file is part of libebml.
10 ** This library is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU Lesser General Public
12 ** License as published by the Free Software Foundation; either
13 ** version 2.1 of the License, or (at your option) any later version.
15 ** This library is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** Lesser General Public License for more details.
20 ** You should have received a copy of the GNU Lesser General Public
21 ** License along with this library; if not, write to the Free Software
22 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 ** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
26 ** Contact license@matroska.org if any conditions of this licensing are
29 **********************************************************************/
33 \version \$Id: EbmlStream.h 639 2004-07-09 20:59:14Z mosu $
34 \author Steve Lhomme <robux4 @ users.sf.net>
36 #ifndef LIBEBML_STREAM_H
37 #define LIBEBML_STREAM_H
39 #include "EbmlTypes.h"
40 #include "IOCallback.h"
41 #include "EbmlElement.h"
43 START_LIBEBML_NAMESPACE
47 \brief Handle an input/output stream of EBML elements
49 class EBML_DLL_API EbmlStream
{
51 EbmlStream(IOCallback
& output
);
55 \brief Find a possible next ID in the data stream
56 \param MaxDataSize The maximum possible of the data in the element (for sanity checks)
57 \note the user will have to delete that element later
59 EbmlElement
* FindNextID(const EbmlCallbacks
& ClassInfos
, const uint64 MaxDataSize
);
61 EbmlElement
* FindNextElement(const EbmlSemanticContext
& Context
, int & UpperLevel
, const uint64 MaxDataSize
, bool AllowDummyElt
, unsigned int MaxLowerLevel
= 1);
63 inline IOCallback
& I_O() {return Stream
;}
71 #endif // LIBEBML_STREAM_H