Tag Parser  8.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
vorbisidentificationheader.h
Go to the documentation of this file.
1 #ifndef TAG_PARSER_VORBISIDENTIFICATIONHEADER_H
2 #define TAG_PARSER_VORBISIDENTIFICATIONHEADER_H
3 
4 #include "../global.h"
5 
6 #include <c++utilities/conversion/types.h>
7 
8 namespace TagParser {
9 
10 class OggIterator;
11 
13 public:
14  constexpr VorbisIdentificationHeader();
15 
16  void parseHeader(OggIterator &iterator);
17 
18  constexpr uint32 version() const;
19  constexpr byte channels() const;
20  constexpr uint32 sampleRate() const;
21  constexpr uint32 maxBitrate() const;
22  constexpr uint32 nominalBitrate() const;
23  constexpr uint32 minBitrate() const;
24  constexpr byte blockSize() const;
25  constexpr byte framingFlag() const;
26 
27 private:
28  uint32 m_version;
29  byte m_channels;
30  uint32 m_sampleRate;
31  uint32 m_maxBitrate;
32  uint32 m_nominalBitrate;
33  uint32 m_minBitrate;
34  byte m_blockSize;
35  byte m_framingFlag;
36 };
37 
42  : m_version(0)
43  , m_channels(0)
44  , m_sampleRate(0)
45  , m_maxBitrate(0)
46  , m_nominalBitrate(0)
47  , m_minBitrate(0)
48  , m_blockSize(0)
49  , m_framingFlag(0)
50 {
51 }
52 
53 constexpr uint32 VorbisIdentificationHeader::version() const
54 {
55  return m_version;
56 }
57 
59 {
60  return m_channels;
61 }
62 
64 {
65  return m_sampleRate;
66 }
67 
69 {
70  return m_maxBitrate;
71 }
72 
74 {
75  return m_nominalBitrate;
76 }
77 
79 {
80  return m_minBitrate;
81 }
82 
84 {
85  return m_blockSize;
86 }
87 
89 {
90  return m_framingFlag;
91 }
92 
93 } // namespace TagParser
94 
95 #endif // TAG_PARSER_VORBISIDENTIFICATIONHEADER_H
The VorbisIdentificationHeader class is a Vorbis identification header parser.
constexpr TAG_PARSER_EXPORT const char * version()
The OggIterator class helps iterating through all segments of an OGG bitstream.
Definition: oggiterator.h:11
constexpr VorbisIdentificationHeader()
Constructs a new Vorbis identification header.
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:9
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.