3 #include "../mp4/mp4ids.h" 5 #include "../exceptions.h" 7 #include <c++utilities/conversion/stringbuilder.h> 8 #include <c++utilities/conversion/stringconversion.h> 26 static const string context(
"parsing IVF header");
32 if (m_reader.readUInt32BE() != 0x444B4946u) {
33 diag.emplace_back(DiagLevel::Critical,
"Signature not \"DKIF\".", context);
36 const auto version = m_reader.readUInt16LE();
39 diag.emplace_back(DiagLevel::Warning, argsToString(
"Version ",
version,
" is not supported."), context);
43 m_headerLength = m_reader.readUInt16LE();
44 const auto formatId = m_reader.readUInt32BE();
45 m_formatId = interpretIntegerAsString(formatId);
46 m_pixelSize.setWidth(m_reader.readUInt16LE());
47 m_pixelSize.setHeight(m_reader.readUInt16LE());
48 m_fps = m_reader.readUInt32LE();
49 m_timeScale = m_reader.readUInt32LE();
50 m_sampleCount = m_reader.readUInt32LE();
54 m_duration = TimeSpan::fromSeconds(static_cast<double>(m_sampleCount) / m_fps);
57 m_istream->seekg(4, ios_base::cur);
62 m_frames.emplace_back();
63 m_frames.back().parseHeader(m_reader, diag);
The exception that is thrown when the data to be parsed holds no parsable information.
TAG_PARSER_EXPORT MediaFormat fourccToMediaFormat(uint32 fourccId)
The exception that is thrown when the data to be parsed or to be made seems invalid and therefore can...
Contains all classes and functions of the TagInfo library.
The Diagnostics class is a container for DiagMessage.