Lines Matching refs:sampleIndex
54 status_t SampleIterator::seekTo(uint32_t sampleIndex) {
55 ALOGV("seekTo(%d)", sampleIndex);
57 if (sampleIndex >= mTable->mNumSampleSizes) {
69 if (mInitialized && mCurrentSampleIndex == sampleIndex) {
73 if (!mInitialized || sampleIndex < mFirstChunkSampleIndex) {
77 if (sampleIndex >= mStopChunkSampleIndex) {
79 if ((err = findChunkRange(sampleIndex)) != OK) {
85 CHECK(sampleIndex < mStopChunkSampleIndex);
88 (sampleIndex - mFirstChunkSampleIndex) / mSamplesPerChunk
119 (sampleIndex - mFirstChunkSampleIndex) % mSamplesPerChunk;
127 if (sampleIndex < mTTSSampleIndex) {
136 if ((err = findSampleTime(sampleIndex, &mCurrentSampleTime)) != OK) {
141 mCurrentSampleIndex = sampleIndex;
148 status_t SampleIterator::findChunkRange(uint32_t sampleIndex) {
149 CHECK(sampleIndex >= mFirstChunkSampleIndex);
151 while (sampleIndex >= mStopChunkSampleIndex) {
218 uint32_t sampleIndex, size_t *size) {
221 if (sampleIndex >= mTable->mNumSampleSizes) {
234 mTable->mSampleSizeOffset + 12 + 4 * sampleIndex,
247 mTable->mSampleSizeOffset + 12 + 2 * sampleIndex,
260 mTable->mSampleSizeOffset + 12 + sampleIndex,
275 mTable->mSampleSizeOffset + 12 + sampleIndex / 2,
280 *size = (sampleIndex & 1) ? x & 0x0f : x >> 4;
289 uint32_t sampleIndex, uint32_t *time) {
290 if (sampleIndex >= mTable->mNumSampleSizes) {
294 while (sampleIndex >= mTTSSampleIndex + mTTSCount) {
308 *time = mTTSSampleTime + mTTSDuration * (sampleIndex - mTTSSampleIndex);
310 *time += mTable->getCompositionTimeOffset(sampleIndex);