3 #include "../exceptions.h" 4 #include "../mediaformat.h" 6 #include <c++utilities/io/binaryreader.h> 23 void AvcConfiguration::parse(BinaryReader &reader, uint64 maxSize)
30 reader.stream()->seekg(1, ios_base::cur);
31 profileIndication = reader.readByte();
32 profileCompat = reader.readByte();
33 levelIndication = reader.readByte();
34 naluSizeLength = (reader.readByte() & 0x03) + 1;
37 byte entryCount = reader.readByte() & 0x0f;
38 spsInfos.reserve(entryCount);
39 for (; entryCount; --entryCount) {
43 spsInfos.emplace_back();
45 spsInfos.back().parse(reader, maxSize);
48 if (spsInfos.back().size > maxSize - 2) {
56 maxSize -= spsInfos.back().size;
60 entryCount = reader.readByte();
61 ppsInfos.reserve(entryCount);
62 for (; entryCount; --entryCount) {
66 ppsInfos.emplace_back();
68 ppsInfos.back().parse(reader, maxSize);
71 if (ppsInfos.back().size > maxSize - 2) {
79 maxSize -= ppsInfos.back().size;
Contains utility classes helping to read and write streams.