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/KaxTracks.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: KaxTracks.h,v 1.7 2004/04/14 23:26:17 robux4 Exp $
33
  \author Steve Lhomme     <robux4 @ users.sf.net>
34
*/
35
#ifndef LIBMATROSKA_TRACKS_H
36
#define LIBMATROSKA_TRACKS_H
37
38
#include "matroska/KaxTypes.h"
39
#include "ebml/EbmlMaster.h"
40
#include "ebml/EbmlUInteger.h"
41
#include "matroska/KaxDefines.h"
42
#include "matroska/KaxSemantic.h"
43
44
using namespace libebml;
45
46
namespace libmatroska {
47
48
DECLARE_MKX_MASTER(KaxTrackEntry)
49
  public:
50
0
    EbmlUInteger & TrackNumber() const { return *(static_cast<EbmlUInteger *>(FindElt(EBML_INFO(KaxTrackNumber)))); }
51
52
    void EnableLacing(bool bEnable = true);
53
54
    /*!
55
      \note lacing set by default
56
    */
57
0
    inline bool LacingEnabled() const {
58
0
      auto myLacing = static_cast<KaxTrackFlagLacing *>(FindFirstElt(EBML_INFO(KaxTrackFlagLacing)));
59
0
      return((myLacing == nullptr) || (static_cast<uint8>(*myLacing) != 0));
60
0
    }
61
62
0
    void SetGlobalTimecodeScale(uint64 aGlobalTimecodeScale) {
63
0
      mGlobalTimecodeScale = aGlobalTimecodeScale;
64
0
      bGlobalTimecodeScaleIsSet = true;
65
0
    }
66
0
    uint64 GlobalTimecodeScale() const {
67
0
      assert(bGlobalTimecodeScaleIsSet);
68
0
      return mGlobalTimecodeScale;
69
0
    }
70
71
  protected:
72
    bool   bGlobalTimecodeScaleIsSet{false};
73
    uint64 mGlobalTimecodeScale;
74
};
75
76
} // namespace libmatroska
77
78
#endif // LIBMATROSKA_TRACKS_H