void SingleItemTypeReferenceBox::parseBox(BitStream& bitstr) { parseBoxHeader(bitstr); // parent box mFromItemId = bitstr.read16Bits(); const uint16_t referenceCount = bitstr.read16Bits(); for (unsigned int i = 0; i < referenceCount; ++i) { mToItemIds.push_back(bitstr.read16Bits()); } }
void CleanAperture::parseBox(BitStream& input) { parseBoxHeader(input); mWidth.numerator = input.read32Bits(); mWidth.denominator = input.read32Bits(); mHeight.numerator = input.read32Bits(); mHeight.denominator = input.read32Bits(); mHorizOffset.numerator = input.read32Bits(); mHorizOffset.denominator = input.read32Bits(); mVertOffset.numerator = input.read32Bits(); mVertOffset.denominator = input.read32Bits(); }
void DataInformationBox::parseBox(ISOBMFF::BitStream& bitstr) { parseBoxHeader(bitstr); if (bitstr.numBytesLeft() > 0) { FourCCInt boxType; BitStream subBitstr = bitstr.readSubBoxBitStream(boxType); mDataReferenceBox.parseBox(subBitstr); } else { logError() << "Read an empty dinf box." << std::endl; } }
void FileTypeBox::parseBox(ISOBMFF::BitStream& bitstr) { // Parse the box header parseBoxHeader(bitstr); // major_brand mMajorBrand = FourCCInt(bitstr.read32Bits()); // minor_version mMinorVersion = bitstr.read32Bits(); // compatible_brands[] while (bitstr.numBytesLeft() >= 4) { FourCCInt compatibleBrand = FourCCInt(bitstr.read32Bits()); mCompatibleBrands.push_back(compatibleBrand); } }
void ItemPropertiesBox::parseBox(BitStream& input) { parseBoxHeader(input); std::string subBoxType; BitStream subBitStream = input.readSubBoxBitStream(subBoxType); mContainer.parseBox(subBitStream); subBitStream = input.readSubBoxBitStream(subBoxType); if (subBoxType != "ipma") { throw std::runtime_error("ItemPropertiesBox includes a box which is not ipma"); } // There could be several ItemPropertyAssociation boxes, but currently only one is supported. mAssociations.parseBox(subBitStream); if (input.numBytesLeft() > 0) { logWarning() << "ItemPropertiesBox::parseBox() supports currently only one ipma box, but there seems to be more." << std::endl; } }
void PixelAspectRatioBox::parseBox(BitStream& input) { parseBoxHeader(input); mHSpacing = input.read32Bits(); mVSpacing = input.read32Bits(); }
void HevcConfigurationBox::parseBox(BitStream& bitstr) { BitStream subBitstr; parseBoxHeader(bitstr); mHevcConfig.parseConfig(bitstr); }