Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
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 <cstdint>
7
8namespace TagParser {
9
10class OggIterator;
11
12class TAG_PARSER_EXPORT VorbisIdentificationHeader {
13public:
14 constexpr VorbisIdentificationHeader();
15
16 void parseHeader(OggIterator &iterator);
17
18 constexpr std::uint32_t version() const;
19 constexpr std::uint8_t channels() const;
20 constexpr std::uint32_t sampleRate() const;
21 constexpr std::uint32_t maxBitrate() const;
22 constexpr std::uint32_t nominalBitrate() const;
23 constexpr std::uint32_t minBitrate() const;
24 constexpr std::uint8_t blockSize() const;
25 constexpr std::uint8_t framingFlag() const;
26
27private:
28 std::uint32_t m_version;
29 std::uint8_t m_channels;
30 std::uint32_t m_sampleRate;
31 std::uint32_t m_maxBitrate;
32 std::uint32_t m_nominalBitrate;
33 std::uint32_t m_minBitrate;
34 std::uint8_t m_blockSize;
35 std::uint8_t 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
53constexpr std::uint32_t VorbisIdentificationHeader::version() const
54{
55 return m_version;
56}
57
58constexpr std::uint8_t VorbisIdentificationHeader::channels() const
59{
60 return m_channels;
61}
62
63constexpr std::uint32_t VorbisIdentificationHeader::sampleRate() const
64{
65 return m_sampleRate;
66}
67
68constexpr std::uint32_t VorbisIdentificationHeader::maxBitrate() const
69{
70 return m_maxBitrate;
71}
72
73constexpr std::uint32_t VorbisIdentificationHeader::nominalBitrate() const
74{
75 return m_nominalBitrate;
76}
77
78constexpr std::uint32_t VorbisIdentificationHeader::minBitrate() const
79{
80 return m_minBitrate;
81}
82
83constexpr std::uint8_t VorbisIdentificationHeader::blockSize() const
84{
85 return m_blockSize;
86}
87
88constexpr std::uint8_t VorbisIdentificationHeader::framingFlag() const
89{
90 return m_framingFlag;
91}
92
93} // namespace TagParser
94
95#endif // TAG_PARSER_VORBISIDENTIFICATIONHEADER_H
constexpr VorbisIdentificationHeader()
Constructs a new Vorbis identification header.
constexpr std::uint32_t nominalBitrate() const
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
constexpr TAG_PARSER_EXPORT std::string_view version()
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10