Coverage Report

Created: 2026-02-14 08:08

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/vlc/contrib/x86_64-unknown-linux-gnu/include/ebml/EbmlStream.h
Line
Count
Source
1
/****************************************************************************
2
** libebml : parse EBML files, see http://embl.sourceforge.net/
3
**
4
** <file/class description>
5
**
6
** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.
7
**
8
** This file is part of libebml.
9
**
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.
14
**
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.
19
**
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23
**
24
** See http://www.gnu.org/licenses/lgpl-2.1.html for LGPL licensing information.
25
**
26
** Contact license@matroska.org if any conditions of this licensing are
27
** not clear to you.
28
**
29
**********************************************************************/
30
31
/*!
32
  \file
33
  \version \$Id$
34
  \author Steve Lhomme     <robux4 @ users.sf.net>
35
*/
36
#ifndef LIBEBML_STREAM_H
37
#define LIBEBML_STREAM_H
38
39
#include "EbmlTypes.h"
40
#include "IOCallback.h"
41
#include "EbmlElement.h"
42
43
namespace libebml {
44
45
/*!
46
    \class EbmlStream
47
    \brief Handle an input/output stream of EBML elements
48
*/
49
class EBML_DLL_API EbmlStream {
50
  public:
51
    EbmlStream(IOCallback & DataStream);
52
    ~EbmlStream() = default;
53
54
    /*!
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
58
    */
59
    EbmlElement * FindNextID(const EbmlCallbacks & ClassInfos, uint64 MaxDataSize);
60
61
    EbmlElement * FindNextElement(const EbmlSemanticContext & Context, int & UpperLevel, uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel = 1);
62
63
417k
    inline IOCallback & I_O() {return Stream;}
64
0
        operator IOCallback &() {return Stream;}
65
66
#if defined(EBML_STRICT_API)
67
    private:
68
#else
69
    protected:
70
#endif
71
    IOCallback & Stream;
72
};
73
74
} // namespace libebml
75
76
#endif // LIBEBML_STREAM_H