1#ifndef TAG_PARSER_FLACMETADATAHEADER_H
2#define TAG_PARSER_FLACMETADATAHEADER_H
20 return lhs ==
static_cast<std::uint8_t
>(type);
25 return lhs !=
static_cast<std::uint8_t
>(type);
30 constexpr FlacMetaDataBlockHeader();
32 void parseHeader(std::string_view buffer);
33 void makeHeader(std::ostream &outputStream);
35 constexpr std::uint8_t isLast()
const;
36 void setLast(std::uint8_t last);
37 constexpr std::uint8_t type()
const;
38 void setType(FlacMetaDataBlockType type);
39 constexpr std::uint32_t dataSize()
const;
40 void setDataSize(std::uint32_t dataSize);
45 std::uint32_t m_dataSize;
89 m_type =
static_cast<std::uint8_t
>(
type);
113 void parse(std::string_view buffer);
115 constexpr std::uint16_t minBlockSize()
const;
116 constexpr std::uint16_t maxBlockSize()
const;
117 constexpr std::uint32_t minFrameSize()
const;
118 constexpr std::uint32_t maxFrameSize()
const;
119 constexpr std::uint32_t samplingFrequency()
const;
120 constexpr std::uint8_t channelCount()
const;
121 constexpr std::uint8_t bitsPerSample()
const;
122 constexpr std::uint64_t totalSampleCount()
const;
123 constexpr const char *md5Sum()
const;
126 std::uint16_t m_minBlockSize;
127 std::uint16_t m_maxBlockSize;
128 std::uint32_t m_minFrameSize;
129 std::uint32_t m_maxFrameSize;
130 std::uint32_t m_samplingFrequency;
131 std::uint8_t m_channelCount;
132 std::uint8_t m_bitsPerSample;
133 std::uint64_t m_totalSampleCount;
145 , m_samplingFrequency(0)
148 , m_totalSampleCount(0)
158 return m_minBlockSize;
168 return m_maxBlockSize;
178 return m_minFrameSize;
188 return m_maxFrameSize;
199 return m_samplingFrequency;
209 return m_channelCount;
221 return m_bitsPerSample;
234 return m_totalSampleCount;
252 void parse(std::istream &inputStream, std::uint32_t maxSize);
253 std::uint32_t requiredSize()
const;
254 void make(std::ostream &outputStream);
256 std::uint32_t pictureType()
const;
257 void setPictureType(std::uint32_t pictureType);
261 std::uint32_t m_pictureType;
283 return m_pictureType;
The TagValue class wraps values of different types.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
FlacMetaDataBlockType
The FlacMetaDataBlockType enum specifies the type of FlacMetaDataBlockHeader.
constexpr bool operator!=(std::uint8_t lhs, FlacMetaDataBlockType type)
constexpr bool operator==(std::uint8_t lhs, FlacMetaDataBlockType type)