7 #include "../mediafileinfo.h" 8 #include "../exceptions.h" 10 #include <c++utilities/conversion/stringbuilder.h> 11 #include <c++utilities/io/binaryreader.h> 12 #include <c++utilities/io/binarywriter.h> 30 Mp4Atom::Mp4Atom(GenericFileElement::containerType &container, uint64 startOffset) :
31 GenericFileElement<Mp4Atom>(container, startOffset)
38 GenericFileElement<Mp4Atom>(container, startOffset, maxSize)
45 GenericFileElement<Mp4Atom>(parent, startOffset)
51 string Mp4Atom::parsingContext()
const 62 static const string context(
"parsing MP4 atom");
128 ostream::pos_type currentOffset =
stream.tellp();
132 stream.seekp(currentOffset);
146 ostream::pos_type currentOffset =
stream.tellp();
150 stream.seekp(4, ios_base::cur);
152 stream.seekp(currentOffset);
160 if(size < numeric_limits<uint32>::max()) {
161 writer.writeUInt32BE(static_cast<uint32>(size));
166 writer.writeUInt64BE(size);
179 using namespace Mp4AtomIds;
211 using namespace Mp4AtomIds;
230 using namespace Mp4AtomIds;
231 using namespace FourccIds;
241 default:
return 0x00u;
Contains utility classes helping to read and write streams.