tagparser/flac/flactooggmappingheader.h

73 lines
1.6 KiB
C
Raw Normal View History

#ifndef TAG_PARSER_FLACIDENTIFICATIONHEADER_H
#define TAG_PARSER_FLACIDENTIFICATIONHEADER_H
2016-05-14 00:24:01 +02:00
#include "./flacmetadata.h"
namespace TagParser {
2016-05-14 00:24:01 +02:00
class OggIterator;
2018-03-07 01:17:50 +01:00
class TAG_PARSER_EXPORT FlacToOggMappingHeader {
2016-05-14 00:24:01 +02:00
public:
2018-07-10 14:11:11 +02:00
constexpr FlacToOggMappingHeader();
2016-05-14 00:24:01 +02:00
void parseHeader(OggIterator &iterator);
2018-07-10 14:11:11 +02:00
constexpr byte majorVersion() const;
constexpr byte minorVersion() const;
constexpr uint16 headerCount() const;
constexpr const FlacMetaDataBlockStreamInfo &streamInfo() const;
2016-05-14 00:24:01 +02:00
private:
byte m_majorVersion;
byte m_minorVersion;
uint16 m_headerCount;
FlacMetaDataBlockStreamInfo m_streamInfo;
};
/*!
* \brief Constructs a new FLAC identification header.
*/
2018-07-10 14:11:11 +02:00
constexpr FlacToOggMappingHeader::FlacToOggMappingHeader()
2018-03-07 01:17:50 +01:00
: m_majorVersion(0)
, m_minorVersion(0)
, m_headerCount(0)
{
}
2016-05-14 00:24:01 +02:00
/*!
* \brief Returns the major version for the mapping (which should be 1 currently).
*/
2018-07-10 14:11:11 +02:00
constexpr byte FlacToOggMappingHeader::majorVersion() const
2016-05-14 00:24:01 +02:00
{
return m_majorVersion;
}
/*!
* \brief Returns the version for the mapping (which should be 0 currently).
*/
2018-07-10 14:11:11 +02:00
constexpr byte FlacToOggMappingHeader::minorVersion() const
2016-05-14 00:24:01 +02:00
{
return m_minorVersion;
}
/*!
* \brief Returns the number of header (non-audio) packets, not including this one.
*/
2018-07-10 14:11:11 +02:00
constexpr uint16 FlacToOggMappingHeader::headerCount() const
2016-05-14 00:24:01 +02:00
{
return m_headerCount;
}
/*!
* \brief Returns the stream info.
*/
2018-07-10 14:11:11 +02:00
constexpr const FlacMetaDataBlockStreamInfo &FlacToOggMappingHeader::streamInfo() const
2016-05-14 00:24:01 +02:00
{
return m_streamInfo;
}
2018-03-07 01:17:50 +01:00
} // namespace TagParser
2016-05-14 00:24:01 +02:00
#endif // TAG_PARSER_FLACIDENTIFICATIONHEADER_H