Tag Parser: vorbis/vorbisidentificationheader.h Source File

Tag Parser 12.5.2 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
12 class 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
41 constexpr VorbisIdentificationHeader::VorbisIdentificationHeader()
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 std::uint32_t VorbisIdentificationHeader::version() const
54{
55 return m_version;
56}
57
58 constexpr std::uint8_t VorbisIdentificationHeader::channels() const
59{
60 return m_channels;
61}
62
63 constexpr std::uint32_t VorbisIdentificationHeader::sampleRate() const
64{
65 return m_sampleRate;
66}
67
68 constexpr std::uint32_t VorbisIdentificationHeader::maxBitrate() const
69{
70 return m_maxBitrate;
71}
72
73 constexpr std::uint32_t VorbisIdentificationHeader::nominalBitrate() const
74{
75 return m_nominalBitrate;
76}
77
78 constexpr std::uint32_t VorbisIdentificationHeader::minBitrate() const
79{
80 return m_minBitrate;
81}
82
83 constexpr std::uint8_t VorbisIdentificationHeader::blockSize() const
84{
85 return m_blockSize;
86}
87
88 constexpr std::uint8_t VorbisIdentificationHeader::framingFlag() const
89{
90 return m_framingFlag;
91}
92
93} // namespace TagParser
94
95#endif // TAG_PARSER_VORBISIDENTIFICATIONHEADER_H
TagParser::OggIterator
The OggIterator class helps iterating through all segments of an Ogg bitstream.
Definition oggiterator.h:11
TagParser::VorbisIdentificationHeader::framingFlag
constexpr std::uint8_t framingFlag() const
Definition vorbisidentificationheader.h:88
TagParser::VorbisIdentificationHeader::VorbisIdentificationHeader
constexpr VorbisIdentificationHeader()
Constructs a new Vorbis identification header.
Definition vorbisidentificationheader.h:41
TagParser::VorbisIdentificationHeader::sampleRate
constexpr std::uint32_t sampleRate() const
Definition vorbisidentificationheader.h:63
TagParser::VorbisIdentificationHeader::blockSize
constexpr std::uint8_t blockSize() const
Definition vorbisidentificationheader.h:83
TagParser::VorbisIdentificationHeader::minBitrate
constexpr std::uint32_t minBitrate() const
Definition vorbisidentificationheader.h:78
TagParser::VorbisIdentificationHeader::channels
constexpr std::uint8_t channels() const
Definition vorbisidentificationheader.h:58
TagParser::VorbisIdentificationHeader::parseHeader
void parseHeader(OggIterator &iterator)
Parses the Vorbis identification header which is read using the specified iterator.
Definition vorbisidentificationheader.cpp:24
TagParser::VorbisIdentificationHeader::maxBitrate
constexpr std::uint32_t maxBitrate() const
Definition vorbisidentificationheader.h:68
TagParser::VorbisIdentificationHeader::version
constexpr std::uint32_t version() const
Definition vorbisidentificationheader.h:53
TagParser::VorbisIdentificationHeader::nominalBitrate
constexpr std::uint32_t nominalBitrate() const
Definition vorbisidentificationheader.h:73
global.h
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10