Coverage Report

Created: 2025-10-10 06:26

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/vlc/contrib/x86_64-unknown-linux-gnu/include/matroska/KaxCues.h
Line
Count
Source
1
/****************************************************************************
2
** libmatroska : parse Matroska files, see http://www.matroska.org/
3
**
4
** <file/class description>
5
**
6
** Copyright (C) 2002-2010 Steve Lhomme.  All rights reserved.
7
**
8
** This file is part of libmatroska.
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
** Contact license@matroska.org if any conditions of this licensing are
26
** not clear to you.
27
**
28
**********************************************************************/
29
30
/*!
31
  \file
32
  \version \$Id: KaxCues.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
33
  \author Steve Lhomme     <robux4 @ users.sf.net>
34
*/
35
#ifndef LIBMATROSKA_CUES_H
36
#define LIBMATROSKA_CUES_H
37
38
#include <vector>
39
40
#include "matroska/KaxTypes.h"
41
#include "ebml/EbmlMaster.h"
42
#include "matroska/KaxBlock.h"
43
44
using namespace libebml;
45
46
namespace libmatroska {
47
48
class KaxCuePoint;
49
50
DECLARE_MKX_MASTER(KaxCues)
51
  public:
52
    ~KaxCues() override;
53
54
    //bool AddBlockGroup(const KaxBlockGroup & BlockReference); // deprecated
55
    bool AddBlockBlob(const KaxBlockBlob & BlockReference);
56
57
    /*!
58
      \brief Indicate that the position for this Block is set
59
    */
60
    void PositionSet(const KaxBlockGroup & BlockReference);
61
    void PositionSet(const KaxBlockBlob & BlockReference);
62
63
    /*!
64
      \brief override to sort by timecode/track
65
    */
66
0
    filepos_t Render(IOCallback & output, bool bSaveDefault = false) {
67
0
      Sort();
68
0
      return EbmlMaster::Render(output, bSaveDefault);
69
0
    }
70
71
    uint64 GetTimecodePosition(uint64 aTimecode) const;
72
    const KaxCuePoint * GetTimecodePoint(uint64 aTimecode) const;
73
74
0
    void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
75
0
      mGlobalTimecodeScale = aGlobalTimecodeScale;
76
0
      bGlobalTimecodeScaleIsSet = true;
77
0
    }
78
0
    uint64 GlobalTimecodeScale() const {
79
0
      assert(bGlobalTimecodeScaleIsSet);
80
0
      return mGlobalTimecodeScale;
81
0
    }
82
83
  protected:
84
    std::vector<const KaxBlockBlob *> myTempReferences;
85
    bool   bGlobalTimecodeScaleIsSet;
86
    uint64 mGlobalTimecodeScale;
87
};
88
89
} // namespace libmatroska
90
91
#endif // LIBMATROSKA_CUES_H