Lines Matching refs:offset

50             offset(0), size(0), nextTileIndex(0) {}  in ImageItem()
75 off64_t offset; member
87 off64_t offset; member
112 status_t parseChunk(off64_t *offset);
114 status_t parseChunks(off64_t offset, size_t size);
121 status_t Box::parseChunk(off64_t *offset) { in parseChunk() argument
122 if (*offset < 0) { in parseChunk()
127 if (mDataSource->readAt(*offset, hdr, 8) < 8) { in parseChunk()
132 off64_t data_offset = *offset + 8; in parseChunk()
135 if (mDataSource->readAt(*offset + 8, &chunk_size, 8) < 8) { in parseChunk()
157 ALOGV("chunk: %s @ %lld", chunk, (long long)*offset); in parseChunk()
159 off64_t chunk_data_size = chunk_size - (data_offset - *offset); in parseChunk()
170 *offset += chunk_size; in parseChunk()
174 status_t Box::parseChunks(off64_t offset, size_t size) { in parseChunks() argument
175 off64_t stopOffset = offset + size; in parseChunks()
176 while (offset < stopOffset) { in parseChunks()
177 status_t err = parseChunk(&offset); in parseChunks()
182 if (offset != stopOffset) { in parseChunks()
199 status_t parseFullBoxHeader(off64_t *offset, size_t *size);
206 status_t FullBox::parseFullBoxHeader(off64_t *offset, size_t *size) { in parseFullBoxHeader() argument
210 if (!source()->readAt(*offset, &mVersion, 1)) { in parseFullBoxHeader()
213 if (!source()->getUInt24(*offset + 1, &mFlags)) { in parseFullBoxHeader()
216 *offset += 4; in parseFullBoxHeader()
230 status_t parse(off64_t offset, size_t size, uint32_t *primaryItemId);
233 status_t PitmBox::parse(off64_t offset, size_t size, uint32_t *primaryItemId) { in parse() argument
234 status_t err = parseFullBoxHeader(&offset, &size); in parse()
244 if (!source()->getUInt32Var(offset, &itemId, itemIdSize)) { in parse()
278 status_t getLoc(off64_t *offset, size_t *size, in getLoc()
283 *offset = baseOffset + extents[0].extentOffset; in getLoc()
291 *offset = baseOffset + extents[0].extentOffset + idatOffset; in getLoc()
311 status_t parse(off64_t offset, size_t size);
323 status_t IlocBox::parse(off64_t offset, size_t size) { in parse() argument
324 status_t err = parseFullBoxHeader(&offset, &size); in parse()
337 if (!source()->readAt(offset++, &offset_size, 1)) { in parse()
344 if (!source()->readAt(offset++, &base_offset_size, 1)) { in parse()
368 if (!source()->getUInt32Var(offset, &item_count, itemFieldSize)) { in parse()
373 offset += itemFieldSize; in parse()
378 if (!source()->getUInt32Var(offset, &item_id, itemFieldSize)) { in parse()
382 offset += itemFieldSize; in parse()
387 if (!source()->readAt(offset, buf, 2)) { in parse()
396 offset += 2; in parse()
400 if (!source()->getUInt16(offset, &data_reference_index)) { in parse()
408 offset += 2; in parse()
412 if (!source()->getUInt64Var(offset, &base_offset, base_offset_size)) { in parse()
415 offset += base_offset_size; in parse()
424 if (!source()->getUInt16(offset, &extent_count)) { in parse()
432 offset += 2; in parse()
437 if (!source()->getUInt64Var(offset, &extent_index, index_size)) { in parse()
441 offset += index_size; in parse()
447 if (!source()->getUInt64Var(offset, &extent_offset, offset_size)) { in parse()
450 offset += offset_size; in parse()
456 if (!source()->getUInt64Var(offset, &extent_length, length_size)) { in parse()
459 offset += length_size; in parse()
478 status_t parse(off64_t offset, size_t size);
596 status_t ItemReference::parse(off64_t offset, size_t size) { in parse() argument
600 if (!source()->getUInt32Var(offset, &mItemId, mRefIdSize)) { in parse()
603 offset += mRefIdSize; in parse()
606 if (!source()->getUInt16(offset, &count)) { in parse()
609 offset += 2; in parse()
618 if (!source()->getUInt32Var(offset, &refItemId, mRefIdSize)) { in parse()
621 offset += mRefIdSize; in parse()
633 status_t parse(off64_t offset, size_t size);
636 status_t onChunkData(uint32_t type, off64_t offset, size_t size) override;
643 status_t IrefBox::parse(off64_t offset, size_t size) { in parse() argument
644 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
645 status_t err = parseFullBoxHeader(&offset, &size); in parse()
651 return parseChunks(offset, size); in parse()
654 status_t IrefBox::onChunkData(uint32_t type, off64_t offset, size_t size) { in onChunkData() argument
657 status_t err = itemRef->parse(offset, size); in onChunkData()
695 status_t parse(off64_t offset, size_t size) override;
707 status_t IspeBox::parse(off64_t offset, size_t size) { in parse() argument
708 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
710 status_t err = parseFullBoxHeader(&offset, &size); in parse()
718 if (!source()->getUInt32(offset, &mWidth) in parse()
719 || !source()->getUInt32(offset + 4, &mHeight)) { in parse()
731 status_t parse(off64_t offset, size_t size) override;
741 status_t HvccBox::parse(off64_t offset, size_t size) { in parse() argument
742 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
751 if (source()->readAt(offset, mHVCC->data(), size) < (ssize_t)size) { in parse()
764 status_t parse(off64_t offset, size_t size) override;
774 status_t IrotBox::parse(off64_t offset, size_t size) { in parse() argument
775 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
780 if (source()->readAt(offset, &mAngle, 1) != 1) { in parse()
793 status_t parse(off64_t offset, size_t size) override;
803 status_t ColrBox::parse(off64_t offset, size_t size) { in parse() argument
804 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
810 if (!source()->getUInt32(offset, &colour_type)) { in parse()
813 offset += 4; in parse()
829 if (source()->readAt(offset, mICCData->data(), size) != (ssize_t)size) { in parse()
841 status_t parse(off64_t offset, size_t size);
846 status_t IpmaBox::parse(off64_t offset, size_t size) { in parse() argument
847 status_t err = parseFullBoxHeader(&offset, &size); in parse()
856 if (!source()->getUInt32(offset, &entryCount)) { in parse()
859 offset += 4; in parse()
870 if (!source()->getUInt32Var(offset, &itemId, itemIdSize)) { in parse()
873 offset += itemIdSize; in parse()
877 if (!source()->readAt(offset, &associationCount, 1)) { in parse()
880 offset++; in parse()
889 if (!source()->getUInt16Var(offset, &propIndex, propIndexSize)) { in parse()
892 offset += propIndexSize; in parse()
915 status_t parse(off64_t offset, size_t size);
917 status_t onChunkData(uint32_t type, off64_t offset, size_t size) override;
923 status_t IpcoBox::parse(off64_t offset, size_t size) { in parse() argument
924 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
927 return parseChunks(offset, size); in parse()
930 status_t IpcoBox::onChunkData(uint32_t type, off64_t offset, size_t size) { in onChunkData() argument
960 status_t err = itemProperty->parse(offset, size); in onChunkData()
975 status_t parse(off64_t offset, size_t size);
977 status_t onChunkData(uint32_t type, off64_t offset, size_t size) override;
984 status_t IprpBox::parse(off64_t offset, size_t size) { in parse() argument
985 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
987 status_t err = parseChunks(offset, size); in parse()
994 status_t IprpBox::onChunkData(uint32_t type, off64_t offset, size_t size) { in onChunkData() argument
999 return ipcoBox.parse(offset, size); in onChunkData()
1004 return ipmaBox.parse(offset, size); in onChunkData()
1029 status_t parse(off64_t offset, size_t size, ItemInfo *itemInfo);
1032 bool parseNullTerminatedString(off64_t *offset, size_t *size, String8 *out);
1036 off64_t *offset, size_t *size, String8 *out) { in parseNullTerminatedString() argument
1040 off64_t newOffset = *offset; in parseNullTerminatedString()
1041 off64_t stopOffset = *offset + *size; in parseNullTerminatedString()
1050 *offset = newOffset; in parseNullTerminatedString()
1059 status_t InfeBox::parse(off64_t offset, size_t size, ItemInfo *itemInfo) { in parse() argument
1060 status_t err = parseFullBoxHeader(&offset, &size); in parse()
1073 if (!source()->getUInt32Var(offset, &item_id, itemIdSize)) { in parse()
1077 offset += itemIdSize; in parse()
1079 if (!source()->getUInt16(offset, &item_protection_index)) { in parse()
1083 offset += 2; in parse()
1085 if (!source()->getUInt32(offset, &item_type)) { in parse()
1098 offset += 4; in parse()
1102 if (!parseNullTerminatedString(&offset, &size, &item_name)) { in parse()
1109 if (!parseNullTerminatedString(&offset, &size, &content_type)) { in parse()
1116 if (!parseNullTerminatedString(&offset, &size, &content_encoding)) { in parse()
1122 if (!parseNullTerminatedString(&offset, &size, &item_uri_type)) { in parse()
1134 status_t parse(off64_t offset, size_t size);
1139 status_t onChunkData(uint32_t type, off64_t offset, size_t size) override;
1146 status_t IinfBox::parse(off64_t offset, size_t size) { in parse() argument
1147 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parse()
1149 status_t err = parseFullBoxHeader(&offset, &size); in parse()
1159 if (!source()->getUInt32Var(offset, &entry_count, entryCountSize)) { in parse()
1164 off64_t stopOffset = offset + size; in parse()
1165 offset += entryCountSize; in parse()
1166 for (size_t i = 0; i < entry_count && offset < stopOffset; i++) { in parse()
1168 status_t err = parseChunk(&offset); in parse()
1173 if (offset != stopOffset) { in parse()
1180 status_t IinfBox::onChunkData(uint32_t type, off64_t offset, size_t size) { in onChunkData() argument
1187 status_t err = infeBox.parse(offset, size, &itemInfo); in onChunkData()
1254 status_t ItemTable::parseIlocBox(off64_t offset, size_t size) { in parseIlocBox() argument
1255 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parseIlocBox()
1258 status_t err = ilocBox.parse(offset, size); in parseIlocBox()
1270 status_t ItemTable::parseIinfBox(off64_t offset, size_t size) { in parseIinfBox() argument
1271 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parseIinfBox()
1274 status_t err = iinfBox.parse(offset, size); in parseIinfBox()
1286 status_t ItemTable::parsePitmBox(off64_t offset, size_t size) { in parsePitmBox() argument
1287 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parsePitmBox()
1290 status_t err = pitmBox.parse(offset, size, &mPrimaryItemId); in parsePitmBox()
1298 status_t ItemTable::parseIprpBox(off64_t offset, size_t size) { in parseIprpBox() argument
1299 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parseIprpBox()
1302 status_t err = iprpBox.parse(offset, size); in parseIprpBox()
1310 status_t ItemTable::parseIdatBox(off64_t offset, size_t size) { in parseIdatBox() argument
1311 ALOGV("%s: idat offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parseIdatBox()
1314 mIdatOffset = offset; in parseIdatBox()
1320 status_t ItemTable::parseIrefBox(off64_t offset, size_t size) { in parseIrefBox() argument
1321 ALOGV("%s: offset %lld, size %zu", __FUNCTION__, (long long)offset, size); in parseIrefBox()
1324 status_t err = irefBox.parse(offset, size); in parseIrefBox()
1376 off64_t offset; in buildImageItemsIfPossible() local
1378 if (iloc.getLoc(&offset, &size, mIdatOffset, mIdatSize) != OK) { in buildImageItemsIfPossible()
1387 .offset = offset, in buildImageItemsIfPossible()
1405 if (!mDataSource->readAt(offset, buf, size)) { in buildImageItemsIfPossible()
1414 image.offset = offset; in buildImageItemsIfPossible()
1628 uint32_t *itemIndex, off64_t *offset, size_t *size) { in getImageOffsetAndSize() argument
1652 *offset = mItemIdToItemMap[tileItemIndex].offset; in getImageOffsetAndSize()
1660 *offset = mItemIdToItemMap[mCurrentItemIndex].offset; in getImageOffsetAndSize()
1667 status_t ItemTable::getExifOffsetAndSize(off64_t *offset, size_t *size) { in getExifOffsetAndSize() argument
1692 mItemIdToExifMap[exifIndex].offset, &tiffOffset, 4)) { in getExifOffsetAndSize()
1713 *offset = mItemIdToExifMap[exifIndex].offset + exifOffset; in getExifOffsetAndSize()