3 #include "../diagnostics.h" 4 #include "../exceptions.h" 5 #include "../mediaformat.h" 7 #include <c++utilities/io/binaryreader.h> 26 void AvcConfiguration::parse(BinaryReader &reader, uint64 maxSize,
Diagnostics &diag)
34 reader.stream()->seekg(1, ios_base::cur);
35 profileIndication = reader.readByte();
36 profileCompat = reader.readByte();
37 levelIndication = reader.readByte();
38 naluSizeLength = (reader.readByte() & 0x03) + 1;
41 byte entryCount = reader.readByte() & 0x0f;
42 spsInfos.reserve(entryCount);
43 for (; entryCount; --entryCount) {
47 spsInfos.emplace_back();
49 spsInfos.back().parse(reader, maxSize > numeric_limits<uint32>::max() ? numeric_limits<uint32>::max() : static_cast<uint32>(maxSize));
51 if (spsInfos.back().size > maxSize - 2) {
59 maxSize -= spsInfos.back().size;
63 entryCount = reader.readByte();
64 ppsInfos.reserve(entryCount);
65 for (; entryCount; --entryCount) {
69 ppsInfos.emplace_back();
71 ppsInfos.back().parse(reader, maxSize > numeric_limits<uint32>::max() ? numeric_limits<uint32>::max() : static_cast<uint32>(maxSize));
73 if (ppsInfos.back().size > maxSize - 2) {
81 maxSize -= ppsInfos.back().size;
The exception that is thrown when the data to be parsed is truncated and therefore can not be parsed ...
Contains utility classes helping to read and write streams.
The class inherits from std::exception and serves as base class for exceptions thrown by the elements...
Contains all classes and functions of the TagInfo library.
The Diagnostics class is a container for DiagMessage.