73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
#ifndef TAG_PARSER_FLACIDENTIFICATIONHEADER_H
|
|
#define TAG_PARSER_FLACIDENTIFICATIONHEADER_H
|
|
|
|
#include "./flacmetadata.h"
|
|
|
|
namespace TagParser {
|
|
|
|
class OggIterator;
|
|
|
|
class TAG_PARSER_EXPORT FlacToOggMappingHeader {
|
|
public:
|
|
constexpr FlacToOggMappingHeader();
|
|
|
|
void parseHeader(OggIterator &iterator);
|
|
|
|
constexpr byte majorVersion() const;
|
|
constexpr byte minorVersion() const;
|
|
constexpr uint16 headerCount() const;
|
|
constexpr const FlacMetaDataBlockStreamInfo &streamInfo() const;
|
|
|
|
private:
|
|
byte m_majorVersion;
|
|
byte m_minorVersion;
|
|
uint16 m_headerCount;
|
|
FlacMetaDataBlockStreamInfo m_streamInfo;
|
|
};
|
|
|
|
/*!
|
|
* \brief Constructs a new FLAC identification header.
|
|
*/
|
|
constexpr FlacToOggMappingHeader::FlacToOggMappingHeader()
|
|
: m_majorVersion(0)
|
|
, m_minorVersion(0)
|
|
, m_headerCount(0)
|
|
{
|
|
}
|
|
|
|
/*!
|
|
* \brief Returns the major version for the mapping (which should be 1 currently).
|
|
*/
|
|
constexpr byte FlacToOggMappingHeader::majorVersion() const
|
|
{
|
|
return m_majorVersion;
|
|
}
|
|
|
|
/*!
|
|
* \brief Returns the version for the mapping (which should be 0 currently).
|
|
*/
|
|
constexpr byte FlacToOggMappingHeader::minorVersion() const
|
|
{
|
|
return m_minorVersion;
|
|
}
|
|
|
|
/*!
|
|
* \brief Returns the number of header (non-audio) packets, not including this one.
|
|
*/
|
|
constexpr uint16 FlacToOggMappingHeader::headerCount() const
|
|
{
|
|
return m_headerCount;
|
|
}
|
|
|
|
/*!
|
|
* \brief Returns the stream info.
|
|
*/
|
|
constexpr const FlacMetaDataBlockStreamInfo &FlacToOggMappingHeader::streamInfo() const
|
|
{
|
|
return m_streamInfo;
|
|
}
|
|
|
|
} // namespace TagParser
|
|
|
|
#endif // TAG_PARSER_FLACIDENTIFICATIONHEADER_H
|