Lines Matching refs:page

118     ssize_t readPage(off64_t offset, Page *page);
258 // Given the offset of the "current" page, find the page immediately preceding
260 // To do this we back up from the "current" page's offset until we find any
261 // page preceding it and then scan forward to just before the current page.
288 // We did not find a page preceding this one.
361 // We found the page we wanted to seek to, but we'll also need
362 // the page preceding it to determine how many valid samples are on
363 // this page.
374 // XXX what if new page continues packet from last???
379 ssize_t MyVorbisExtractor::readPage(off64_t offset, Page *page) {
406 page->mFlags = header[5];
408 if (page->mFlags & ~7) {
413 page->mGranulePosition = U64LE_AT(&header[6]);
417 page->mGranulePosition, page->mGranulePosition);
420 page->mSerialNo = U32LE_AT(&header[14]);
421 page->mPageNo = U32LE_AT(&header[18]);
423 page->mNumSegments = header[26];
425 offset + sizeof(header), page->mLace, page->mNumSegments)
426 < (ssize_t)page->mNumSegments) {
431 for (size_t i = 0; i < page->mNumSegments; ++i) {
432 totalSize += page->mLace[i];
437 for (size_t i = 0; i < page->mNumSegments; ++i) {
439 sprintf(x, "%s%u", i > 0 ? ", " : "", (unsigned)page->mLace[i]);
444 ALOGV("%c %s", page->mFlags & 1 ? '+' : ' ', tmp.string());
447 return sizeof(header) + page->mNumSegments + totalSize;
489 // this packet, we also stamp every packet in this page
565 // This page does not continue the packet, i.e. the packet
631 // The granule position of the final page in the stream will
648 Page page;
650 while ((pageSize = readPage(offset, &page)) > 0) {
657 entry.mTimeUs = page.mGranulePosition * 1000000ll / mVi.rate;