From c3d8ad2488496999970d559c758d595410a62cbe Mon Sep 17 00:00:00 2001 From: hoangtc Date: Mon, 6 Aug 2018 02:02:48 -0700 Subject: [PATCH] Add supports for Seeking in ADTS format using a constant bitrate seekmap. - Use ConstantBitrateSeeker to implement seeking for ADTS format. Since most ADTS streams are VBR, we use the average bitrate of the first 1000 frames as the average bit rate. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207509651 --- RELEASENOTES.md | 2 + .../extractor/ts/AdtsExtractor.java | 215 ++++- .../exoplayer2/extractor/ts/AdtsReader.java | 186 +++- .../src/test/assets/amr/sample_nb_cbr.amr | Bin 0 -> 2840 bytes .../test/assets/amr/sample_nb_cbr.amr.0.dump | 902 ++++++++++++++++++ .../test/assets/amr/sample_nb_cbr.amr.1.dump | 614 ++++++++++++ .../test/assets/amr/sample_nb_cbr.amr.2.dump | 322 +++++++ .../test/assets/amr/sample_nb_cbr.amr.3.dump | 34 + .../assets/amr/sample_nb_cbr.amr.unklen.dump | 902 ++++++++++++++++++ .../src/test/assets/amr/sample_wb_cbr.amr | Bin 0 -> 4065 bytes .../test/assets/amr/sample_wb_cbr.amr.0.dump | 706 ++++++++++++++ .../test/assets/amr/sample_wb_cbr.amr.1.dump | 482 ++++++++++ .../test/assets/amr/sample_wb_cbr.amr.2.dump | 258 +++++ .../test/assets/amr/sample_wb_cbr.amr.3.dump | 34 + .../assets/amr/sample_wb_cbr.amr.unklen.dump | 706 ++++++++++++++ .../core/src/test/assets/ts/sample_cbs.adts | Bin 0 -> 31805 bytes .../src/test/assets/ts/sample_cbs.adts.0.dump | 631 ++++++++++++ .../src/test/assets/ts/sample_cbs.adts.1.dump | 431 +++++++++ .../src/test/assets/ts/sample_cbs.adts.2.dump | 251 +++++ .../src/test/assets/ts/sample_cbs.adts.3.dump | 59 ++ .../assets/ts/sample_cbs.adts.unklen.dump | 631 ++++++++++++ .../extractor/amr/AmrExtractorSeekTest.java | 288 +++--- .../extractor/amr/AmrExtractorTest.java | 26 +- .../extractor/ts/AdtsExtractorSeekTest.java | 256 +++++ .../extractor/ts/AdtsExtractorTest.java | 14 + .../extractor/ts/AdtsReaderTest.java | 16 +- .../android/exoplayer2/testutil/TestUtil.java | 151 +++ 27 files changed, 7896 insertions(+), 221 deletions(-) create mode 100644 library/core/src/test/assets/amr/sample_nb_cbr.amr create mode 100644 library/core/src/test/assets/amr/sample_nb_cbr.amr.0.dump create mode 100644 library/core/src/test/assets/amr/sample_nb_cbr.amr.1.dump create mode 100644 library/core/src/test/assets/amr/sample_nb_cbr.amr.2.dump create mode 100644 library/core/src/test/assets/amr/sample_nb_cbr.amr.3.dump create mode 100644 library/core/src/test/assets/amr/sample_nb_cbr.amr.unklen.dump create mode 100644 library/core/src/test/assets/amr/sample_wb_cbr.amr create mode 100644 library/core/src/test/assets/amr/sample_wb_cbr.amr.0.dump create mode 100644 library/core/src/test/assets/amr/sample_wb_cbr.amr.1.dump create mode 100644 library/core/src/test/assets/amr/sample_wb_cbr.amr.2.dump create mode 100644 library/core/src/test/assets/amr/sample_wb_cbr.amr.3.dump create mode 100644 library/core/src/test/assets/amr/sample_wb_cbr.amr.unklen.dump create mode 100644 library/core/src/test/assets/ts/sample_cbs.adts create mode 100644 library/core/src/test/assets/ts/sample_cbs.adts.0.dump create mode 100644 library/core/src/test/assets/ts/sample_cbs.adts.1.dump create mode 100644 library/core/src/test/assets/ts/sample_cbs.adts.2.dump create mode 100644 library/core/src/test/assets/ts/sample_cbs.adts.3.dump create mode 100644 library/core/src/test/assets/ts/sample_cbs.adts.unklen.dump create mode 100644 library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorSeekTest.java diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 10a1dcf9b8..9dd0ed3dfe 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -13,6 +13,8 @@ * Audio: * Support seeking for the AMR container format using constant bitrate seek map. + * Support seeking for the ADTS container format using constant bitrate seek + map ([#4548](https://github.com/google/ExoPlayer/issues/4548)). * Add support for mu-law and A-law PCM with the ffmpeg extension ([#4360](https://github.com/google/ExoPlayer/issues/4360)). * Increase `AudioTrack` buffer sizes to the theoretical maximum required for diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java index 56197730f7..ef7b763306 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java @@ -15,7 +15,11 @@ */ package com.google.android.exoplayer2.extractor.ts; +import android.support.annotation.IntDef; +import android.support.annotation.Nullable; import com.google.android.exoplayer2.C; +import com.google.android.exoplayer2.ParserException; +import com.google.android.exoplayer2.extractor.ConstantBitrateSeekMap; import com.google.android.exoplayer2.extractor.Extractor; import com.google.android.exoplayer2.extractor.ExtractorInput; import com.google.android.exoplayer2.extractor.ExtractorOutput; @@ -23,10 +27,13 @@ import com.google.android.exoplayer2.extractor.ExtractorsFactory; import com.google.android.exoplayer2.extractor.PositionHolder; import com.google.android.exoplayer2.extractor.SeekMap; import com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator; +import com.google.android.exoplayer2.util.Assertions; import com.google.android.exoplayer2.util.ParsableBitArray; import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.Util; import java.io.IOException; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; /** * Extracts data from AAC bit streams with ADTS framing. @@ -36,28 +43,74 @@ public final class AdtsExtractor implements Extractor { /** Factory for {@link AdtsExtractor} instances. */ public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new AdtsExtractor()}; - private static final int MAX_PACKET_SIZE = 200; + /** Flags controlling the behavior of the extractor. */ + @Retention(RetentionPolicy.SOURCE) + @IntDef( + flag = true, + value = {FLAG_ENABLE_CONSTANT_BITRATE_SEEKING}) + public @interface Flags {} + /** + * Flag to force enable seeking using a constant bitrate assumption in cases where seeking would + * otherwise not be possible. + * + *

Note that this approach may result in approximated stream duration and seek position that + * are not precise, especially when the stream bitrate varies a lot. + */ + public static final int FLAG_ENABLE_CONSTANT_BITRATE_SEEKING = 1; + + private static final int MAX_PACKET_SIZE = 2 * 1024; private static final int ID3_TAG = Util.getIntegerCodeForString("ID3"); /** * The maximum number of bytes to search when sniffing, excluding the header, before giving up. * Frame sizes are represented by 13-bit fields, so expect a valid frame in the first 8192 bytes. */ private static final int MAX_SNIFF_BYTES = 8 * 1024; + /** + * The maximum number of frames to use when calculating the average frame size for constant + * bitrate seeking. + */ + private static final int NUM_FRAMES_FOR_AVERAGE_FRAME_SIZE = 1000; + + private final @Flags int flags; - private final long firstSampleTimestampUs; private final AdtsReader reader; private final ParsableByteArray packetBuffer; + private final ParsableByteArray scratch; + private final ParsableBitArray scratchBits; + private final long firstStreamSampleTimestampUs; + private @Nullable ExtractorOutput extractorOutput; + + private long firstSampleTimestampUs; + private long firstFramePosition; + private int averageFrameSize; + private boolean hasCalculatedAverageFrameSize; private boolean startedPacket; + private boolean hasOutputSeekMap; public AdtsExtractor() { this(0); } - public AdtsExtractor(long firstSampleTimestampUs) { - this.firstSampleTimestampUs = firstSampleTimestampUs; + public AdtsExtractor(long firstStreamSampleTimestampUs) { + this(/* firstStreamSampleTimestampUs= */ firstStreamSampleTimestampUs, /* flags= */ 0); + } + + /** + * @param firstStreamSampleTimestampUs The timestamp to be used for the first sample of the stream + * output from this extractor. + * @param flags Flags that control the extractor's behavior. + */ + public AdtsExtractor(long firstStreamSampleTimestampUs, @Flags int flags) { + this.firstStreamSampleTimestampUs = firstStreamSampleTimestampUs; + this.firstSampleTimestampUs = firstStreamSampleTimestampUs; + this.flags = flags; reader = new AdtsReader(true); packetBuffer = new ParsableByteArray(MAX_PACKET_SIZE); + averageFrameSize = C.LENGTH_UNSET; + firstFramePosition = C.POSITION_UNSET; + scratch = new ParsableByteArray(10); + scratchBits = new ParsableBitArray(scratch.data); } // Extractor implementation. @@ -65,41 +118,26 @@ public final class AdtsExtractor implements Extractor { @Override public boolean sniff(ExtractorInput input) throws IOException, InterruptedException { // Skip any ID3 headers. - ParsableByteArray scratch = new ParsableByteArray(10); - ParsableBitArray scratchBits = new ParsableBitArray(scratch.data); - int startPosition = 0; - while (true) { - input.peekFully(scratch.data, 0, 10); - scratch.setPosition(0); - if (scratch.readUnsignedInt24() != ID3_TAG) { - break; - } - scratch.skipBytes(3); - int length = scratch.readSynchSafeInt(); - startPosition += 10 + length; - input.advancePeekPosition(length); - } - input.resetPeekPosition(); - input.advancePeekPosition(startPosition); + int startPosition = peekId3Header(input); // Try to find four or more consecutive AAC audio frames, exceeding the MPEG TS packet size. int headerPosition = startPosition; - int validFramesSize = 0; + int totalValidFramesSize = 0; int validFramesCount = 0; while (true) { input.peekFully(scratch.data, 0, 2); scratch.setPosition(0); int syncBytes = scratch.readUnsignedShort(); - if ((syncBytes & 0xFFF6) != 0xFFF0) { + if (!AdtsReader.isAdtsSyncWord(syncBytes)) { validFramesCount = 0; - validFramesSize = 0; + totalValidFramesSize = 0; input.resetPeekPosition(); if (++headerPosition - startPosition >= MAX_SNIFF_BYTES) { return false; } input.advancePeekPosition(headerPosition); } else { - if (++validFramesCount >= 4 && validFramesSize > 188) { + if (++validFramesCount >= 4 && totalValidFramesSize > TsExtractor.TS_PACKET_SIZE) { return true; } @@ -112,22 +150,23 @@ public final class AdtsExtractor implements Extractor { return false; } input.advancePeekPosition(frameSize - 6); - validFramesSize += frameSize; + totalValidFramesSize += frameSize; } } } @Override public void init(ExtractorOutput output) { + this.extractorOutput = output; reader.createTracks(output, new TrackIdGenerator(0, 1)); output.endTracks(); - output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET)); } @Override public void seek(long position, long timeUs) { startedPacket = false; reader.seek(); + firstSampleTimestampUs = firstStreamSampleTimestampUs + timeUs; } @Override @@ -138,8 +177,17 @@ public final class AdtsExtractor implements Extractor { @Override public int read(ExtractorInput input, PositionHolder seekPosition) throws IOException, InterruptedException { + long inputLength = input.getLength(); + boolean canUseConstantBitrateSeeking = + (flags & FLAG_ENABLE_CONSTANT_BITRATE_SEEKING) != 0 && inputLength != C.LENGTH_UNSET; + if (canUseConstantBitrateSeeking) { + calculateAverageFrameSize(input); + } + int bytesRead = input.read(packetBuffer.data, 0, MAX_PACKET_SIZE); - if (bytesRead == C.RESULT_END_OF_INPUT) { + boolean readEndOfStream = bytesRead == RESULT_END_OF_INPUT; + maybeOutputSeekMap(inputLength, canUseConstantBitrateSeeking, readEndOfStream); + if (readEndOfStream) { return RESULT_END_OF_INPUT; } @@ -158,4 +206,117 @@ public final class AdtsExtractor implements Extractor { return RESULT_CONTINUE; } + private int peekId3Header(ExtractorInput input) throws IOException, InterruptedException { + int firstFramePosition = 0; + while (true) { + input.peekFully(scratch.data, 0, 10); + scratch.setPosition(0); + if (scratch.readUnsignedInt24() != ID3_TAG) { + break; + } + scratch.skipBytes(3); + int length = scratch.readSynchSafeInt(); + firstFramePosition += 10 + length; + input.advancePeekPosition(length); + } + input.resetPeekPosition(); + input.advancePeekPosition(firstFramePosition); + if (this.firstFramePosition == C.POSITION_UNSET) { + this.firstFramePosition = firstFramePosition; + } + return firstFramePosition; + } + + private void maybeOutputSeekMap( + long inputLength, boolean canUseConstantBitrateSeeking, boolean readEndOfStream) { + if (hasOutputSeekMap) { + return; + } + boolean useConstantBitrateSeeking = canUseConstantBitrateSeeking && averageFrameSize > 0; + if (useConstantBitrateSeeking + && reader.getSampleDurationUs() == C.TIME_UNSET + && !readEndOfStream) { + // Wait for the sampleDurationUs to be available, or for the end of the stream to be reached, + // before creating seek map. + return; + } + + ExtractorOutput extractorOutput = Assertions.checkNotNull(this.extractorOutput); + if (useConstantBitrateSeeking && reader.getSampleDurationUs() != C.TIME_UNSET) { + extractorOutput.seekMap(getConstantBitrateSeekMap(inputLength)); + } else { + extractorOutput.seekMap(new SeekMap.Unseekable(C.TIME_UNSET)); + } + hasOutputSeekMap = true; + } + + private void calculateAverageFrameSize(ExtractorInput input) + throws IOException, InterruptedException { + if (hasCalculatedAverageFrameSize) { + return; + } + averageFrameSize = C.LENGTH_UNSET; + input.resetPeekPosition(); + if (input.getPosition() == 0) { + // Skip any ID3 headers. + peekId3Header(input); + } + + int numValidFrames = 0; + long totalValidFramesSize = 0; + while (input.peekFully( + scratch.data, /* offset= */ 0, /* length= */ 2, /* allowEndOfInput= */ true)) { + scratch.setPosition(0); + int syncBytes = scratch.readUnsignedShort(); + if (!AdtsReader.isAdtsSyncWord(syncBytes)) { + // Invalid sync byte pattern. + // Constant bit-rate seeking will probably fail for this stream. + numValidFrames = 0; + break; + } else { + // Read the frame size. + if (!input.peekFully( + scratch.data, /* offset= */ 0, /* length= */ 4, /* allowEndOfInput= */ true)) { + break; + } + scratchBits.setPosition(14); + int currentFrameSize = scratchBits.readBits(13); + // Either the stream is malformed OR we're not parsing an ADTS stream. + if (currentFrameSize <= 6) { + hasCalculatedAverageFrameSize = true; + throw new ParserException("Malformed ADTS stream"); + } + totalValidFramesSize += currentFrameSize; + if (++numValidFrames == NUM_FRAMES_FOR_AVERAGE_FRAME_SIZE) { + break; + } + if (!input.advancePeekPosition(currentFrameSize - 6, /* allowEndOfInput= */ true)) { + break; + } + } + } + input.resetPeekPosition(); + if (numValidFrames > 0) { + averageFrameSize = (int) (totalValidFramesSize / numValidFrames); + } else { + averageFrameSize = C.LENGTH_UNSET; + } + hasCalculatedAverageFrameSize = true; + } + + private SeekMap getConstantBitrateSeekMap(long inputLength) { + int bitrate = getBitrateFromFrameSize(averageFrameSize, reader.getSampleDurationUs()); + return new ConstantBitrateSeekMap(inputLength, firstFramePosition, bitrate, averageFrameSize); + } + + /** + * Returns the stream bitrate, given a frame size and the duration of that frame in microseconds. + * + * @param frameSize The size of each frame in the stream. + * @param durationUsPerFrame The duration of the given frame in microseconds. + * @return The stream bitrate. + */ + private static int getBitrateFromFrameSize(int frameSize, long durationUsPerFrame) { + return (int) ((frameSize * C.BITS_PER_BYTE * C.MICROS_PER_SECOND) / durationUsPerFrame); + } } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java index 96b964a4c4..7f6a22b58b 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java @@ -39,9 +39,10 @@ public final class AdtsReader implements ElementaryStreamReader { private static final String TAG = "AdtsReader"; private static final int STATE_FINDING_SAMPLE = 0; - private static final int STATE_READING_ID3_HEADER = 1; - private static final int STATE_READING_ADTS_HEADER = 2; - private static final int STATE_READING_SAMPLE = 3; + private static final int STATE_CHECKING_ADTS_HEADER = 1; + private static final int STATE_READING_ID3_HEADER = 2; + private static final int STATE_READING_ADTS_HEADER = 3; + private static final int STATE_READING_SAMPLE = 4; private static final int HEADER_SIZE = 5; private static final int CRC_SIZE = 2; @@ -56,6 +57,7 @@ public final class AdtsReader implements ElementaryStreamReader { private static final int ID3_HEADER_SIZE = 10; private static final int ID3_SIZE_OFFSET = 6; private static final byte[] ID3_IDENTIFIER = {'I', 'D', '3'}; + private static final int VERSION_UNSET = -1; private final boolean exposeId3; private final ParsableBitArray adtsScratch; @@ -72,6 +74,14 @@ public final class AdtsReader implements ElementaryStreamReader { private int matchState; private boolean hasCrc; + private boolean foundFirstFrame; + + // Used to verifies sync words + private int firstFrameVersion; + private int firstFrameSampleRateIndex; + + private int currentFrameVersion; + private int currentFrameSampleRateIndex; // Used when parsing the header. private boolean hasOutputFormat; @@ -99,13 +109,21 @@ public final class AdtsReader implements ElementaryStreamReader { adtsScratch = new ParsableBitArray(new byte[HEADER_SIZE + CRC_SIZE]); id3HeaderBuffer = new ParsableByteArray(Arrays.copyOf(ID3_IDENTIFIER, ID3_HEADER_SIZE)); setFindingSampleState(); + firstFrameVersion = VERSION_UNSET; + firstFrameSampleRateIndex = C.INDEX_UNSET; + sampleDurationUs = C.TIME_UNSET; this.exposeId3 = exposeId3; this.language = language; } + /** Returns whether an integer matches an ADTS SYNC word. */ + public static boolean isAdtsSyncWord(int candidateSyncWord) { + return (candidateSyncWord & 0xFFF6) == 0xFFF0; + } + @Override public void seek() { - setFindingSampleState(); + resetSync(); } @Override @@ -140,6 +158,9 @@ public final class AdtsReader implements ElementaryStreamReader { parseId3Header(); } break; + case STATE_CHECKING_ADTS_HEADER: + checkAdtsHeader(data); + break; case STATE_READING_ADTS_HEADER: int targetLength = hasCrc ? HEADER_SIZE + CRC_SIZE : HEADER_SIZE; if (continueRead(data, adtsScratch.data, targetLength)) { @@ -158,6 +179,19 @@ public final class AdtsReader implements ElementaryStreamReader { // Do nothing. } + /** + * Returns the duration in microseconds per sample, or {@link C#TIME_UNSET} if the sample duration + * is not available. + */ + public long getSampleDurationUs() { + return sampleDurationUs; + } + + private void resetSync() { + foundFirstFrame = false; + setFindingSampleState(); + } + /** * Continues a read from the provided {@code source} into a given {@code target}. It's assumed * that the data should be written into {@code target} starting from an offset of zero. @@ -219,6 +253,12 @@ public final class AdtsReader implements ElementaryStreamReader { bytesRead = 0; } + /** Sets the state to STATE_CHECKING_ADTS_HEADER. */ + private void setCheckingAdtsHeaderState() { + state = STATE_CHECKING_ADTS_HEADER; + bytesRead = 0; + } + /** * Locates the next sample start, advancing the position to the byte that immediately follows * identifier. If a sample was not located, the position is advanced to the limit. @@ -231,12 +271,21 @@ public final class AdtsReader implements ElementaryStreamReader { int endOffset = pesBuffer.limit(); while (position < endOffset) { int data = adtsData[position++] & 0xFF; - if (matchState == MATCH_STATE_FF && data >= 0xF0 && data != 0xFF) { - hasCrc = (data & 0x1) == 0; - setReadingAdtsHeaderState(); - pesBuffer.setPosition(position); - return; + if (matchState == MATCH_STATE_FF && isAdtsSyncBytes((byte) 0xFF, (byte) data)) { + if (foundFirstFrame + || checkSyncPositionValid(pesBuffer, /* syncPositionCandidate= */ position - 2)) { + currentFrameVersion = (data & 0x8) >> 3; + hasCrc = (data & 0x1) == 0; + if (!foundFirstFrame) { + setCheckingAdtsHeaderState(); + } else { + setReadingAdtsHeaderState(); + } + pesBuffer.setPosition(position); + return; + } } + switch (matchState | data) { case MATCH_STATE_START | 0xFF: matchState = MATCH_STATE_FF; @@ -264,6 +313,117 @@ public final class AdtsReader implements ElementaryStreamReader { pesBuffer.setPosition(position); } + /** + * Peeks the Adts header of the current frame and checks if it is valid. If the header is valid, + * transition to {@link #STATE_READING_ADTS_HEADER}; else, transition to {@link + * #STATE_FINDING_SAMPLE}. + */ + private void checkAdtsHeader(ParsableByteArray buffer) { + if (buffer.bytesLeft() == 0) { + // Not enough data to check yet, defer this check. + return; + } + // Peek the next byte of buffer into scratch array. + adtsScratch.data[0] = buffer.data[buffer.getPosition()]; + + adtsScratch.setPosition(2); + currentFrameSampleRateIndex = adtsScratch.readBits(4); + if (firstFrameSampleRateIndex != C.INDEX_UNSET + && currentFrameSampleRateIndex != firstFrameSampleRateIndex) { + // Invalid header. + resetSync(); + return; + } + + if (!foundFirstFrame) { + foundFirstFrame = true; + firstFrameVersion = currentFrameVersion; + firstFrameSampleRateIndex = currentFrameSampleRateIndex; + } + setReadingAdtsHeaderState(); + } + + /** + * Returns whether the given syncPositionCandidate is a real SYNC word. + * + *

SYNC word pattern can occur within AAC data, so we perform a few checks to make sure this is + * really a SYNC word. This includes: + * + *

+ * + * If the buffer runs out of data for any check, optimistically skip that check, because + * AdtsReader consumes each buffer as a whole. We will still run a header validity check later. + */ + private boolean checkSyncPositionValid(ParsableByteArray pesBuffer, int syncPositionCandidate) { + // The SYNC word contains 2 bytes, and the first byte may be in the previously consumed buffer. + // Hence the second byte of the SYNC word may be byte 0 of this buffer, and + // syncPositionCandidate (which indicates position of the first byte of the SYNC word) may be + // -1. + // Since the first byte of the SYNC word is always FF, which does not contain any informational + // bits, we set the byte position to be the second byte in the SYNC word to ensure it's always + // within this buffer. + pesBuffer.setPosition(syncPositionCandidate + 1); + if (!tryRead(pesBuffer, adtsScratch.data, 1)) { + return false; + } + + adtsScratch.setPosition(4); + int currentFrameVersion = adtsScratch.readBits(1); + if (firstFrameVersion != VERSION_UNSET && currentFrameVersion != firstFrameVersion) { + return false; + } + + if (firstFrameSampleRateIndex != C.INDEX_UNSET) { + if (!tryRead(pesBuffer, adtsScratch.data, 1)) { + return true; + } + adtsScratch.setPosition(2); + int currentFrameSampleRateIndex = adtsScratch.readBits(4); + if (currentFrameSampleRateIndex != firstFrameSampleRateIndex) { + return false; + } + pesBuffer.setPosition(syncPositionCandidate + 2); + } + + // Optionally check the byte after this frame matches SYNC word. + + if (!tryRead(pesBuffer, adtsScratch.data, 4)) { + return true; + } + adtsScratch.setPosition(14); + int frameSize = adtsScratch.readBits(13); + if (frameSize <= 6) { + // Not a frame. + return false; + } + int nextSyncPosition = syncPositionCandidate + frameSize; + if (nextSyncPosition + 1 >= pesBuffer.limit()) { + return true; + } + return (isAdtsSyncBytes(pesBuffer.data[nextSyncPosition], pesBuffer.data[nextSyncPosition + 1]) + && (firstFrameVersion == VERSION_UNSET + || ((pesBuffer.data[nextSyncPosition + 1] & 0x8) >> 3) == currentFrameVersion)); + } + + private boolean isAdtsSyncBytes(byte firstByte, byte secondByte) { + int syncWord = (firstByte & 0xFF) << 8 | (secondByte & 0xFF); + return isAdtsSyncWord(syncWord); + } + + /** Reads {@code targetLength} bytes into target, and returns whether the read succeeded. */ + private boolean tryRead(ParsableByteArray source, byte[] target, int targetLength) { + if (source.bytesLeft() < targetLength) { + return false; + } + source.readBytes(target, /* offset= */ 0, targetLength); + return true; + } + /** * Parses the Id3 header. */ @@ -296,12 +456,12 @@ public final class AdtsReader implements ElementaryStreamReader { audioObjectType = 2; } - int sampleRateIndex = adtsScratch.readBits(4); - adtsScratch.skipBits(1); + adtsScratch.skipBits(5); int channelConfig = adtsScratch.readBits(3); - byte[] audioSpecificConfig = CodecSpecificDataUtil.buildAacAudioSpecificConfig( - audioObjectType, sampleRateIndex, channelConfig); + byte[] audioSpecificConfig = + CodecSpecificDataUtil.buildAacAudioSpecificConfig( + audioObjectType, firstFrameSampleRateIndex, channelConfig); Pair audioParams = CodecSpecificDataUtil.parseAacAudioSpecificConfig( audioSpecificConfig); diff --git a/library/core/src/test/assets/amr/sample_nb_cbr.amr b/library/core/src/test/assets/amr/sample_nb_cbr.amr new file mode 100644 index 0000000000000000000000000000000000000000..2e21cc843ccadc6ce066687371b95df0e568a07d GIT binary patch literal 2840 zcmWNSc{CJ?7st)G*|KFFdo{Mk7RDg+c-Dlnl%+;^$SC!)wEfg8B14lUCK1`{DU7L9 zUdvcRSu#arU&k^MA`COeZ~naJd+xd4^F8PDz34r*hrPtWOWXOGlQ`CG&xWKBsH*qG zhg6@iGz@I@fJ`z%8vYZ#Dwq0h8ba{9_e;2TAu{kgxPZgUuL&Xn?z&o-WFQdAcujH9L5Z5e8tqsyF(qk1jJ(=Wqisw zP04bD`2~jgy6?zO>L1)-K!*El{~jNuBm9RF!KyzEzjo^hqt^H)7Ss@w8(SK>TKi(O zwIPF7h@U7nP}I6NGyqzj1+=@oGG;bKn+LQ%OZu7aBjbUXqy>lyE8qBd-bU=O+`J6< zW*Qk~ipobC&)yIR;z+&CZ}$R&9!EniDA~zcR5diS*}l0{h{_w{jY##&^wOoAq4ER8 zdf9u#9DSw88W1w1voV~h6B!B!LkL<+Sy(L`5yV73qCk;wPWn83$zY^b*aM2R(`X%| zV+U%duzv$V`|dWEU|ibmSH-upbZ?Z5H=-xwj*r0;lx|1z$+mEHks>CT(|;^-0>*hE z&A0)Gx#VV3Z{KIEQaw@)8OLO|IX_+yZaz-U0X5+){HAw2aq3qY6~@Y&Y-ZkRzV?jl zGXXVf)5y}}G8fs0ajIZdQ1_OpVK?MFgP8|}!6ybY23kBMb@l@yqWStlXZx`KTGA^B z>~6Sz$!y9;Nh&)SX!~nAr&p#*)s^o#0L`WLM*BIx_jc;O6VNW$-oKu3aV}mpsS1|9 zD>9aJlAWbfT#kUd!;Dlt!|%hiL1R8}&nMYzGj4MxuJ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z>{NIB1kqTclpndBlh?3$&A@niut6x?0q=M2LEl_T;`N?&PljiMPN#qpbH=cAdfc z=>F5iSF&hVsm$`qphhGdq&^53%>L9onFyHNI2RA#5^i~6D{p6l$Bo#gy`f2=1RBk(DA279J+yn98}3)C{xfAHvH z_KqrCHmJwuwoeA5dKyh1NJ3I8+IsHXaGv9IC|Qv$?amjb3L5+(RCCh}cJRm?tV6|sq&R*T8~et;WL?{J}64P zME!bnqy6RTBYh}xzrJB<^|_s^#HxnpmHQY?=S2qXLpY@nRWH6hJ@(eq)^@8NqI&8W zOqAbCdsgl&M7?ZfWb_V4#u12b!1`t9!uLa=mHt;$L_n>kr*@S6RPUf&$tOsCFCw|n za65Feu7Jyb)!kD0|NQDYt{b-r%ECk2s{;!(mkd5XDy%_O-aGrs_^1?pP${1(X#4Q> zb@eXxQwZ`^^Oa zPQ2~~9wUZI(HbJrUM z$n?~8#?g;W{D%|F;Xesk3o@2D`uJV)1K8`SeSnOq7XBzVD*|W%btTf#*K%K2xKjSk zE~^%#wOK6jw=60DBZ;nwNFSvC(Jb8VG1>m|7Y)lwT-0wg#pGI-+F#gAOep_M!d{QP~MW literal 0 HcmV?d00001 diff --git a/library/core/src/test/assets/amr/sample_nb_cbr.amr.0.dump b/library/core/src/test/assets/amr/sample_nb_cbr.amr.0.dump new file mode 100644 index 0000000000..e8ba3c3588 --- /dev/null +++ b/library/core/src/test/assets/amr/sample_nb_cbr.amr.0.dump @@ -0,0 +1,902 @@ +seekMap: + isSeekable = true + duration = 4360000 + getPosition(0) = [[timeUs=0, position=6]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/3gpp + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 8000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 2834 + sample count = 218 + sample 0: + time = 0 + flags = 1 + data = length 13, hash 371B046C + sample 1: + time = 20000 + flags = 1 + data = length 13, hash CE30BF5B + sample 2: + time = 40000 + flags = 1 + data = length 13, hash 19A59975 + sample 3: + time = 60000 + flags = 1 + data = length 13, hash 4879773C + sample 4: + time = 80000 + flags = 1 + data = length 13, hash E8F83019 + sample 5: + time = 100000 + flags = 1 + data = length 13, hash D265CDC9 + sample 6: + time = 120000 + flags = 1 + data = length 13, hash 91653DAA + sample 7: + time = 140000 + flags = 1 + data = length 13, hash C79456F6 + sample 8: + time = 160000 + flags = 1 + data = length 13, hash CDDC4422 + sample 9: + time = 180000 + flags = 1 + data = length 13, hash D9ED3AF1 + sample 10: + time = 200000 + flags = 1 + data = length 13, hash BAB75A33 + sample 11: + time = 220000 + flags = 1 + data = length 13, hash 2221B4FF + sample 12: + time = 240000 + flags = 1 + data = length 13, hash 96400A0B + sample 13: + time = 260000 + flags = 1 + data = length 13, hash 582E6FB + sample 14: + time = 280000 + flags = 1 + data = length 13, hash C4E878E5 + sample 15: + time = 300000 + flags = 1 + data = length 13, hash C849A1BD + sample 16: + time = 320000 + flags = 1 + data = length 13, hash CFA8A9ED + sample 17: + time = 340000 + flags = 1 + data = length 13, hash 70CA4907 + sample 18: + time = 360000 + flags = 1 + data = length 13, hash B47D4454 + sample 19: + time = 380000 + flags = 1 + data = length 13, hash 282998C1 + sample 20: + time = 400000 + flags = 1 + data = length 13, hash 3F3F7A65 + sample 21: + time = 420000 + flags = 1 + data = length 13, hash CC2EAB58 + sample 22: + time = 440000 + flags = 1 + data = length 13, hash 279EF712 + sample 23: + time = 460000 + flags = 1 + data = length 13, hash AA2F4B29 + sample 24: + time = 480000 + flags = 1 + data = length 13, hash F6F658C4 + sample 25: + time = 500000 + flags = 1 + data = length 13, hash D7DEBD17 + sample 26: + time = 520000 + flags = 1 + data = length 13, hash 6DAB9A17 + sample 27: + time = 540000 + flags = 1 + data = length 13, hash 6ECE1571 + sample 28: + time = 560000 + flags = 1 + data = length 13, hash B3D0507F + sample 29: + time = 580000 + flags = 1 + data = length 13, hash 21E356B9 + sample 30: + time = 600000 + flags = 1 + data = length 13, hash 410EA12 + sample 31: + time = 620000 + flags = 1 + data = length 13, hash 533895A8 + sample 32: + time = 640000 + flags = 1 + data = length 13, hash C61B3E5A + sample 33: + time = 660000 + flags = 1 + data = length 13, hash 982170E6 + sample 34: + time = 680000 + flags = 1 + data = length 13, hash 7A0468C5 + sample 35: + time = 700000 + flags = 1 + data = length 13, hash 9C85EAA7 + sample 36: + time = 720000 + flags = 1 + data = length 13, hash B6B341B6 + sample 37: + time = 740000 + flags = 1 + data = length 13, hash 6937532E + sample 38: + time = 760000 + flags = 1 + data = length 13, hash 8CF2A3A0 + sample 39: + time = 780000 + flags = 1 + data = length 13, hash D2682AC6 + sample 40: + time = 800000 + flags = 1 + data = length 13, hash BBC5710F + sample 41: + time = 820000 + flags = 1 + data = length 13, hash 59080B6C + sample 42: + time = 840000 + flags = 1 + data = length 13, hash E4118291 + sample 43: + time = 860000 + flags = 1 + data = length 13, hash A1E5B296 + sample 44: + time = 880000 + flags = 1 + data = length 13, hash D7B8F95B + sample 45: + time = 900000 + flags = 1 + data = length 13, hash CC839BE1 + sample 46: + time = 920000 + flags = 1 + data = length 13, hash D459DFCE + sample 47: + time = 940000 + flags = 1 + data = length 13, hash D6AD19EC + sample 48: + time = 960000 + flags = 1 + data = length 13, hash D05E373D + sample 49: + time = 980000 + flags = 1 + data = length 13, hash 6A4460C7 + sample 50: + time = 1000000 + flags = 1 + data = length 13, hash C9A0D93F + sample 51: + time = 1020000 + flags = 1 + data = length 13, hash 3FA819E7 + sample 52: + time = 1040000 + flags = 1 + data = length 13, hash 1D3CBDFC + sample 53: + time = 1060000 + flags = 1 + data = length 13, hash 8BBBB403 + sample 54: + time = 1080000 + flags = 1 + data = length 13, hash 21B4A0F9 + sample 55: + time = 1100000 + flags = 1 + data = length 13, hash C0F921D1 + sample 56: + time = 1120000 + flags = 1 + data = length 13, hash 5D812AAB + sample 57: + time = 1140000 + flags = 1 + data = length 13, hash 50C9F3F8 + sample 58: + time = 1160000 + flags = 1 + data = length 13, hash 5C2BB5D1 + sample 59: + time = 1180000 + flags = 1 + data = length 13, hash 6BF9BEA5 + sample 60: + time = 1200000 + flags = 1 + data = length 13, hash 2738C1E6 + sample 61: + time = 1220000 + flags = 1 + data = length 13, hash 5FC288A6 + sample 62: + time = 1240000 + flags = 1 + data = length 13, hash 7E8E442A + sample 63: + time = 1260000 + flags = 1 + data = length 13, hash AEAA2BBA + sample 64: + time = 1280000 + flags = 1 + data = length 13, hash 4E2ACD2F + sample 65: + time = 1300000 + flags = 1 + data = length 13, hash D6C90ACF + sample 66: + time = 1320000 + flags = 1 + data = length 13, hash 6FD8A944 + sample 67: + time = 1340000 + flags = 1 + data = length 13, hash A835BBF9 + sample 68: + time = 1360000 + flags = 1 + data = length 13, hash F7713830 + sample 69: + time = 1380000 + flags = 1 + data = length 13, hash 3AA966E5 + sample 70: + time = 1400000 + flags = 1 + data = length 13, hash F939E829 + sample 71: + time = 1420000 + flags = 1 + data = length 13, hash 7676DE49 + sample 72: + time = 1440000 + flags = 1 + data = length 13, hash 93BB890A + sample 73: + time = 1460000 + flags = 1 + data = length 13, hash B57DBEC8 + sample 74: + time = 1480000 + flags = 1 + data = length 13, hash 66B0A5B6 + sample 75: + time = 1500000 + flags = 1 + data = length 13, hash D733E0D + sample 76: + time = 1520000 + flags = 1 + data = length 13, hash 80941726 + sample 77: + time = 1540000 + flags = 1 + data = length 13, hash 556ED633 + sample 78: + time = 1560000 + flags = 1 + data = length 13, hash C5EDF4E1 + sample 79: + time = 1580000 + flags = 1 + data = length 13, hash 6B287445 + sample 80: + time = 1600000 + flags = 1 + data = length 13, hash DC97C4A7 + sample 81: + time = 1620000 + flags = 1 + data = length 13, hash DA8CBDF4 + sample 82: + time = 1640000 + flags = 1 + data = length 13, hash 6F60FF77 + sample 83: + time = 1660000 + flags = 1 + data = length 13, hash 3EB22B96 + sample 84: + time = 1680000 + flags = 1 + data = length 13, hash B3C31AF5 + sample 85: + time = 1700000 + flags = 1 + data = length 13, hash 1854AA92 + sample 86: + time = 1720000 + flags = 1 + data = length 13, hash 6488264B + sample 87: + time = 1740000 + flags = 1 + data = length 13, hash 4CC8C5C1 + sample 88: + time = 1760000 + flags = 1 + data = length 13, hash 19CC7523 + sample 89: + time = 1780000 + flags = 1 + data = length 13, hash 9BE7B928 + sample 90: + time = 1800000 + flags = 1 + data = length 13, hash 47EC7CFD + sample 91: + time = 1820000 + flags = 1 + data = length 13, hash EC940120 + sample 92: + time = 1840000 + flags = 1 + data = length 13, hash 73BDA6D0 + sample 93: + time = 1860000 + flags = 1 + data = length 13, hash FACB3314 + sample 94: + time = 1880000 + flags = 1 + data = length 13, hash EC61D13B + sample 95: + time = 1900000 + flags = 1 + data = length 13, hash B28C7B6C + sample 96: + time = 1920000 + flags = 1 + data = length 13, hash B1A4CECD + sample 97: + time = 1940000 + flags = 1 + data = length 13, hash 56D41BA6 + sample 98: + time = 1960000 + flags = 1 + data = length 13, hash 90499F4 + sample 99: + time = 1980000 + flags = 1 + data = length 13, hash 65D9A9D3 + sample 100: + time = 2000000 + flags = 1 + data = length 13, hash D9004CC + sample 101: + time = 2020000 + flags = 1 + data = length 13, hash 4139C6ED + sample 102: + time = 2040000 + flags = 1 + data = length 13, hash C4F8097C + sample 103: + time = 2060000 + flags = 1 + data = length 13, hash 94D424FA + sample 104: + time = 2080000 + flags = 1 + data = length 13, hash C2C6F5FD + sample 105: + time = 2100000 + flags = 1 + data = length 13, hash 15719008 + sample 106: + time = 2120000 + flags = 1 + data = length 13, hash 4F64F524 + sample 107: + time = 2140000 + flags = 1 + data = length 13, hash F9E01C1E + sample 108: + time = 2160000 + flags = 1 + data = length 13, hash 74C4EE74 + sample 109: + time = 2180000 + flags = 1 + data = length 13, hash 7EE7553D + sample 110: + time = 2200000 + flags = 1 + data = length 13, hash 62DE6539 + sample 111: + time = 2220000 + flags = 1 + data = length 13, hash 7F5EC222 + sample 112: + time = 2240000 + flags = 1 + data = length 13, hash 644067F + sample 113: + time = 2260000 + flags = 1 + data = length 13, hash CDF6C9DC + sample 114: + time = 2280000 + flags = 1 + data = length 13, hash 8B5DBC80 + sample 115: + time = 2300000 + flags = 1 + data = length 13, hash AD4BBA03 + sample 116: + time = 2320000 + flags = 1 + data = length 13, hash 7A76340 + sample 117: + time = 2340000 + flags = 1 + data = length 13, hash 3610F5B0 + sample 118: + time = 2360000 + flags = 1 + data = length 13, hash 430BC60B + sample 119: + time = 2380000 + flags = 1 + data = length 13, hash 99CF1CA6 + sample 120: + time = 2400000 + flags = 1 + data = length 13, hash 1331C70B + sample 121: + time = 2420000 + flags = 1 + data = length 13, hash BD76E69D + sample 122: + time = 2440000 + flags = 1 + data = length 13, hash 5DA652AC + sample 123: + time = 2460000 + flags = 1 + data = length 13, hash 3B7BF6CE + sample 124: + time = 2480000 + flags = 1 + data = length 13, hash ABBFD143 + sample 125: + time = 2500000 + flags = 1 + data = length 13, hash E9447166 + sample 126: + time = 2520000 + flags = 1 + data = length 13, hash EC40068C + sample 127: + time = 2540000 + flags = 1 + data = length 13, hash A2869400 + sample 128: + time = 2560000 + flags = 1 + data = length 13, hash C7E0746B + sample 129: + time = 2580000 + flags = 1 + data = length 13, hash 60601BB1 + sample 130: + time = 2600000 + flags = 1 + data = length 13, hash 975AAE9B + sample 131: + time = 2620000 + flags = 1 + data = length 13, hash 8BBC0EB2 + sample 132: + time = 2640000 + flags = 1 + data = length 13, hash 57FB39E5 + sample 133: + time = 2660000 + flags = 1 + data = length 13, hash 4CDCEEDB + sample 134: + time = 2680000 + flags = 1 + data = length 13, hash EA16E256 + sample 135: + time = 2700000 + flags = 1 + data = length 13, hash 287E7D9E + sample 136: + time = 2720000 + flags = 1 + data = length 13, hash 55AB8FB9 + sample 137: + time = 2740000 + flags = 1 + data = length 13, hash 129890EF + sample 138: + time = 2760000 + flags = 1 + data = length 13, hash 90834F57 + sample 139: + time = 2780000 + flags = 1 + data = length 13, hash 5B3228E0 + sample 140: + time = 2800000 + flags = 1 + data = length 13, hash DD19E175 + sample 141: + time = 2820000 + flags = 1 + data = length 13, hash EE7EA342 + sample 142: + time = 2840000 + flags = 1 + data = length 13, hash DB3AF473 + sample 143: + time = 2860000 + flags = 1 + data = length 13, hash 25AEC43F + sample 144: + time = 2880000 + flags = 1 + data = length 13, hash EE9BF97F + sample 145: + time = 2900000 + flags = 1 + data = length 13, hash FFFBE047 + sample 146: + time = 2920000 + flags = 1 + data = length 13, hash BEACFCB0 + sample 147: + time = 2940000 + flags = 1 + data = length 13, hash AEB5096C + sample 148: + time = 2960000 + flags = 1 + data = length 13, hash B0D381B + sample 149: + time = 2980000 + flags = 1 + data = length 13, hash 3D9D5122 + sample 150: + time = 3000000 + flags = 1 + data = length 13, hash 6C1DDB95 + sample 151: + time = 3020000 + flags = 1 + data = length 13, hash ADACADCF + sample 152: + time = 3040000 + flags = 1 + data = length 13, hash 159E321E + sample 153: + time = 3060000 + flags = 1 + data = length 13, hash B1466264 + sample 154: + time = 3080000 + flags = 1 + data = length 13, hash 4DDF7223 + sample 155: + time = 3100000 + flags = 1 + data = length 13, hash C9BDB82A + sample 156: + time = 3120000 + flags = 1 + data = length 13, hash A49B2D9D + sample 157: + time = 3140000 + flags = 1 + data = length 13, hash D645E7E5 + sample 158: + time = 3160000 + flags = 1 + data = length 13, hash 1C4232DC + sample 159: + time = 3180000 + flags = 1 + data = length 13, hash 83078219 + sample 160: + time = 3200000 + flags = 1 + data = length 13, hash D6D8B072 + sample 161: + time = 3220000 + flags = 1 + data = length 13, hash 975DB40 + sample 162: + time = 3240000 + flags = 1 + data = length 13, hash A15FDD05 + sample 163: + time = 3260000 + flags = 1 + data = length 13, hash 4B839E41 + sample 164: + time = 3280000 + flags = 1 + data = length 13, hash 7418F499 + sample 165: + time = 3300000 + flags = 1 + data = length 13, hash 7A4945E4 + sample 166: + time = 3320000 + flags = 1 + data = length 13, hash 6249558C + sample 167: + time = 3340000 + flags = 1 + data = length 13, hash BD4C5BE3 + sample 168: + time = 3360000 + flags = 1 + data = length 13, hash BAB30F1D + sample 169: + time = 3380000 + flags = 1 + data = length 13, hash 1E1C7012 + sample 170: + time = 3400000 + flags = 1 + data = length 13, hash 9A3F8A89 + sample 171: + time = 3420000 + flags = 1 + data = length 13, hash 20BE6D7B + sample 172: + time = 3440000 + flags = 1 + data = length 13, hash CAA0591D + sample 173: + time = 3460000 + flags = 1 + data = length 13, hash 6D554D17 + sample 174: + time = 3480000 + flags = 1 + data = length 13, hash D97C3B31 + sample 175: + time = 3500000 + flags = 1 + data = length 13, hash 75BC5C3 + sample 176: + time = 3520000 + flags = 1 + data = length 13, hash 7BA1784B + sample 177: + time = 3540000 + flags = 1 + data = length 13, hash 1D175D92 + sample 178: + time = 3560000 + flags = 1 + data = length 13, hash ADCA60FD + sample 179: + time = 3580000 + flags = 1 + data = length 13, hash 37018693 + sample 180: + time = 3600000 + flags = 1 + data = length 13, hash 4553606F + sample 181: + time = 3620000 + flags = 1 + data = length 13, hash CF434565 + sample 182: + time = 3640000 + flags = 1 + data = length 13, hash D264D757 + sample 183: + time = 3660000 + flags = 1 + data = length 13, hash 4FB493EF + sample 184: + time = 3680000 + flags = 1 + data = length 13, hash 919F53A + sample 185: + time = 3700000 + flags = 1 + data = length 13, hash C22B009B + sample 186: + time = 3720000 + flags = 1 + data = length 13, hash 5981470 + sample 187: + time = 3740000 + flags = 1 + data = length 13, hash A5D3937C + sample 188: + time = 3760000 + flags = 1 + data = length 13, hash A2504429 + sample 189: + time = 3780000 + flags = 1 + data = length 13, hash AD1B70BE + sample 190: + time = 3800000 + flags = 1 + data = length 13, hash 2E39ED5E + sample 191: + time = 3820000 + flags = 1 + data = length 13, hash 13A8BE8E + sample 192: + time = 3840000 + flags = 1 + data = length 13, hash 1ACD740B + sample 193: + time = 3860000 + flags = 1 + data = length 13, hash 80F38B3 + sample 194: + time = 3880000 + flags = 1 + data = length 13, hash DA9DA79F + sample 195: + time = 3900000 + flags = 1 + data = length 13, hash 21B95B7E + sample 196: + time = 3920000 + flags = 1 + data = length 13, hash CD22497B + sample 197: + time = 3940000 + flags = 1 + data = length 13, hash 718BB35D + sample 198: + time = 3960000 + flags = 1 + data = length 13, hash 69ABA6AD + sample 199: + time = 3980000 + flags = 1 + data = length 13, hash BAE19549 + sample 200: + time = 4000000 + flags = 1 + data = length 13, hash 2A792FB3 + sample 201: + time = 4020000 + flags = 1 + data = length 13, hash 71FCD8 + sample 202: + time = 4040000 + flags = 1 + data = length 13, hash 44D2B5B3 + sample 203: + time = 4060000 + flags = 1 + data = length 13, hash 1E87B11B + sample 204: + time = 4080000 + flags = 1 + data = length 13, hash 78CD2C11 + sample 205: + time = 4100000 + flags = 1 + data = length 13, hash 9F198DF0 + sample 206: + time = 4120000 + flags = 1 + data = length 13, hash B291F16A + sample 207: + time = 4140000 + flags = 1 + data = length 13, hash CF820EE0 + sample 208: + time = 4160000 + flags = 1 + data = length 13, hash 4E24F683 + sample 209: + time = 4180000 + flags = 1 + data = length 13, hash 52BCD68F + sample 210: + time = 4200000 + flags = 1 + data = length 13, hash 42588CB0 + sample 211: + time = 4220000 + flags = 1 + data = length 13, hash EBBFECA2 + sample 212: + time = 4240000 + flags = 1 + data = length 13, hash C11050CF + sample 213: + time = 4260000 + flags = 1 + data = length 13, hash 6F738603 + sample 214: + time = 4280000 + flags = 1 + data = length 13, hash DAD06E5 + sample 215: + time = 4300000 + flags = 1 + data = length 13, hash 5B036C64 + sample 216: + time = 4320000 + flags = 1 + data = length 13, hash A58DC12E + sample 217: + time = 4340000 + flags = 1 + data = length 13, hash AC59BA7C +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_nb_cbr.amr.1.dump b/library/core/src/test/assets/amr/sample_nb_cbr.amr.1.dump new file mode 100644 index 0000000000..d00ae65c7e --- /dev/null +++ b/library/core/src/test/assets/amr/sample_nb_cbr.amr.1.dump @@ -0,0 +1,614 @@ +seekMap: + isSeekable = true + duration = 4360000 + getPosition(0) = [[timeUs=0, position=6]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/3gpp + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 8000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 1898 + sample count = 146 + sample 0: + time = 1440000 + flags = 1 + data = length 13, hash 93BB890A + sample 1: + time = 1460000 + flags = 1 + data = length 13, hash B57DBEC8 + sample 2: + time = 1480000 + flags = 1 + data = length 13, hash 66B0A5B6 + sample 3: + time = 1500000 + flags = 1 + data = length 13, hash D733E0D + sample 4: + time = 1520000 + flags = 1 + data = length 13, hash 80941726 + sample 5: + time = 1540000 + flags = 1 + data = length 13, hash 556ED633 + sample 6: + time = 1560000 + flags = 1 + data = length 13, hash C5EDF4E1 + sample 7: + time = 1580000 + flags = 1 + data = length 13, hash 6B287445 + sample 8: + time = 1600000 + flags = 1 + data = length 13, hash DC97C4A7 + sample 9: + time = 1620000 + flags = 1 + data = length 13, hash DA8CBDF4 + sample 10: + time = 1640000 + flags = 1 + data = length 13, hash 6F60FF77 + sample 11: + time = 1660000 + flags = 1 + data = length 13, hash 3EB22B96 + sample 12: + time = 1680000 + flags = 1 + data = length 13, hash B3C31AF5 + sample 13: + time = 1700000 + flags = 1 + data = length 13, hash 1854AA92 + sample 14: + time = 1720000 + flags = 1 + data = length 13, hash 6488264B + sample 15: + time = 1740000 + flags = 1 + data = length 13, hash 4CC8C5C1 + sample 16: + time = 1760000 + flags = 1 + data = length 13, hash 19CC7523 + sample 17: + time = 1780000 + flags = 1 + data = length 13, hash 9BE7B928 + sample 18: + time = 1800000 + flags = 1 + data = length 13, hash 47EC7CFD + sample 19: + time = 1820000 + flags = 1 + data = length 13, hash EC940120 + sample 20: + time = 1840000 + flags = 1 + data = length 13, hash 73BDA6D0 + sample 21: + time = 1860000 + flags = 1 + data = length 13, hash FACB3314 + sample 22: + time = 1880000 + flags = 1 + data = length 13, hash EC61D13B + sample 23: + time = 1900000 + flags = 1 + data = length 13, hash B28C7B6C + sample 24: + time = 1920000 + flags = 1 + data = length 13, hash B1A4CECD + sample 25: + time = 1940000 + flags = 1 + data = length 13, hash 56D41BA6 + sample 26: + time = 1960000 + flags = 1 + data = length 13, hash 90499F4 + sample 27: + time = 1980000 + flags = 1 + data = length 13, hash 65D9A9D3 + sample 28: + time = 2000000 + flags = 1 + data = length 13, hash D9004CC + sample 29: + time = 2020000 + flags = 1 + data = length 13, hash 4139C6ED + sample 30: + time = 2040000 + flags = 1 + data = length 13, hash C4F8097C + sample 31: + time = 2060000 + flags = 1 + data = length 13, hash 94D424FA + sample 32: + time = 2080000 + flags = 1 + data = length 13, hash C2C6F5FD + sample 33: + time = 2100000 + flags = 1 + data = length 13, hash 15719008 + sample 34: + time = 2120000 + flags = 1 + data = length 13, hash 4F64F524 + sample 35: + time = 2140000 + flags = 1 + data = length 13, hash F9E01C1E + sample 36: + time = 2160000 + flags = 1 + data = length 13, hash 74C4EE74 + sample 37: + time = 2180000 + flags = 1 + data = length 13, hash 7EE7553D + sample 38: + time = 2200000 + flags = 1 + data = length 13, hash 62DE6539 + sample 39: + time = 2220000 + flags = 1 + data = length 13, hash 7F5EC222 + sample 40: + time = 2240000 + flags = 1 + data = length 13, hash 644067F + sample 41: + time = 2260000 + flags = 1 + data = length 13, hash CDF6C9DC + sample 42: + time = 2280000 + flags = 1 + data = length 13, hash 8B5DBC80 + sample 43: + time = 2300000 + flags = 1 + data = length 13, hash AD4BBA03 + sample 44: + time = 2320000 + flags = 1 + data = length 13, hash 7A76340 + sample 45: + time = 2340000 + flags = 1 + data = length 13, hash 3610F5B0 + sample 46: + time = 2360000 + flags = 1 + data = length 13, hash 430BC60B + sample 47: + time = 2380000 + flags = 1 + data = length 13, hash 99CF1CA6 + sample 48: + time = 2400000 + flags = 1 + data = length 13, hash 1331C70B + sample 49: + time = 2420000 + flags = 1 + data = length 13, hash BD76E69D + sample 50: + time = 2440000 + flags = 1 + data = length 13, hash 5DA652AC + sample 51: + time = 2460000 + flags = 1 + data = length 13, hash 3B7BF6CE + sample 52: + time = 2480000 + flags = 1 + data = length 13, hash ABBFD143 + sample 53: + time = 2500000 + flags = 1 + data = length 13, hash E9447166 + sample 54: + time = 2520000 + flags = 1 + data = length 13, hash EC40068C + sample 55: + time = 2540000 + flags = 1 + data = length 13, hash A2869400 + sample 56: + time = 2560000 + flags = 1 + data = length 13, hash C7E0746B + sample 57: + time = 2580000 + flags = 1 + data = length 13, hash 60601BB1 + sample 58: + time = 2600000 + flags = 1 + data = length 13, hash 975AAE9B + sample 59: + time = 2620000 + flags = 1 + data = length 13, hash 8BBC0EB2 + sample 60: + time = 2640000 + flags = 1 + data = length 13, hash 57FB39E5 + sample 61: + time = 2660000 + flags = 1 + data = length 13, hash 4CDCEEDB + sample 62: + time = 2680000 + flags = 1 + data = length 13, hash EA16E256 + sample 63: + time = 2700000 + flags = 1 + data = length 13, hash 287E7D9E + sample 64: + time = 2720000 + flags = 1 + data = length 13, hash 55AB8FB9 + sample 65: + time = 2740000 + flags = 1 + data = length 13, hash 129890EF + sample 66: + time = 2760000 + flags = 1 + data = length 13, hash 90834F57 + sample 67: + time = 2780000 + flags = 1 + data = length 13, hash 5B3228E0 + sample 68: + time = 2800000 + flags = 1 + data = length 13, hash DD19E175 + sample 69: + time = 2820000 + flags = 1 + data = length 13, hash EE7EA342 + sample 70: + time = 2840000 + flags = 1 + data = length 13, hash DB3AF473 + sample 71: + time = 2860000 + flags = 1 + data = length 13, hash 25AEC43F + sample 72: + time = 2880000 + flags = 1 + data = length 13, hash EE9BF97F + sample 73: + time = 2900000 + flags = 1 + data = length 13, hash FFFBE047 + sample 74: + time = 2920000 + flags = 1 + data = length 13, hash BEACFCB0 + sample 75: + time = 2940000 + flags = 1 + data = length 13, hash AEB5096C + sample 76: + time = 2960000 + flags = 1 + data = length 13, hash B0D381B + sample 77: + time = 2980000 + flags = 1 + data = length 13, hash 3D9D5122 + sample 78: + time = 3000000 + flags = 1 + data = length 13, hash 6C1DDB95 + sample 79: + time = 3020000 + flags = 1 + data = length 13, hash ADACADCF + sample 80: + time = 3040000 + flags = 1 + data = length 13, hash 159E321E + sample 81: + time = 3060000 + flags = 1 + data = length 13, hash B1466264 + sample 82: + time = 3080000 + flags = 1 + data = length 13, hash 4DDF7223 + sample 83: + time = 3100000 + flags = 1 + data = length 13, hash C9BDB82A + sample 84: + time = 3120000 + flags = 1 + data = length 13, hash A49B2D9D + sample 85: + time = 3140000 + flags = 1 + data = length 13, hash D645E7E5 + sample 86: + time = 3160000 + flags = 1 + data = length 13, hash 1C4232DC + sample 87: + time = 3180000 + flags = 1 + data = length 13, hash 83078219 + sample 88: + time = 3200000 + flags = 1 + data = length 13, hash D6D8B072 + sample 89: + time = 3220000 + flags = 1 + data = length 13, hash 975DB40 + sample 90: + time = 3240000 + flags = 1 + data = length 13, hash A15FDD05 + sample 91: + time = 3260000 + flags = 1 + data = length 13, hash 4B839E41 + sample 92: + time = 3280000 + flags = 1 + data = length 13, hash 7418F499 + sample 93: + time = 3300000 + flags = 1 + data = length 13, hash 7A4945E4 + sample 94: + time = 3320000 + flags = 1 + data = length 13, hash 6249558C + sample 95: + time = 3340000 + flags = 1 + data = length 13, hash BD4C5BE3 + sample 96: + time = 3360000 + flags = 1 + data = length 13, hash BAB30F1D + sample 97: + time = 3380000 + flags = 1 + data = length 13, hash 1E1C7012 + sample 98: + time = 3400000 + flags = 1 + data = length 13, hash 9A3F8A89 + sample 99: + time = 3420000 + flags = 1 + data = length 13, hash 20BE6D7B + sample 100: + time = 3440000 + flags = 1 + data = length 13, hash CAA0591D + sample 101: + time = 3460000 + flags = 1 + data = length 13, hash 6D554D17 + sample 102: + time = 3480000 + flags = 1 + data = length 13, hash D97C3B31 + sample 103: + time = 3500000 + flags = 1 + data = length 13, hash 75BC5C3 + sample 104: + time = 3520000 + flags = 1 + data = length 13, hash 7BA1784B + sample 105: + time = 3540000 + flags = 1 + data = length 13, hash 1D175D92 + sample 106: + time = 3560000 + flags = 1 + data = length 13, hash ADCA60FD + sample 107: + time = 3580000 + flags = 1 + data = length 13, hash 37018693 + sample 108: + time = 3600000 + flags = 1 + data = length 13, hash 4553606F + sample 109: + time = 3620000 + flags = 1 + data = length 13, hash CF434565 + sample 110: + time = 3640000 + flags = 1 + data = length 13, hash D264D757 + sample 111: + time = 3660000 + flags = 1 + data = length 13, hash 4FB493EF + sample 112: + time = 3680000 + flags = 1 + data = length 13, hash 919F53A + sample 113: + time = 3700000 + flags = 1 + data = length 13, hash C22B009B + sample 114: + time = 3720000 + flags = 1 + data = length 13, hash 5981470 + sample 115: + time = 3740000 + flags = 1 + data = length 13, hash A5D3937C + sample 116: + time = 3760000 + flags = 1 + data = length 13, hash A2504429 + sample 117: + time = 3780000 + flags = 1 + data = length 13, hash AD1B70BE + sample 118: + time = 3800000 + flags = 1 + data = length 13, hash 2E39ED5E + sample 119: + time = 3820000 + flags = 1 + data = length 13, hash 13A8BE8E + sample 120: + time = 3840000 + flags = 1 + data = length 13, hash 1ACD740B + sample 121: + time = 3860000 + flags = 1 + data = length 13, hash 80F38B3 + sample 122: + time = 3880000 + flags = 1 + data = length 13, hash DA9DA79F + sample 123: + time = 3900000 + flags = 1 + data = length 13, hash 21B95B7E + sample 124: + time = 3920000 + flags = 1 + data = length 13, hash CD22497B + sample 125: + time = 3940000 + flags = 1 + data = length 13, hash 718BB35D + sample 126: + time = 3960000 + flags = 1 + data = length 13, hash 69ABA6AD + sample 127: + time = 3980000 + flags = 1 + data = length 13, hash BAE19549 + sample 128: + time = 4000000 + flags = 1 + data = length 13, hash 2A792FB3 + sample 129: + time = 4020000 + flags = 1 + data = length 13, hash 71FCD8 + sample 130: + time = 4040000 + flags = 1 + data = length 13, hash 44D2B5B3 + sample 131: + time = 4060000 + flags = 1 + data = length 13, hash 1E87B11B + sample 132: + time = 4080000 + flags = 1 + data = length 13, hash 78CD2C11 + sample 133: + time = 4100000 + flags = 1 + data = length 13, hash 9F198DF0 + sample 134: + time = 4120000 + flags = 1 + data = length 13, hash B291F16A + sample 135: + time = 4140000 + flags = 1 + data = length 13, hash CF820EE0 + sample 136: + time = 4160000 + flags = 1 + data = length 13, hash 4E24F683 + sample 137: + time = 4180000 + flags = 1 + data = length 13, hash 52BCD68F + sample 138: + time = 4200000 + flags = 1 + data = length 13, hash 42588CB0 + sample 139: + time = 4220000 + flags = 1 + data = length 13, hash EBBFECA2 + sample 140: + time = 4240000 + flags = 1 + data = length 13, hash C11050CF + sample 141: + time = 4260000 + flags = 1 + data = length 13, hash 6F738603 + sample 142: + time = 4280000 + flags = 1 + data = length 13, hash DAD06E5 + sample 143: + time = 4300000 + flags = 1 + data = length 13, hash 5B036C64 + sample 144: + time = 4320000 + flags = 1 + data = length 13, hash A58DC12E + sample 145: + time = 4340000 + flags = 1 + data = length 13, hash AC59BA7C +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_nb_cbr.amr.2.dump b/library/core/src/test/assets/amr/sample_nb_cbr.amr.2.dump new file mode 100644 index 0000000000..f68b6df3a3 --- /dev/null +++ b/library/core/src/test/assets/amr/sample_nb_cbr.amr.2.dump @@ -0,0 +1,322 @@ +seekMap: + isSeekable = true + duration = 4360000 + getPosition(0) = [[timeUs=0, position=6]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/3gpp + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 8000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 949 + sample count = 73 + sample 0: + time = 2900000 + flags = 1 + data = length 13, hash FFFBE047 + sample 1: + time = 2920000 + flags = 1 + data = length 13, hash BEACFCB0 + sample 2: + time = 2940000 + flags = 1 + data = length 13, hash AEB5096C + sample 3: + time = 2960000 + flags = 1 + data = length 13, hash B0D381B + sample 4: + time = 2980000 + flags = 1 + data = length 13, hash 3D9D5122 + sample 5: + time = 3000000 + flags = 1 + data = length 13, hash 6C1DDB95 + sample 6: + time = 3020000 + flags = 1 + data = length 13, hash ADACADCF + sample 7: + time = 3040000 + flags = 1 + data = length 13, hash 159E321E + sample 8: + time = 3060000 + flags = 1 + data = length 13, hash B1466264 + sample 9: + time = 3080000 + flags = 1 + data = length 13, hash 4DDF7223 + sample 10: + time = 3100000 + flags = 1 + data = length 13, hash C9BDB82A + sample 11: + time = 3120000 + flags = 1 + data = length 13, hash A49B2D9D + sample 12: + time = 3140000 + flags = 1 + data = length 13, hash D645E7E5 + sample 13: + time = 3160000 + flags = 1 + data = length 13, hash 1C4232DC + sample 14: + time = 3180000 + flags = 1 + data = length 13, hash 83078219 + sample 15: + time = 3200000 + flags = 1 + data = length 13, hash D6D8B072 + sample 16: + time = 3220000 + flags = 1 + data = length 13, hash 975DB40 + sample 17: + time = 3240000 + flags = 1 + data = length 13, hash A15FDD05 + sample 18: + time = 3260000 + flags = 1 + data = length 13, hash 4B839E41 + sample 19: + time = 3280000 + flags = 1 + data = length 13, hash 7418F499 + sample 20: + time = 3300000 + flags = 1 + data = length 13, hash 7A4945E4 + sample 21: + time = 3320000 + flags = 1 + data = length 13, hash 6249558C + sample 22: + time = 3340000 + flags = 1 + data = length 13, hash BD4C5BE3 + sample 23: + time = 3360000 + flags = 1 + data = length 13, hash BAB30F1D + sample 24: + time = 3380000 + flags = 1 + data = length 13, hash 1E1C7012 + sample 25: + time = 3400000 + flags = 1 + data = length 13, hash 9A3F8A89 + sample 26: + time = 3420000 + flags = 1 + data = length 13, hash 20BE6D7B + sample 27: + time = 3440000 + flags = 1 + data = length 13, hash CAA0591D + sample 28: + time = 3460000 + flags = 1 + data = length 13, hash 6D554D17 + sample 29: + time = 3480000 + flags = 1 + data = length 13, hash D97C3B31 + sample 30: + time = 3500000 + flags = 1 + data = length 13, hash 75BC5C3 + sample 31: + time = 3520000 + flags = 1 + data = length 13, hash 7BA1784B + sample 32: + time = 3540000 + flags = 1 + data = length 13, hash 1D175D92 + sample 33: + time = 3560000 + flags = 1 + data = length 13, hash ADCA60FD + sample 34: + time = 3580000 + flags = 1 + data = length 13, hash 37018693 + sample 35: + time = 3600000 + flags = 1 + data = length 13, hash 4553606F + sample 36: + time = 3620000 + flags = 1 + data = length 13, hash CF434565 + sample 37: + time = 3640000 + flags = 1 + data = length 13, hash D264D757 + sample 38: + time = 3660000 + flags = 1 + data = length 13, hash 4FB493EF + sample 39: + time = 3680000 + flags = 1 + data = length 13, hash 919F53A + sample 40: + time = 3700000 + flags = 1 + data = length 13, hash C22B009B + sample 41: + time = 3720000 + flags = 1 + data = length 13, hash 5981470 + sample 42: + time = 3740000 + flags = 1 + data = length 13, hash A5D3937C + sample 43: + time = 3760000 + flags = 1 + data = length 13, hash A2504429 + sample 44: + time = 3780000 + flags = 1 + data = length 13, hash AD1B70BE + sample 45: + time = 3800000 + flags = 1 + data = length 13, hash 2E39ED5E + sample 46: + time = 3820000 + flags = 1 + data = length 13, hash 13A8BE8E + sample 47: + time = 3840000 + flags = 1 + data = length 13, hash 1ACD740B + sample 48: + time = 3860000 + flags = 1 + data = length 13, hash 80F38B3 + sample 49: + time = 3880000 + flags = 1 + data = length 13, hash DA9DA79F + sample 50: + time = 3900000 + flags = 1 + data = length 13, hash 21B95B7E + sample 51: + time = 3920000 + flags = 1 + data = length 13, hash CD22497B + sample 52: + time = 3940000 + flags = 1 + data = length 13, hash 718BB35D + sample 53: + time = 3960000 + flags = 1 + data = length 13, hash 69ABA6AD + sample 54: + time = 3980000 + flags = 1 + data = length 13, hash BAE19549 + sample 55: + time = 4000000 + flags = 1 + data = length 13, hash 2A792FB3 + sample 56: + time = 4020000 + flags = 1 + data = length 13, hash 71FCD8 + sample 57: + time = 4040000 + flags = 1 + data = length 13, hash 44D2B5B3 + sample 58: + time = 4060000 + flags = 1 + data = length 13, hash 1E87B11B + sample 59: + time = 4080000 + flags = 1 + data = length 13, hash 78CD2C11 + sample 60: + time = 4100000 + flags = 1 + data = length 13, hash 9F198DF0 + sample 61: + time = 4120000 + flags = 1 + data = length 13, hash B291F16A + sample 62: + time = 4140000 + flags = 1 + data = length 13, hash CF820EE0 + sample 63: + time = 4160000 + flags = 1 + data = length 13, hash 4E24F683 + sample 64: + time = 4180000 + flags = 1 + data = length 13, hash 52BCD68F + sample 65: + time = 4200000 + flags = 1 + data = length 13, hash 42588CB0 + sample 66: + time = 4220000 + flags = 1 + data = length 13, hash EBBFECA2 + sample 67: + time = 4240000 + flags = 1 + data = length 13, hash C11050CF + sample 68: + time = 4260000 + flags = 1 + data = length 13, hash 6F738603 + sample 69: + time = 4280000 + flags = 1 + data = length 13, hash DAD06E5 + sample 70: + time = 4300000 + flags = 1 + data = length 13, hash 5B036C64 + sample 71: + time = 4320000 + flags = 1 + data = length 13, hash A58DC12E + sample 72: + time = 4340000 + flags = 1 + data = length 13, hash AC59BA7C +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_nb_cbr.amr.3.dump b/library/core/src/test/assets/amr/sample_nb_cbr.amr.3.dump new file mode 100644 index 0000000000..da907e004f --- /dev/null +++ b/library/core/src/test/assets/amr/sample_nb_cbr.amr.3.dump @@ -0,0 +1,34 @@ +seekMap: + isSeekable = true + duration = 4360000 + getPosition(0) = [[timeUs=0, position=6]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/3gpp + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 8000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 13 + sample count = 1 + sample 0: + time = 4340000 + flags = 1 + data = length 13, hash AC59BA7C +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_nb_cbr.amr.unklen.dump b/library/core/src/test/assets/amr/sample_nb_cbr.amr.unklen.dump new file mode 100644 index 0000000000..e0dec9c62c --- /dev/null +++ b/library/core/src/test/assets/amr/sample_nb_cbr.amr.unklen.dump @@ -0,0 +1,902 @@ +seekMap: + isSeekable = false + duration = UNSET TIME + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/3gpp + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 8000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 2834 + sample count = 218 + sample 0: + time = 0 + flags = 1 + data = length 13, hash 371B046C + sample 1: + time = 20000 + flags = 1 + data = length 13, hash CE30BF5B + sample 2: + time = 40000 + flags = 1 + data = length 13, hash 19A59975 + sample 3: + time = 60000 + flags = 1 + data = length 13, hash 4879773C + sample 4: + time = 80000 + flags = 1 + data = length 13, hash E8F83019 + sample 5: + time = 100000 + flags = 1 + data = length 13, hash D265CDC9 + sample 6: + time = 120000 + flags = 1 + data = length 13, hash 91653DAA + sample 7: + time = 140000 + flags = 1 + data = length 13, hash C79456F6 + sample 8: + time = 160000 + flags = 1 + data = length 13, hash CDDC4422 + sample 9: + time = 180000 + flags = 1 + data = length 13, hash D9ED3AF1 + sample 10: + time = 200000 + flags = 1 + data = length 13, hash BAB75A33 + sample 11: + time = 220000 + flags = 1 + data = length 13, hash 2221B4FF + sample 12: + time = 240000 + flags = 1 + data = length 13, hash 96400A0B + sample 13: + time = 260000 + flags = 1 + data = length 13, hash 582E6FB + sample 14: + time = 280000 + flags = 1 + data = length 13, hash C4E878E5 + sample 15: + time = 300000 + flags = 1 + data = length 13, hash C849A1BD + sample 16: + time = 320000 + flags = 1 + data = length 13, hash CFA8A9ED + sample 17: + time = 340000 + flags = 1 + data = length 13, hash 70CA4907 + sample 18: + time = 360000 + flags = 1 + data = length 13, hash B47D4454 + sample 19: + time = 380000 + flags = 1 + data = length 13, hash 282998C1 + sample 20: + time = 400000 + flags = 1 + data = length 13, hash 3F3F7A65 + sample 21: + time = 420000 + flags = 1 + data = length 13, hash CC2EAB58 + sample 22: + time = 440000 + flags = 1 + data = length 13, hash 279EF712 + sample 23: + time = 460000 + flags = 1 + data = length 13, hash AA2F4B29 + sample 24: + time = 480000 + flags = 1 + data = length 13, hash F6F658C4 + sample 25: + time = 500000 + flags = 1 + data = length 13, hash D7DEBD17 + sample 26: + time = 520000 + flags = 1 + data = length 13, hash 6DAB9A17 + sample 27: + time = 540000 + flags = 1 + data = length 13, hash 6ECE1571 + sample 28: + time = 560000 + flags = 1 + data = length 13, hash B3D0507F + sample 29: + time = 580000 + flags = 1 + data = length 13, hash 21E356B9 + sample 30: + time = 600000 + flags = 1 + data = length 13, hash 410EA12 + sample 31: + time = 620000 + flags = 1 + data = length 13, hash 533895A8 + sample 32: + time = 640000 + flags = 1 + data = length 13, hash C61B3E5A + sample 33: + time = 660000 + flags = 1 + data = length 13, hash 982170E6 + sample 34: + time = 680000 + flags = 1 + data = length 13, hash 7A0468C5 + sample 35: + time = 700000 + flags = 1 + data = length 13, hash 9C85EAA7 + sample 36: + time = 720000 + flags = 1 + data = length 13, hash B6B341B6 + sample 37: + time = 740000 + flags = 1 + data = length 13, hash 6937532E + sample 38: + time = 760000 + flags = 1 + data = length 13, hash 8CF2A3A0 + sample 39: + time = 780000 + flags = 1 + data = length 13, hash D2682AC6 + sample 40: + time = 800000 + flags = 1 + data = length 13, hash BBC5710F + sample 41: + time = 820000 + flags = 1 + data = length 13, hash 59080B6C + sample 42: + time = 840000 + flags = 1 + data = length 13, hash E4118291 + sample 43: + time = 860000 + flags = 1 + data = length 13, hash A1E5B296 + sample 44: + time = 880000 + flags = 1 + data = length 13, hash D7B8F95B + sample 45: + time = 900000 + flags = 1 + data = length 13, hash CC839BE1 + sample 46: + time = 920000 + flags = 1 + data = length 13, hash D459DFCE + sample 47: + time = 940000 + flags = 1 + data = length 13, hash D6AD19EC + sample 48: + time = 960000 + flags = 1 + data = length 13, hash D05E373D + sample 49: + time = 980000 + flags = 1 + data = length 13, hash 6A4460C7 + sample 50: + time = 1000000 + flags = 1 + data = length 13, hash C9A0D93F + sample 51: + time = 1020000 + flags = 1 + data = length 13, hash 3FA819E7 + sample 52: + time = 1040000 + flags = 1 + data = length 13, hash 1D3CBDFC + sample 53: + time = 1060000 + flags = 1 + data = length 13, hash 8BBBB403 + sample 54: + time = 1080000 + flags = 1 + data = length 13, hash 21B4A0F9 + sample 55: + time = 1100000 + flags = 1 + data = length 13, hash C0F921D1 + sample 56: + time = 1120000 + flags = 1 + data = length 13, hash 5D812AAB + sample 57: + time = 1140000 + flags = 1 + data = length 13, hash 50C9F3F8 + sample 58: + time = 1160000 + flags = 1 + data = length 13, hash 5C2BB5D1 + sample 59: + time = 1180000 + flags = 1 + data = length 13, hash 6BF9BEA5 + sample 60: + time = 1200000 + flags = 1 + data = length 13, hash 2738C1E6 + sample 61: + time = 1220000 + flags = 1 + data = length 13, hash 5FC288A6 + sample 62: + time = 1240000 + flags = 1 + data = length 13, hash 7E8E442A + sample 63: + time = 1260000 + flags = 1 + data = length 13, hash AEAA2BBA + sample 64: + time = 1280000 + flags = 1 + data = length 13, hash 4E2ACD2F + sample 65: + time = 1300000 + flags = 1 + data = length 13, hash D6C90ACF + sample 66: + time = 1320000 + flags = 1 + data = length 13, hash 6FD8A944 + sample 67: + time = 1340000 + flags = 1 + data = length 13, hash A835BBF9 + sample 68: + time = 1360000 + flags = 1 + data = length 13, hash F7713830 + sample 69: + time = 1380000 + flags = 1 + data = length 13, hash 3AA966E5 + sample 70: + time = 1400000 + flags = 1 + data = length 13, hash F939E829 + sample 71: + time = 1420000 + flags = 1 + data = length 13, hash 7676DE49 + sample 72: + time = 1440000 + flags = 1 + data = length 13, hash 93BB890A + sample 73: + time = 1460000 + flags = 1 + data = length 13, hash B57DBEC8 + sample 74: + time = 1480000 + flags = 1 + data = length 13, hash 66B0A5B6 + sample 75: + time = 1500000 + flags = 1 + data = length 13, hash D733E0D + sample 76: + time = 1520000 + flags = 1 + data = length 13, hash 80941726 + sample 77: + time = 1540000 + flags = 1 + data = length 13, hash 556ED633 + sample 78: + time = 1560000 + flags = 1 + data = length 13, hash C5EDF4E1 + sample 79: + time = 1580000 + flags = 1 + data = length 13, hash 6B287445 + sample 80: + time = 1600000 + flags = 1 + data = length 13, hash DC97C4A7 + sample 81: + time = 1620000 + flags = 1 + data = length 13, hash DA8CBDF4 + sample 82: + time = 1640000 + flags = 1 + data = length 13, hash 6F60FF77 + sample 83: + time = 1660000 + flags = 1 + data = length 13, hash 3EB22B96 + sample 84: + time = 1680000 + flags = 1 + data = length 13, hash B3C31AF5 + sample 85: + time = 1700000 + flags = 1 + data = length 13, hash 1854AA92 + sample 86: + time = 1720000 + flags = 1 + data = length 13, hash 6488264B + sample 87: + time = 1740000 + flags = 1 + data = length 13, hash 4CC8C5C1 + sample 88: + time = 1760000 + flags = 1 + data = length 13, hash 19CC7523 + sample 89: + time = 1780000 + flags = 1 + data = length 13, hash 9BE7B928 + sample 90: + time = 1800000 + flags = 1 + data = length 13, hash 47EC7CFD + sample 91: + time = 1820000 + flags = 1 + data = length 13, hash EC940120 + sample 92: + time = 1840000 + flags = 1 + data = length 13, hash 73BDA6D0 + sample 93: + time = 1860000 + flags = 1 + data = length 13, hash FACB3314 + sample 94: + time = 1880000 + flags = 1 + data = length 13, hash EC61D13B + sample 95: + time = 1900000 + flags = 1 + data = length 13, hash B28C7B6C + sample 96: + time = 1920000 + flags = 1 + data = length 13, hash B1A4CECD + sample 97: + time = 1940000 + flags = 1 + data = length 13, hash 56D41BA6 + sample 98: + time = 1960000 + flags = 1 + data = length 13, hash 90499F4 + sample 99: + time = 1980000 + flags = 1 + data = length 13, hash 65D9A9D3 + sample 100: + time = 2000000 + flags = 1 + data = length 13, hash D9004CC + sample 101: + time = 2020000 + flags = 1 + data = length 13, hash 4139C6ED + sample 102: + time = 2040000 + flags = 1 + data = length 13, hash C4F8097C + sample 103: + time = 2060000 + flags = 1 + data = length 13, hash 94D424FA + sample 104: + time = 2080000 + flags = 1 + data = length 13, hash C2C6F5FD + sample 105: + time = 2100000 + flags = 1 + data = length 13, hash 15719008 + sample 106: + time = 2120000 + flags = 1 + data = length 13, hash 4F64F524 + sample 107: + time = 2140000 + flags = 1 + data = length 13, hash F9E01C1E + sample 108: + time = 2160000 + flags = 1 + data = length 13, hash 74C4EE74 + sample 109: + time = 2180000 + flags = 1 + data = length 13, hash 7EE7553D + sample 110: + time = 2200000 + flags = 1 + data = length 13, hash 62DE6539 + sample 111: + time = 2220000 + flags = 1 + data = length 13, hash 7F5EC222 + sample 112: + time = 2240000 + flags = 1 + data = length 13, hash 644067F + sample 113: + time = 2260000 + flags = 1 + data = length 13, hash CDF6C9DC + sample 114: + time = 2280000 + flags = 1 + data = length 13, hash 8B5DBC80 + sample 115: + time = 2300000 + flags = 1 + data = length 13, hash AD4BBA03 + sample 116: + time = 2320000 + flags = 1 + data = length 13, hash 7A76340 + sample 117: + time = 2340000 + flags = 1 + data = length 13, hash 3610F5B0 + sample 118: + time = 2360000 + flags = 1 + data = length 13, hash 430BC60B + sample 119: + time = 2380000 + flags = 1 + data = length 13, hash 99CF1CA6 + sample 120: + time = 2400000 + flags = 1 + data = length 13, hash 1331C70B + sample 121: + time = 2420000 + flags = 1 + data = length 13, hash BD76E69D + sample 122: + time = 2440000 + flags = 1 + data = length 13, hash 5DA652AC + sample 123: + time = 2460000 + flags = 1 + data = length 13, hash 3B7BF6CE + sample 124: + time = 2480000 + flags = 1 + data = length 13, hash ABBFD143 + sample 125: + time = 2500000 + flags = 1 + data = length 13, hash E9447166 + sample 126: + time = 2520000 + flags = 1 + data = length 13, hash EC40068C + sample 127: + time = 2540000 + flags = 1 + data = length 13, hash A2869400 + sample 128: + time = 2560000 + flags = 1 + data = length 13, hash C7E0746B + sample 129: + time = 2580000 + flags = 1 + data = length 13, hash 60601BB1 + sample 130: + time = 2600000 + flags = 1 + data = length 13, hash 975AAE9B + sample 131: + time = 2620000 + flags = 1 + data = length 13, hash 8BBC0EB2 + sample 132: + time = 2640000 + flags = 1 + data = length 13, hash 57FB39E5 + sample 133: + time = 2660000 + flags = 1 + data = length 13, hash 4CDCEEDB + sample 134: + time = 2680000 + flags = 1 + data = length 13, hash EA16E256 + sample 135: + time = 2700000 + flags = 1 + data = length 13, hash 287E7D9E + sample 136: + time = 2720000 + flags = 1 + data = length 13, hash 55AB8FB9 + sample 137: + time = 2740000 + flags = 1 + data = length 13, hash 129890EF + sample 138: + time = 2760000 + flags = 1 + data = length 13, hash 90834F57 + sample 139: + time = 2780000 + flags = 1 + data = length 13, hash 5B3228E0 + sample 140: + time = 2800000 + flags = 1 + data = length 13, hash DD19E175 + sample 141: + time = 2820000 + flags = 1 + data = length 13, hash EE7EA342 + sample 142: + time = 2840000 + flags = 1 + data = length 13, hash DB3AF473 + sample 143: + time = 2860000 + flags = 1 + data = length 13, hash 25AEC43F + sample 144: + time = 2880000 + flags = 1 + data = length 13, hash EE9BF97F + sample 145: + time = 2900000 + flags = 1 + data = length 13, hash FFFBE047 + sample 146: + time = 2920000 + flags = 1 + data = length 13, hash BEACFCB0 + sample 147: + time = 2940000 + flags = 1 + data = length 13, hash AEB5096C + sample 148: + time = 2960000 + flags = 1 + data = length 13, hash B0D381B + sample 149: + time = 2980000 + flags = 1 + data = length 13, hash 3D9D5122 + sample 150: + time = 3000000 + flags = 1 + data = length 13, hash 6C1DDB95 + sample 151: + time = 3020000 + flags = 1 + data = length 13, hash ADACADCF + sample 152: + time = 3040000 + flags = 1 + data = length 13, hash 159E321E + sample 153: + time = 3060000 + flags = 1 + data = length 13, hash B1466264 + sample 154: + time = 3080000 + flags = 1 + data = length 13, hash 4DDF7223 + sample 155: + time = 3100000 + flags = 1 + data = length 13, hash C9BDB82A + sample 156: + time = 3120000 + flags = 1 + data = length 13, hash A49B2D9D + sample 157: + time = 3140000 + flags = 1 + data = length 13, hash D645E7E5 + sample 158: + time = 3160000 + flags = 1 + data = length 13, hash 1C4232DC + sample 159: + time = 3180000 + flags = 1 + data = length 13, hash 83078219 + sample 160: + time = 3200000 + flags = 1 + data = length 13, hash D6D8B072 + sample 161: + time = 3220000 + flags = 1 + data = length 13, hash 975DB40 + sample 162: + time = 3240000 + flags = 1 + data = length 13, hash A15FDD05 + sample 163: + time = 3260000 + flags = 1 + data = length 13, hash 4B839E41 + sample 164: + time = 3280000 + flags = 1 + data = length 13, hash 7418F499 + sample 165: + time = 3300000 + flags = 1 + data = length 13, hash 7A4945E4 + sample 166: + time = 3320000 + flags = 1 + data = length 13, hash 6249558C + sample 167: + time = 3340000 + flags = 1 + data = length 13, hash BD4C5BE3 + sample 168: + time = 3360000 + flags = 1 + data = length 13, hash BAB30F1D + sample 169: + time = 3380000 + flags = 1 + data = length 13, hash 1E1C7012 + sample 170: + time = 3400000 + flags = 1 + data = length 13, hash 9A3F8A89 + sample 171: + time = 3420000 + flags = 1 + data = length 13, hash 20BE6D7B + sample 172: + time = 3440000 + flags = 1 + data = length 13, hash CAA0591D + sample 173: + time = 3460000 + flags = 1 + data = length 13, hash 6D554D17 + sample 174: + time = 3480000 + flags = 1 + data = length 13, hash D97C3B31 + sample 175: + time = 3500000 + flags = 1 + data = length 13, hash 75BC5C3 + sample 176: + time = 3520000 + flags = 1 + data = length 13, hash 7BA1784B + sample 177: + time = 3540000 + flags = 1 + data = length 13, hash 1D175D92 + sample 178: + time = 3560000 + flags = 1 + data = length 13, hash ADCA60FD + sample 179: + time = 3580000 + flags = 1 + data = length 13, hash 37018693 + sample 180: + time = 3600000 + flags = 1 + data = length 13, hash 4553606F + sample 181: + time = 3620000 + flags = 1 + data = length 13, hash CF434565 + sample 182: + time = 3640000 + flags = 1 + data = length 13, hash D264D757 + sample 183: + time = 3660000 + flags = 1 + data = length 13, hash 4FB493EF + sample 184: + time = 3680000 + flags = 1 + data = length 13, hash 919F53A + sample 185: + time = 3700000 + flags = 1 + data = length 13, hash C22B009B + sample 186: + time = 3720000 + flags = 1 + data = length 13, hash 5981470 + sample 187: + time = 3740000 + flags = 1 + data = length 13, hash A5D3937C + sample 188: + time = 3760000 + flags = 1 + data = length 13, hash A2504429 + sample 189: + time = 3780000 + flags = 1 + data = length 13, hash AD1B70BE + sample 190: + time = 3800000 + flags = 1 + data = length 13, hash 2E39ED5E + sample 191: + time = 3820000 + flags = 1 + data = length 13, hash 13A8BE8E + sample 192: + time = 3840000 + flags = 1 + data = length 13, hash 1ACD740B + sample 193: + time = 3860000 + flags = 1 + data = length 13, hash 80F38B3 + sample 194: + time = 3880000 + flags = 1 + data = length 13, hash DA9DA79F + sample 195: + time = 3900000 + flags = 1 + data = length 13, hash 21B95B7E + sample 196: + time = 3920000 + flags = 1 + data = length 13, hash CD22497B + sample 197: + time = 3940000 + flags = 1 + data = length 13, hash 718BB35D + sample 198: + time = 3960000 + flags = 1 + data = length 13, hash 69ABA6AD + sample 199: + time = 3980000 + flags = 1 + data = length 13, hash BAE19549 + sample 200: + time = 4000000 + flags = 1 + data = length 13, hash 2A792FB3 + sample 201: + time = 4020000 + flags = 1 + data = length 13, hash 71FCD8 + sample 202: + time = 4040000 + flags = 1 + data = length 13, hash 44D2B5B3 + sample 203: + time = 4060000 + flags = 1 + data = length 13, hash 1E87B11B + sample 204: + time = 4080000 + flags = 1 + data = length 13, hash 78CD2C11 + sample 205: + time = 4100000 + flags = 1 + data = length 13, hash 9F198DF0 + sample 206: + time = 4120000 + flags = 1 + data = length 13, hash B291F16A + sample 207: + time = 4140000 + flags = 1 + data = length 13, hash CF820EE0 + sample 208: + time = 4160000 + flags = 1 + data = length 13, hash 4E24F683 + sample 209: + time = 4180000 + flags = 1 + data = length 13, hash 52BCD68F + sample 210: + time = 4200000 + flags = 1 + data = length 13, hash 42588CB0 + sample 211: + time = 4220000 + flags = 1 + data = length 13, hash EBBFECA2 + sample 212: + time = 4240000 + flags = 1 + data = length 13, hash C11050CF + sample 213: + time = 4260000 + flags = 1 + data = length 13, hash 6F738603 + sample 214: + time = 4280000 + flags = 1 + data = length 13, hash DAD06E5 + sample 215: + time = 4300000 + flags = 1 + data = length 13, hash 5B036C64 + sample 216: + time = 4320000 + flags = 1 + data = length 13, hash A58DC12E + sample 217: + time = 4340000 + flags = 1 + data = length 13, hash AC59BA7C +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_wb_cbr.amr b/library/core/src/test/assets/amr/sample_wb_cbr.amr new file mode 100644 index 0000000000000000000000000000000000000000..14b85b553c5ea842da30eb875b2d6581bed14152 GIT binary patch literal 4065 zcmWlcc{r5q7snq_w#OKxB4kS=5t0zuvW;PEsgPZf<+YZr-Wf8M5Rzm|mVWm2wN&<( zu@8pqF_yQ++7KC$e)s(KT-WD1*Y}+JJZHIY2{COG3)$N`9PpR}k-clAz}sF$kMkAx zfW7_t_-=~>4z7aQattfi&f*ojT}1zy9`9|The&>b;Am<)oyo(sEZ(MdwQ#WWf9<;* zH3&`|9F=PN5B3qOF#7SGca~|diY+ib*jqa|c!X*p9veVVWACP4`5H0OW=s_s(X9gZ z4JXDN;B#_UzLq2h!S^3lSP_5ge}G_uv729ml980+P*8?DkXJOC`ws~f>su0I z77@E95(GI(2;Ls!%uskvw8C~nSeMt2$HOzQ->bbL_`PMC|4cV=)}+|5_K}z2?I`;I zOD1k$KV2B?H*a8j=5)&Rz~Tz#pM!cfFskkaBUY_%T1`Z`ejc!9v<&TWH){c_)XRO3nvX}*$NoS^jX7<4&}>cd#n&V zE^347x*=QmQdbywk-I>Ge<#Sg)+DIL?eJ>7eKD7WoUn*5{_%` zf-GstG_H^-o8b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2cXm(;Y~y0A=!j)?`V$)8rh!NZ)<@(UN&vU?Nkx9tgR z=F-kyIU`_hw{gFq*H(InuJBD74Bk(MZVp;~{9KO%9KW&@arX)$((PyF9e%Uw$+{Yi z6b4VC(q711KBw0I(uo#}tUb1hT$$gAA9H)9p^9xaTiCaNFI@t}&dBvbihwJhmT_YYWBJA$_F$zQHP;Q87-0|73UP`A5wsyz6n z_$^AZE_6MW+FS79vErafrb(F02&ed#dR0MrpW6*6Iuax>G zJOQ66gM(iqCw$}dxhD0^JUTrPb@p2q{3}$+IQSLP*UqbyuPn}WqTA46QlYR=rwJ+)~=<`FX?U%`tyCkP<>Pi_>NN5vG&+J&!=1uNYvxZ7p4c;mD<6(X6q6x z71!-EpyM`bO!VVKNd8Yu0o2c!AL5+akuJvJ%a(a~pUuYKKjK2_o`U%p64Qx91W&pjrkAsR*v+{1I_64~CQsl2HWIEbe% zIrb-p^$W5?@DGaS3z(PLhGR3U3p;G_R<7L9G_3^0Gr~qANZh)i+u0lG7I6tVmO;KC fJO=Jp`v!7?9@Y+=1D=-Z+oK2m;^7ViJKX;P%;tK` literal 0 HcmV?d00001 diff --git a/library/core/src/test/assets/amr/sample_wb_cbr.amr.0.dump b/library/core/src/test/assets/amr/sample_wb_cbr.amr.0.dump new file mode 100644 index 0000000000..c987c6e357 --- /dev/null +++ b/library/core/src/test/assets/amr/sample_wb_cbr.amr.0.dump @@ -0,0 +1,706 @@ +seekMap: + isSeekable = true + duration = 3380000 + getPosition(0) = [[timeUs=0, position=9]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/amr-wb + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 16000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 4056 + sample count = 169 + sample 0: + time = 0 + flags = 1 + data = length 24, hash C3025798 + sample 1: + time = 20000 + flags = 1 + data = length 24, hash 39CABAE9 + sample 2: + time = 40000 + flags = 1 + data = length 24, hash 2752F470 + sample 3: + time = 60000 + flags = 1 + data = length 24, hash 394F76F6 + sample 4: + time = 80000 + flags = 1 + data = length 24, hash FF9EEF + sample 5: + time = 100000 + flags = 1 + data = length 24, hash 54ECB1B4 + sample 6: + time = 120000 + flags = 1 + data = length 24, hash 6D7A3A5F + sample 7: + time = 140000 + flags = 1 + data = length 24, hash 684CD144 + sample 8: + time = 160000 + flags = 1 + data = length 24, hash 87B7D176 + sample 9: + time = 180000 + flags = 1 + data = length 24, hash 4C02F9A5 + sample 10: + time = 200000 + flags = 1 + data = length 24, hash B4154108 + sample 11: + time = 220000 + flags = 1 + data = length 24, hash 4448F477 + sample 12: + time = 240000 + flags = 1 + data = length 24, hash 755A4939 + sample 13: + time = 260000 + flags = 1 + data = length 24, hash 8C8BC6C3 + sample 14: + time = 280000 + flags = 1 + data = length 24, hash BC37F63F + sample 15: + time = 300000 + flags = 1 + data = length 24, hash 3352C43C + sample 16: + time = 320000 + flags = 1 + data = length 24, hash 7998E1F2 + sample 17: + time = 340000 + flags = 1 + data = length 24, hash A8ECBEFC + sample 18: + time = 360000 + flags = 1 + data = length 24, hash 944AC118 + sample 19: + time = 380000 + flags = 1 + data = length 24, hash FD2C8E1F + sample 20: + time = 400000 + flags = 1 + data = length 24, hash B3D867AF + sample 21: + time = 420000 + flags = 1 + data = length 24, hash 3DC6E592 + sample 22: + time = 440000 + flags = 1 + data = length 24, hash 32B276CD + sample 23: + time = 460000 + flags = 1 + data = length 24, hash 5488AEF3 + sample 24: + time = 480000 + flags = 1 + data = length 24, hash 7A4D516 + sample 25: + time = 500000 + flags = 1 + data = length 24, hash 570AE83F + sample 26: + time = 520000 + flags = 1 + data = length 24, hash E5CB3477 + sample 27: + time = 540000 + flags = 1 + data = length 24, hash E04C00E4 + sample 28: + time = 560000 + flags = 1 + data = length 24, hash 21B7C97 + sample 29: + time = 580000 + flags = 1 + data = length 24, hash 1633F470 + sample 30: + time = 600000 + flags = 1 + data = length 24, hash 28D65CA6 + sample 31: + time = 620000 + flags = 1 + data = length 24, hash CC6A675C + sample 32: + time = 640000 + flags = 1 + data = length 24, hash 4C91080A + sample 33: + time = 660000 + flags = 1 + data = length 24, hash F6482FB5 + sample 34: + time = 680000 + flags = 1 + data = length 24, hash 2C76F48C + sample 35: + time = 700000 + flags = 1 + data = length 24, hash 6E3B0D72 + sample 36: + time = 720000 + flags = 1 + data = length 24, hash 799AA003 + sample 37: + time = 740000 + flags = 1 + data = length 24, hash DFC0BA81 + sample 38: + time = 760000 + flags = 1 + data = length 24, hash CBDF3826 + sample 39: + time = 780000 + flags = 1 + data = length 24, hash 16862B75 + sample 40: + time = 800000 + flags = 1 + data = length 24, hash 865A828E + sample 41: + time = 820000 + flags = 1 + data = length 24, hash 336BBDC9 + sample 42: + time = 840000 + flags = 1 + data = length 24, hash 6CFC6C34 + sample 43: + time = 860000 + flags = 1 + data = length 24, hash 32C8CD46 + sample 44: + time = 880000 + flags = 1 + data = length 24, hash 9FE11C4C + sample 45: + time = 900000 + flags = 1 + data = length 24, hash AA5A12B7 + sample 46: + time = 920000 + flags = 1 + data = length 24, hash AA0F4A4D + sample 47: + time = 940000 + flags = 1 + data = length 24, hash 34415484 + sample 48: + time = 960000 + flags = 1 + data = length 24, hash 5018928E + sample 49: + time = 980000 + flags = 1 + data = length 24, hash 4A04D162 + sample 50: + time = 1000000 + flags = 1 + data = length 24, hash 4C70F9F0 + sample 51: + time = 1020000 + flags = 1 + data = length 24, hash 99EF3168 + sample 52: + time = 1040000 + flags = 1 + data = length 24, hash C600DAF + sample 53: + time = 1060000 + flags = 1 + data = length 24, hash FDBB192E + sample 54: + time = 1080000 + flags = 1 + data = length 24, hash 99096A48 + sample 55: + time = 1100000 + flags = 1 + data = length 24, hash D793F88B + sample 56: + time = 1120000 + flags = 1 + data = length 24, hash EEB921BD + sample 57: + time = 1140000 + flags = 1 + data = length 24, hash 8B941A4C + sample 58: + time = 1160000 + flags = 1 + data = length 24, hash ED5F5FEE + sample 59: + time = 1180000 + flags = 1 + data = length 24, hash A588E0BB + sample 60: + time = 1200000 + flags = 1 + data = length 24, hash 588CBC01 + sample 61: + time = 1220000 + flags = 1 + data = length 24, hash DE22266C + sample 62: + time = 1240000 + flags = 1 + data = length 24, hash 921B6E5C + sample 63: + time = 1260000 + flags = 1 + data = length 24, hash EC11F041 + sample 64: + time = 1280000 + flags = 1 + data = length 24, hash 5BA9E0A3 + sample 65: + time = 1300000 + flags = 1 + data = length 24, hash DB6D52F3 + sample 66: + time = 1320000 + flags = 1 + data = length 24, hash 8EEBE525 + sample 67: + time = 1340000 + flags = 1 + data = length 24, hash 47A742AE + sample 68: + time = 1360000 + flags = 1 + data = length 24, hash E93F1E03 + sample 69: + time = 1380000 + flags = 1 + data = length 24, hash 3251F57C + sample 70: + time = 1400000 + flags = 1 + data = length 24, hash 3EDBBBDD + sample 71: + time = 1420000 + flags = 1 + data = length 24, hash 2E98465A + sample 72: + time = 1440000 + flags = 1 + data = length 24, hash A09EA52E + sample 73: + time = 1460000 + flags = 1 + data = length 24, hash A2A86FA6 + sample 74: + time = 1480000 + flags = 1 + data = length 24, hash 71DCD51C + sample 75: + time = 1500000 + flags = 1 + data = length 24, hash 2B02DEE1 + sample 76: + time = 1520000 + flags = 1 + data = length 24, hash 7A725192 + sample 77: + time = 1540000 + flags = 1 + data = length 24, hash 929AD483 + sample 78: + time = 1560000 + flags = 1 + data = length 24, hash 68440BF5 + sample 79: + time = 1580000 + flags = 1 + data = length 24, hash 5BD41AD6 + sample 80: + time = 1600000 + flags = 1 + data = length 24, hash 91A381 + sample 81: + time = 1620000 + flags = 1 + data = length 24, hash 8010C408 + sample 82: + time = 1640000 + flags = 1 + data = length 24, hash 482274BE + sample 83: + time = 1660000 + flags = 1 + data = length 24, hash D7DB8BCC + sample 84: + time = 1680000 + flags = 1 + data = length 24, hash 680BD9DD + sample 85: + time = 1700000 + flags = 1 + data = length 24, hash E313577C + sample 86: + time = 1720000 + flags = 1 + data = length 24, hash 9C10B0CD + sample 87: + time = 1740000 + flags = 1 + data = length 24, hash 2D90AC02 + sample 88: + time = 1760000 + flags = 1 + data = length 24, hash 64E8C245 + sample 89: + time = 1780000 + flags = 1 + data = length 24, hash 3954AC1B + sample 90: + time = 1800000 + flags = 1 + data = length 24, hash ACB8999F + sample 91: + time = 1820000 + flags = 1 + data = length 24, hash 43AE3957 + sample 92: + time = 1840000 + flags = 1 + data = length 24, hash 3C664DB7 + sample 93: + time = 1860000 + flags = 1 + data = length 24, hash 9354B576 + sample 94: + time = 1880000 + flags = 1 + data = length 24, hash B5B9C14E + sample 95: + time = 1900000 + flags = 1 + data = length 24, hash 7DA9C98F + sample 96: + time = 1920000 + flags = 1 + data = length 24, hash EFEE54C6 + sample 97: + time = 1940000 + flags = 1 + data = length 24, hash 79DC8CBD + sample 98: + time = 1960000 + flags = 1 + data = length 24, hash A71A475C + sample 99: + time = 1980000 + flags = 1 + data = length 24, hash CA1CBB94 + sample 100: + time = 2000000 + flags = 1 + data = length 24, hash 91922226 + sample 101: + time = 2020000 + flags = 1 + data = length 24, hash C90278BC + sample 102: + time = 2040000 + flags = 1 + data = length 24, hash BD51986F + sample 103: + time = 2060000 + flags = 1 + data = length 24, hash 90AEF368 + sample 104: + time = 2080000 + flags = 1 + data = length 24, hash 1D83C955 + sample 105: + time = 2100000 + flags = 1 + data = length 24, hash 8FA9A915 + sample 106: + time = 2120000 + flags = 1 + data = length 24, hash C6C753E0 + sample 107: + time = 2140000 + flags = 1 + data = length 24, hash 85FA27A7 + sample 108: + time = 2160000 + flags = 1 + data = length 24, hash A0277324 + sample 109: + time = 2180000 + flags = 1 + data = length 24, hash B7696535 + sample 110: + time = 2200000 + flags = 1 + data = length 24, hash D69D668C + sample 111: + time = 2220000 + flags = 1 + data = length 24, hash 34C057CD + sample 112: + time = 2240000 + flags = 1 + data = length 24, hash 4EC5E974 + sample 113: + time = 2260000 + flags = 1 + data = length 24, hash 1C1CD40D + sample 114: + time = 2280000 + flags = 1 + data = length 24, hash 76CC54BC + sample 115: + time = 2300000 + flags = 1 + data = length 24, hash D497ACF5 + sample 116: + time = 2320000 + flags = 1 + data = length 24, hash A1386080 + sample 117: + time = 2340000 + flags = 1 + data = length 24, hash 7ED36954 + sample 118: + time = 2360000 + flags = 1 + data = length 24, hash C11A3BF9 + sample 119: + time = 2380000 + flags = 1 + data = length 24, hash 8FB69488 + sample 120: + time = 2400000 + flags = 1 + data = length 24, hash C6225F59 + sample 121: + time = 2420000 + flags = 1 + data = length 24, hash 122AB6D2 + sample 122: + time = 2440000 + flags = 1 + data = length 24, hash 1E195E7D + sample 123: + time = 2460000 + flags = 1 + data = length 24, hash BD3DF418 + sample 124: + time = 2480000 + flags = 1 + data = length 24, hash D8AE4A5 + sample 125: + time = 2500000 + flags = 1 + data = length 24, hash 977BD182 + sample 126: + time = 2520000 + flags = 1 + data = length 24, hash F361F060 + sample 127: + time = 2540000 + flags = 1 + data = length 24, hash 11EC8CD0 + sample 128: + time = 2560000 + flags = 1 + data = length 24, hash 3798F3D2 + sample 129: + time = 2580000 + flags = 1 + data = length 24, hash B2C2517C + sample 130: + time = 2600000 + flags = 1 + data = length 24, hash FBE0D0D8 + sample 131: + time = 2620000 + flags = 1 + data = length 24, hash 7033172F + sample 132: + time = 2640000 + flags = 1 + data = length 24, hash BE760029 + sample 133: + time = 2660000 + flags = 1 + data = length 24, hash 590AF28C + sample 134: + time = 2680000 + flags = 1 + data = length 24, hash AD28C48F + sample 135: + time = 2700000 + flags = 1 + data = length 24, hash 640AA61B + sample 136: + time = 2720000 + flags = 1 + data = length 24, hash ABE659B + sample 137: + time = 2740000 + flags = 1 + data = length 24, hash ED2691D2 + sample 138: + time = 2760000 + flags = 1 + data = length 24, hash D998C80E + sample 139: + time = 2780000 + flags = 1 + data = length 24, hash 8DC0DF5C + sample 140: + time = 2800000 + flags = 1 + data = length 24, hash 7692247B + sample 141: + time = 2820000 + flags = 1 + data = length 24, hash C1D1CCB9 + sample 142: + time = 2840000 + flags = 1 + data = length 24, hash 362CE78E + sample 143: + time = 2860000 + flags = 1 + data = length 24, hash 54FA84A + sample 144: + time = 2880000 + flags = 1 + data = length 24, hash 29E88C84 + sample 145: + time = 2900000 + flags = 1 + data = length 24, hash 1CD848AC + sample 146: + time = 2920000 + flags = 1 + data = length 24, hash 5C3D4A79 + sample 147: + time = 2940000 + flags = 1 + data = length 24, hash 1AA8E604 + sample 148: + time = 2960000 + flags = 1 + data = length 24, hash 186A4316 + sample 149: + time = 2980000 + flags = 1 + data = length 24, hash 61ACE481 + sample 150: + time = 3000000 + flags = 1 + data = length 24, hash D0C42780 + sample 151: + time = 3020000 + flags = 1 + data = length 24, hash FAD51BA1 + sample 152: + time = 3040000 + flags = 1 + data = length 24, hash F1A9AC71 + sample 153: + time = 3060000 + flags = 1 + data = length 24, hash 24425449 + sample 154: + time = 3080000 + flags = 1 + data = length 24, hash 37AAC3E6 + sample 155: + time = 3100000 + flags = 1 + data = length 24, hash 91F68CB4 + sample 156: + time = 3120000 + flags = 1 + data = length 24, hash F8C92820 + sample 157: + time = 3140000 + flags = 1 + data = length 24, hash ECD39C3E + sample 158: + time = 3160000 + flags = 1 + data = length 24, hash B27D8F78 + sample 159: + time = 3180000 + flags = 1 + data = length 24, hash C9EB3DFB + sample 160: + time = 3200000 + flags = 1 + data = length 24, hash 88DC54A2 + sample 161: + time = 3220000 + flags = 1 + data = length 24, hash 7FC4C5BE + sample 162: + time = 3240000 + flags = 1 + data = length 24, hash E4F684EF + sample 163: + time = 3260000 + flags = 1 + data = length 24, hash 55C08B56 + sample 164: + time = 3280000 + flags = 1 + data = length 24, hash E5A0F006 + sample 165: + time = 3300000 + flags = 1 + data = length 24, hash DE3F3AA7 + sample 166: + time = 3320000 + flags = 1 + data = length 24, hash 3F28AE7F + sample 167: + time = 3340000 + flags = 1 + data = length 24, hash 3949CAFF + sample 168: + time = 3360000 + flags = 1 + data = length 24, hash 772665A0 +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_wb_cbr.amr.1.dump b/library/core/src/test/assets/amr/sample_wb_cbr.amr.1.dump new file mode 100644 index 0000000000..fad4565195 --- /dev/null +++ b/library/core/src/test/assets/amr/sample_wb_cbr.amr.1.dump @@ -0,0 +1,482 @@ +seekMap: + isSeekable = true + duration = 3380000 + getPosition(0) = [[timeUs=0, position=9]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/amr-wb + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 16000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 2712 + sample count = 113 + sample 0: + time = 1120000 + flags = 1 + data = length 24, hash EEB921BD + sample 1: + time = 1140000 + flags = 1 + data = length 24, hash 8B941A4C + sample 2: + time = 1160000 + flags = 1 + data = length 24, hash ED5F5FEE + sample 3: + time = 1180000 + flags = 1 + data = length 24, hash A588E0BB + sample 4: + time = 1200000 + flags = 1 + data = length 24, hash 588CBC01 + sample 5: + time = 1220000 + flags = 1 + data = length 24, hash DE22266C + sample 6: + time = 1240000 + flags = 1 + data = length 24, hash 921B6E5C + sample 7: + time = 1260000 + flags = 1 + data = length 24, hash EC11F041 + sample 8: + time = 1280000 + flags = 1 + data = length 24, hash 5BA9E0A3 + sample 9: + time = 1300000 + flags = 1 + data = length 24, hash DB6D52F3 + sample 10: + time = 1320000 + flags = 1 + data = length 24, hash 8EEBE525 + sample 11: + time = 1340000 + flags = 1 + data = length 24, hash 47A742AE + sample 12: + time = 1360000 + flags = 1 + data = length 24, hash E93F1E03 + sample 13: + time = 1380000 + flags = 1 + data = length 24, hash 3251F57C + sample 14: + time = 1400000 + flags = 1 + data = length 24, hash 3EDBBBDD + sample 15: + time = 1420000 + flags = 1 + data = length 24, hash 2E98465A + sample 16: + time = 1440000 + flags = 1 + data = length 24, hash A09EA52E + sample 17: + time = 1460000 + flags = 1 + data = length 24, hash A2A86FA6 + sample 18: + time = 1480000 + flags = 1 + data = length 24, hash 71DCD51C + sample 19: + time = 1500000 + flags = 1 + data = length 24, hash 2B02DEE1 + sample 20: + time = 1520000 + flags = 1 + data = length 24, hash 7A725192 + sample 21: + time = 1540000 + flags = 1 + data = length 24, hash 929AD483 + sample 22: + time = 1560000 + flags = 1 + data = length 24, hash 68440BF5 + sample 23: + time = 1580000 + flags = 1 + data = length 24, hash 5BD41AD6 + sample 24: + time = 1600000 + flags = 1 + data = length 24, hash 91A381 + sample 25: + time = 1620000 + flags = 1 + data = length 24, hash 8010C408 + sample 26: + time = 1640000 + flags = 1 + data = length 24, hash 482274BE + sample 27: + time = 1660000 + flags = 1 + data = length 24, hash D7DB8BCC + sample 28: + time = 1680000 + flags = 1 + data = length 24, hash 680BD9DD + sample 29: + time = 1700000 + flags = 1 + data = length 24, hash E313577C + sample 30: + time = 1720000 + flags = 1 + data = length 24, hash 9C10B0CD + sample 31: + time = 1740000 + flags = 1 + data = length 24, hash 2D90AC02 + sample 32: + time = 1760000 + flags = 1 + data = length 24, hash 64E8C245 + sample 33: + time = 1780000 + flags = 1 + data = length 24, hash 3954AC1B + sample 34: + time = 1800000 + flags = 1 + data = length 24, hash ACB8999F + sample 35: + time = 1820000 + flags = 1 + data = length 24, hash 43AE3957 + sample 36: + time = 1840000 + flags = 1 + data = length 24, hash 3C664DB7 + sample 37: + time = 1860000 + flags = 1 + data = length 24, hash 9354B576 + sample 38: + time = 1880000 + flags = 1 + data = length 24, hash B5B9C14E + sample 39: + time = 1900000 + flags = 1 + data = length 24, hash 7DA9C98F + sample 40: + time = 1920000 + flags = 1 + data = length 24, hash EFEE54C6 + sample 41: + time = 1940000 + flags = 1 + data = length 24, hash 79DC8CBD + sample 42: + time = 1960000 + flags = 1 + data = length 24, hash A71A475C + sample 43: + time = 1980000 + flags = 1 + data = length 24, hash CA1CBB94 + sample 44: + time = 2000000 + flags = 1 + data = length 24, hash 91922226 + sample 45: + time = 2020000 + flags = 1 + data = length 24, hash C90278BC + sample 46: + time = 2040000 + flags = 1 + data = length 24, hash BD51986F + sample 47: + time = 2060000 + flags = 1 + data = length 24, hash 90AEF368 + sample 48: + time = 2080000 + flags = 1 + data = length 24, hash 1D83C955 + sample 49: + time = 2100000 + flags = 1 + data = length 24, hash 8FA9A915 + sample 50: + time = 2120000 + flags = 1 + data = length 24, hash C6C753E0 + sample 51: + time = 2140000 + flags = 1 + data = length 24, hash 85FA27A7 + sample 52: + time = 2160000 + flags = 1 + data = length 24, hash A0277324 + sample 53: + time = 2180000 + flags = 1 + data = length 24, hash B7696535 + sample 54: + time = 2200000 + flags = 1 + data = length 24, hash D69D668C + sample 55: + time = 2220000 + flags = 1 + data = length 24, hash 34C057CD + sample 56: + time = 2240000 + flags = 1 + data = length 24, hash 4EC5E974 + sample 57: + time = 2260000 + flags = 1 + data = length 24, hash 1C1CD40D + sample 58: + time = 2280000 + flags = 1 + data = length 24, hash 76CC54BC + sample 59: + time = 2300000 + flags = 1 + data = length 24, hash D497ACF5 + sample 60: + time = 2320000 + flags = 1 + data = length 24, hash A1386080 + sample 61: + time = 2340000 + flags = 1 + data = length 24, hash 7ED36954 + sample 62: + time = 2360000 + flags = 1 + data = length 24, hash C11A3BF9 + sample 63: + time = 2380000 + flags = 1 + data = length 24, hash 8FB69488 + sample 64: + time = 2400000 + flags = 1 + data = length 24, hash C6225F59 + sample 65: + time = 2420000 + flags = 1 + data = length 24, hash 122AB6D2 + sample 66: + time = 2440000 + flags = 1 + data = length 24, hash 1E195E7D + sample 67: + time = 2460000 + flags = 1 + data = length 24, hash BD3DF418 + sample 68: + time = 2480000 + flags = 1 + data = length 24, hash D8AE4A5 + sample 69: + time = 2500000 + flags = 1 + data = length 24, hash 977BD182 + sample 70: + time = 2520000 + flags = 1 + data = length 24, hash F361F060 + sample 71: + time = 2540000 + flags = 1 + data = length 24, hash 11EC8CD0 + sample 72: + time = 2560000 + flags = 1 + data = length 24, hash 3798F3D2 + sample 73: + time = 2580000 + flags = 1 + data = length 24, hash B2C2517C + sample 74: + time = 2600000 + flags = 1 + data = length 24, hash FBE0D0D8 + sample 75: + time = 2620000 + flags = 1 + data = length 24, hash 7033172F + sample 76: + time = 2640000 + flags = 1 + data = length 24, hash BE760029 + sample 77: + time = 2660000 + flags = 1 + data = length 24, hash 590AF28C + sample 78: + time = 2680000 + flags = 1 + data = length 24, hash AD28C48F + sample 79: + time = 2700000 + flags = 1 + data = length 24, hash 640AA61B + sample 80: + time = 2720000 + flags = 1 + data = length 24, hash ABE659B + sample 81: + time = 2740000 + flags = 1 + data = length 24, hash ED2691D2 + sample 82: + time = 2760000 + flags = 1 + data = length 24, hash D998C80E + sample 83: + time = 2780000 + flags = 1 + data = length 24, hash 8DC0DF5C + sample 84: + time = 2800000 + flags = 1 + data = length 24, hash 7692247B + sample 85: + time = 2820000 + flags = 1 + data = length 24, hash C1D1CCB9 + sample 86: + time = 2840000 + flags = 1 + data = length 24, hash 362CE78E + sample 87: + time = 2860000 + flags = 1 + data = length 24, hash 54FA84A + sample 88: + time = 2880000 + flags = 1 + data = length 24, hash 29E88C84 + sample 89: + time = 2900000 + flags = 1 + data = length 24, hash 1CD848AC + sample 90: + time = 2920000 + flags = 1 + data = length 24, hash 5C3D4A79 + sample 91: + time = 2940000 + flags = 1 + data = length 24, hash 1AA8E604 + sample 92: + time = 2960000 + flags = 1 + data = length 24, hash 186A4316 + sample 93: + time = 2980000 + flags = 1 + data = length 24, hash 61ACE481 + sample 94: + time = 3000000 + flags = 1 + data = length 24, hash D0C42780 + sample 95: + time = 3020000 + flags = 1 + data = length 24, hash FAD51BA1 + sample 96: + time = 3040000 + flags = 1 + data = length 24, hash F1A9AC71 + sample 97: + time = 3060000 + flags = 1 + data = length 24, hash 24425449 + sample 98: + time = 3080000 + flags = 1 + data = length 24, hash 37AAC3E6 + sample 99: + time = 3100000 + flags = 1 + data = length 24, hash 91F68CB4 + sample 100: + time = 3120000 + flags = 1 + data = length 24, hash F8C92820 + sample 101: + time = 3140000 + flags = 1 + data = length 24, hash ECD39C3E + sample 102: + time = 3160000 + flags = 1 + data = length 24, hash B27D8F78 + sample 103: + time = 3180000 + flags = 1 + data = length 24, hash C9EB3DFB + sample 104: + time = 3200000 + flags = 1 + data = length 24, hash 88DC54A2 + sample 105: + time = 3220000 + flags = 1 + data = length 24, hash 7FC4C5BE + sample 106: + time = 3240000 + flags = 1 + data = length 24, hash E4F684EF + sample 107: + time = 3260000 + flags = 1 + data = length 24, hash 55C08B56 + sample 108: + time = 3280000 + flags = 1 + data = length 24, hash E5A0F006 + sample 109: + time = 3300000 + flags = 1 + data = length 24, hash DE3F3AA7 + sample 110: + time = 3320000 + flags = 1 + data = length 24, hash 3F28AE7F + sample 111: + time = 3340000 + flags = 1 + data = length 24, hash 3949CAFF + sample 112: + time = 3360000 + flags = 1 + data = length 24, hash 772665A0 +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_wb_cbr.amr.2.dump b/library/core/src/test/assets/amr/sample_wb_cbr.amr.2.dump new file mode 100644 index 0000000000..1f00a90739 --- /dev/null +++ b/library/core/src/test/assets/amr/sample_wb_cbr.amr.2.dump @@ -0,0 +1,258 @@ +seekMap: + isSeekable = true + duration = 3380000 + getPosition(0) = [[timeUs=0, position=9]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/amr-wb + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 16000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 1368 + sample count = 57 + sample 0: + time = 2240000 + flags = 1 + data = length 24, hash 4EC5E974 + sample 1: + time = 2260000 + flags = 1 + data = length 24, hash 1C1CD40D + sample 2: + time = 2280000 + flags = 1 + data = length 24, hash 76CC54BC + sample 3: + time = 2300000 + flags = 1 + data = length 24, hash D497ACF5 + sample 4: + time = 2320000 + flags = 1 + data = length 24, hash A1386080 + sample 5: + time = 2340000 + flags = 1 + data = length 24, hash 7ED36954 + sample 6: + time = 2360000 + flags = 1 + data = length 24, hash C11A3BF9 + sample 7: + time = 2380000 + flags = 1 + data = length 24, hash 8FB69488 + sample 8: + time = 2400000 + flags = 1 + data = length 24, hash C6225F59 + sample 9: + time = 2420000 + flags = 1 + data = length 24, hash 122AB6D2 + sample 10: + time = 2440000 + flags = 1 + data = length 24, hash 1E195E7D + sample 11: + time = 2460000 + flags = 1 + data = length 24, hash BD3DF418 + sample 12: + time = 2480000 + flags = 1 + data = length 24, hash D8AE4A5 + sample 13: + time = 2500000 + flags = 1 + data = length 24, hash 977BD182 + sample 14: + time = 2520000 + flags = 1 + data = length 24, hash F361F060 + sample 15: + time = 2540000 + flags = 1 + data = length 24, hash 11EC8CD0 + sample 16: + time = 2560000 + flags = 1 + data = length 24, hash 3798F3D2 + sample 17: + time = 2580000 + flags = 1 + data = length 24, hash B2C2517C + sample 18: + time = 2600000 + flags = 1 + data = length 24, hash FBE0D0D8 + sample 19: + time = 2620000 + flags = 1 + data = length 24, hash 7033172F + sample 20: + time = 2640000 + flags = 1 + data = length 24, hash BE760029 + sample 21: + time = 2660000 + flags = 1 + data = length 24, hash 590AF28C + sample 22: + time = 2680000 + flags = 1 + data = length 24, hash AD28C48F + sample 23: + time = 2700000 + flags = 1 + data = length 24, hash 640AA61B + sample 24: + time = 2720000 + flags = 1 + data = length 24, hash ABE659B + sample 25: + time = 2740000 + flags = 1 + data = length 24, hash ED2691D2 + sample 26: + time = 2760000 + flags = 1 + data = length 24, hash D998C80E + sample 27: + time = 2780000 + flags = 1 + data = length 24, hash 8DC0DF5C + sample 28: + time = 2800000 + flags = 1 + data = length 24, hash 7692247B + sample 29: + time = 2820000 + flags = 1 + data = length 24, hash C1D1CCB9 + sample 30: + time = 2840000 + flags = 1 + data = length 24, hash 362CE78E + sample 31: + time = 2860000 + flags = 1 + data = length 24, hash 54FA84A + sample 32: + time = 2880000 + flags = 1 + data = length 24, hash 29E88C84 + sample 33: + time = 2900000 + flags = 1 + data = length 24, hash 1CD848AC + sample 34: + time = 2920000 + flags = 1 + data = length 24, hash 5C3D4A79 + sample 35: + time = 2940000 + flags = 1 + data = length 24, hash 1AA8E604 + sample 36: + time = 2960000 + flags = 1 + data = length 24, hash 186A4316 + sample 37: + time = 2980000 + flags = 1 + data = length 24, hash 61ACE481 + sample 38: + time = 3000000 + flags = 1 + data = length 24, hash D0C42780 + sample 39: + time = 3020000 + flags = 1 + data = length 24, hash FAD51BA1 + sample 40: + time = 3040000 + flags = 1 + data = length 24, hash F1A9AC71 + sample 41: + time = 3060000 + flags = 1 + data = length 24, hash 24425449 + sample 42: + time = 3080000 + flags = 1 + data = length 24, hash 37AAC3E6 + sample 43: + time = 3100000 + flags = 1 + data = length 24, hash 91F68CB4 + sample 44: + time = 3120000 + flags = 1 + data = length 24, hash F8C92820 + sample 45: + time = 3140000 + flags = 1 + data = length 24, hash ECD39C3E + sample 46: + time = 3160000 + flags = 1 + data = length 24, hash B27D8F78 + sample 47: + time = 3180000 + flags = 1 + data = length 24, hash C9EB3DFB + sample 48: + time = 3200000 + flags = 1 + data = length 24, hash 88DC54A2 + sample 49: + time = 3220000 + flags = 1 + data = length 24, hash 7FC4C5BE + sample 50: + time = 3240000 + flags = 1 + data = length 24, hash E4F684EF + sample 51: + time = 3260000 + flags = 1 + data = length 24, hash 55C08B56 + sample 52: + time = 3280000 + flags = 1 + data = length 24, hash E5A0F006 + sample 53: + time = 3300000 + flags = 1 + data = length 24, hash DE3F3AA7 + sample 54: + time = 3320000 + flags = 1 + data = length 24, hash 3F28AE7F + sample 55: + time = 3340000 + flags = 1 + data = length 24, hash 3949CAFF + sample 56: + time = 3360000 + flags = 1 + data = length 24, hash 772665A0 +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_wb_cbr.amr.3.dump b/library/core/src/test/assets/amr/sample_wb_cbr.amr.3.dump new file mode 100644 index 0000000000..1ec8c6fdb7 --- /dev/null +++ b/library/core/src/test/assets/amr/sample_wb_cbr.amr.3.dump @@ -0,0 +1,34 @@ +seekMap: + isSeekable = true + duration = 3380000 + getPosition(0) = [[timeUs=0, position=9]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/amr-wb + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 16000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 24 + sample count = 1 + sample 0: + time = 3360000 + flags = 1 + data = length 24, hash 772665A0 +tracksEnded = true diff --git a/library/core/src/test/assets/amr/sample_wb_cbr.amr.unklen.dump b/library/core/src/test/assets/amr/sample_wb_cbr.amr.unklen.dump new file mode 100644 index 0000000000..1b3b8bd0dd --- /dev/null +++ b/library/core/src/test/assets/amr/sample_wb_cbr.amr.unklen.dump @@ -0,0 +1,706 @@ +seekMap: + isSeekable = false + duration = UNSET TIME + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 1 +track 0: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/amr-wb + maxInputSize = 61 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 16000 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 4056 + sample count = 169 + sample 0: + time = 0 + flags = 1 + data = length 24, hash C3025798 + sample 1: + time = 20000 + flags = 1 + data = length 24, hash 39CABAE9 + sample 2: + time = 40000 + flags = 1 + data = length 24, hash 2752F470 + sample 3: + time = 60000 + flags = 1 + data = length 24, hash 394F76F6 + sample 4: + time = 80000 + flags = 1 + data = length 24, hash FF9EEF + sample 5: + time = 100000 + flags = 1 + data = length 24, hash 54ECB1B4 + sample 6: + time = 120000 + flags = 1 + data = length 24, hash 6D7A3A5F + sample 7: + time = 140000 + flags = 1 + data = length 24, hash 684CD144 + sample 8: + time = 160000 + flags = 1 + data = length 24, hash 87B7D176 + sample 9: + time = 180000 + flags = 1 + data = length 24, hash 4C02F9A5 + sample 10: + time = 200000 + flags = 1 + data = length 24, hash B4154108 + sample 11: + time = 220000 + flags = 1 + data = length 24, hash 4448F477 + sample 12: + time = 240000 + flags = 1 + data = length 24, hash 755A4939 + sample 13: + time = 260000 + flags = 1 + data = length 24, hash 8C8BC6C3 + sample 14: + time = 280000 + flags = 1 + data = length 24, hash BC37F63F + sample 15: + time = 300000 + flags = 1 + data = length 24, hash 3352C43C + sample 16: + time = 320000 + flags = 1 + data = length 24, hash 7998E1F2 + sample 17: + time = 340000 + flags = 1 + data = length 24, hash A8ECBEFC + sample 18: + time = 360000 + flags = 1 + data = length 24, hash 944AC118 + sample 19: + time = 380000 + flags = 1 + data = length 24, hash FD2C8E1F + sample 20: + time = 400000 + flags = 1 + data = length 24, hash B3D867AF + sample 21: + time = 420000 + flags = 1 + data = length 24, hash 3DC6E592 + sample 22: + time = 440000 + flags = 1 + data = length 24, hash 32B276CD + sample 23: + time = 460000 + flags = 1 + data = length 24, hash 5488AEF3 + sample 24: + time = 480000 + flags = 1 + data = length 24, hash 7A4D516 + sample 25: + time = 500000 + flags = 1 + data = length 24, hash 570AE83F + sample 26: + time = 520000 + flags = 1 + data = length 24, hash E5CB3477 + sample 27: + time = 540000 + flags = 1 + data = length 24, hash E04C00E4 + sample 28: + time = 560000 + flags = 1 + data = length 24, hash 21B7C97 + sample 29: + time = 580000 + flags = 1 + data = length 24, hash 1633F470 + sample 30: + time = 600000 + flags = 1 + data = length 24, hash 28D65CA6 + sample 31: + time = 620000 + flags = 1 + data = length 24, hash CC6A675C + sample 32: + time = 640000 + flags = 1 + data = length 24, hash 4C91080A + sample 33: + time = 660000 + flags = 1 + data = length 24, hash F6482FB5 + sample 34: + time = 680000 + flags = 1 + data = length 24, hash 2C76F48C + sample 35: + time = 700000 + flags = 1 + data = length 24, hash 6E3B0D72 + sample 36: + time = 720000 + flags = 1 + data = length 24, hash 799AA003 + sample 37: + time = 740000 + flags = 1 + data = length 24, hash DFC0BA81 + sample 38: + time = 760000 + flags = 1 + data = length 24, hash CBDF3826 + sample 39: + time = 780000 + flags = 1 + data = length 24, hash 16862B75 + sample 40: + time = 800000 + flags = 1 + data = length 24, hash 865A828E + sample 41: + time = 820000 + flags = 1 + data = length 24, hash 336BBDC9 + sample 42: + time = 840000 + flags = 1 + data = length 24, hash 6CFC6C34 + sample 43: + time = 860000 + flags = 1 + data = length 24, hash 32C8CD46 + sample 44: + time = 880000 + flags = 1 + data = length 24, hash 9FE11C4C + sample 45: + time = 900000 + flags = 1 + data = length 24, hash AA5A12B7 + sample 46: + time = 920000 + flags = 1 + data = length 24, hash AA0F4A4D + sample 47: + time = 940000 + flags = 1 + data = length 24, hash 34415484 + sample 48: + time = 960000 + flags = 1 + data = length 24, hash 5018928E + sample 49: + time = 980000 + flags = 1 + data = length 24, hash 4A04D162 + sample 50: + time = 1000000 + flags = 1 + data = length 24, hash 4C70F9F0 + sample 51: + time = 1020000 + flags = 1 + data = length 24, hash 99EF3168 + sample 52: + time = 1040000 + flags = 1 + data = length 24, hash C600DAF + sample 53: + time = 1060000 + flags = 1 + data = length 24, hash FDBB192E + sample 54: + time = 1080000 + flags = 1 + data = length 24, hash 99096A48 + sample 55: + time = 1100000 + flags = 1 + data = length 24, hash D793F88B + sample 56: + time = 1120000 + flags = 1 + data = length 24, hash EEB921BD + sample 57: + time = 1140000 + flags = 1 + data = length 24, hash 8B941A4C + sample 58: + time = 1160000 + flags = 1 + data = length 24, hash ED5F5FEE + sample 59: + time = 1180000 + flags = 1 + data = length 24, hash A588E0BB + sample 60: + time = 1200000 + flags = 1 + data = length 24, hash 588CBC01 + sample 61: + time = 1220000 + flags = 1 + data = length 24, hash DE22266C + sample 62: + time = 1240000 + flags = 1 + data = length 24, hash 921B6E5C + sample 63: + time = 1260000 + flags = 1 + data = length 24, hash EC11F041 + sample 64: + time = 1280000 + flags = 1 + data = length 24, hash 5BA9E0A3 + sample 65: + time = 1300000 + flags = 1 + data = length 24, hash DB6D52F3 + sample 66: + time = 1320000 + flags = 1 + data = length 24, hash 8EEBE525 + sample 67: + time = 1340000 + flags = 1 + data = length 24, hash 47A742AE + sample 68: + time = 1360000 + flags = 1 + data = length 24, hash E93F1E03 + sample 69: + time = 1380000 + flags = 1 + data = length 24, hash 3251F57C + sample 70: + time = 1400000 + flags = 1 + data = length 24, hash 3EDBBBDD + sample 71: + time = 1420000 + flags = 1 + data = length 24, hash 2E98465A + sample 72: + time = 1440000 + flags = 1 + data = length 24, hash A09EA52E + sample 73: + time = 1460000 + flags = 1 + data = length 24, hash A2A86FA6 + sample 74: + time = 1480000 + flags = 1 + data = length 24, hash 71DCD51C + sample 75: + time = 1500000 + flags = 1 + data = length 24, hash 2B02DEE1 + sample 76: + time = 1520000 + flags = 1 + data = length 24, hash 7A725192 + sample 77: + time = 1540000 + flags = 1 + data = length 24, hash 929AD483 + sample 78: + time = 1560000 + flags = 1 + data = length 24, hash 68440BF5 + sample 79: + time = 1580000 + flags = 1 + data = length 24, hash 5BD41AD6 + sample 80: + time = 1600000 + flags = 1 + data = length 24, hash 91A381 + sample 81: + time = 1620000 + flags = 1 + data = length 24, hash 8010C408 + sample 82: + time = 1640000 + flags = 1 + data = length 24, hash 482274BE + sample 83: + time = 1660000 + flags = 1 + data = length 24, hash D7DB8BCC + sample 84: + time = 1680000 + flags = 1 + data = length 24, hash 680BD9DD + sample 85: + time = 1700000 + flags = 1 + data = length 24, hash E313577C + sample 86: + time = 1720000 + flags = 1 + data = length 24, hash 9C10B0CD + sample 87: + time = 1740000 + flags = 1 + data = length 24, hash 2D90AC02 + sample 88: + time = 1760000 + flags = 1 + data = length 24, hash 64E8C245 + sample 89: + time = 1780000 + flags = 1 + data = length 24, hash 3954AC1B + sample 90: + time = 1800000 + flags = 1 + data = length 24, hash ACB8999F + sample 91: + time = 1820000 + flags = 1 + data = length 24, hash 43AE3957 + sample 92: + time = 1840000 + flags = 1 + data = length 24, hash 3C664DB7 + sample 93: + time = 1860000 + flags = 1 + data = length 24, hash 9354B576 + sample 94: + time = 1880000 + flags = 1 + data = length 24, hash B5B9C14E + sample 95: + time = 1900000 + flags = 1 + data = length 24, hash 7DA9C98F + sample 96: + time = 1920000 + flags = 1 + data = length 24, hash EFEE54C6 + sample 97: + time = 1940000 + flags = 1 + data = length 24, hash 79DC8CBD + sample 98: + time = 1960000 + flags = 1 + data = length 24, hash A71A475C + sample 99: + time = 1980000 + flags = 1 + data = length 24, hash CA1CBB94 + sample 100: + time = 2000000 + flags = 1 + data = length 24, hash 91922226 + sample 101: + time = 2020000 + flags = 1 + data = length 24, hash C90278BC + sample 102: + time = 2040000 + flags = 1 + data = length 24, hash BD51986F + sample 103: + time = 2060000 + flags = 1 + data = length 24, hash 90AEF368 + sample 104: + time = 2080000 + flags = 1 + data = length 24, hash 1D83C955 + sample 105: + time = 2100000 + flags = 1 + data = length 24, hash 8FA9A915 + sample 106: + time = 2120000 + flags = 1 + data = length 24, hash C6C753E0 + sample 107: + time = 2140000 + flags = 1 + data = length 24, hash 85FA27A7 + sample 108: + time = 2160000 + flags = 1 + data = length 24, hash A0277324 + sample 109: + time = 2180000 + flags = 1 + data = length 24, hash B7696535 + sample 110: + time = 2200000 + flags = 1 + data = length 24, hash D69D668C + sample 111: + time = 2220000 + flags = 1 + data = length 24, hash 34C057CD + sample 112: + time = 2240000 + flags = 1 + data = length 24, hash 4EC5E974 + sample 113: + time = 2260000 + flags = 1 + data = length 24, hash 1C1CD40D + sample 114: + time = 2280000 + flags = 1 + data = length 24, hash 76CC54BC + sample 115: + time = 2300000 + flags = 1 + data = length 24, hash D497ACF5 + sample 116: + time = 2320000 + flags = 1 + data = length 24, hash A1386080 + sample 117: + time = 2340000 + flags = 1 + data = length 24, hash 7ED36954 + sample 118: + time = 2360000 + flags = 1 + data = length 24, hash C11A3BF9 + sample 119: + time = 2380000 + flags = 1 + data = length 24, hash 8FB69488 + sample 120: + time = 2400000 + flags = 1 + data = length 24, hash C6225F59 + sample 121: + time = 2420000 + flags = 1 + data = length 24, hash 122AB6D2 + sample 122: + time = 2440000 + flags = 1 + data = length 24, hash 1E195E7D + sample 123: + time = 2460000 + flags = 1 + data = length 24, hash BD3DF418 + sample 124: + time = 2480000 + flags = 1 + data = length 24, hash D8AE4A5 + sample 125: + time = 2500000 + flags = 1 + data = length 24, hash 977BD182 + sample 126: + time = 2520000 + flags = 1 + data = length 24, hash F361F060 + sample 127: + time = 2540000 + flags = 1 + data = length 24, hash 11EC8CD0 + sample 128: + time = 2560000 + flags = 1 + data = length 24, hash 3798F3D2 + sample 129: + time = 2580000 + flags = 1 + data = length 24, hash B2C2517C + sample 130: + time = 2600000 + flags = 1 + data = length 24, hash FBE0D0D8 + sample 131: + time = 2620000 + flags = 1 + data = length 24, hash 7033172F + sample 132: + time = 2640000 + flags = 1 + data = length 24, hash BE760029 + sample 133: + time = 2660000 + flags = 1 + data = length 24, hash 590AF28C + sample 134: + time = 2680000 + flags = 1 + data = length 24, hash AD28C48F + sample 135: + time = 2700000 + flags = 1 + data = length 24, hash 640AA61B + sample 136: + time = 2720000 + flags = 1 + data = length 24, hash ABE659B + sample 137: + time = 2740000 + flags = 1 + data = length 24, hash ED2691D2 + sample 138: + time = 2760000 + flags = 1 + data = length 24, hash D998C80E + sample 139: + time = 2780000 + flags = 1 + data = length 24, hash 8DC0DF5C + sample 140: + time = 2800000 + flags = 1 + data = length 24, hash 7692247B + sample 141: + time = 2820000 + flags = 1 + data = length 24, hash C1D1CCB9 + sample 142: + time = 2840000 + flags = 1 + data = length 24, hash 362CE78E + sample 143: + time = 2860000 + flags = 1 + data = length 24, hash 54FA84A + sample 144: + time = 2880000 + flags = 1 + data = length 24, hash 29E88C84 + sample 145: + time = 2900000 + flags = 1 + data = length 24, hash 1CD848AC + sample 146: + time = 2920000 + flags = 1 + data = length 24, hash 5C3D4A79 + sample 147: + time = 2940000 + flags = 1 + data = length 24, hash 1AA8E604 + sample 148: + time = 2960000 + flags = 1 + data = length 24, hash 186A4316 + sample 149: + time = 2980000 + flags = 1 + data = length 24, hash 61ACE481 + sample 150: + time = 3000000 + flags = 1 + data = length 24, hash D0C42780 + sample 151: + time = 3020000 + flags = 1 + data = length 24, hash FAD51BA1 + sample 152: + time = 3040000 + flags = 1 + data = length 24, hash F1A9AC71 + sample 153: + time = 3060000 + flags = 1 + data = length 24, hash 24425449 + sample 154: + time = 3080000 + flags = 1 + data = length 24, hash 37AAC3E6 + sample 155: + time = 3100000 + flags = 1 + data = length 24, hash 91F68CB4 + sample 156: + time = 3120000 + flags = 1 + data = length 24, hash F8C92820 + sample 157: + time = 3140000 + flags = 1 + data = length 24, hash ECD39C3E + sample 158: + time = 3160000 + flags = 1 + data = length 24, hash B27D8F78 + sample 159: + time = 3180000 + flags = 1 + data = length 24, hash C9EB3DFB + sample 160: + time = 3200000 + flags = 1 + data = length 24, hash 88DC54A2 + sample 161: + time = 3220000 + flags = 1 + data = length 24, hash 7FC4C5BE + sample 162: + time = 3240000 + flags = 1 + data = length 24, hash E4F684EF + sample 163: + time = 3260000 + flags = 1 + data = length 24, hash 55C08B56 + sample 164: + time = 3280000 + flags = 1 + data = length 24, hash E5A0F006 + sample 165: + time = 3300000 + flags = 1 + data = length 24, hash DE3F3AA7 + sample 166: + time = 3320000 + flags = 1 + data = length 24, hash 3F28AE7F + sample 167: + time = 3340000 + flags = 1 + data = length 24, hash 3949CAFF + sample 168: + time = 3360000 + flags = 1 + data = length 24, hash 772665A0 +tracksEnded = true diff --git a/library/core/src/test/assets/ts/sample_cbs.adts b/library/core/src/test/assets/ts/sample_cbs.adts new file mode 100644 index 0000000000000000000000000000000000000000..abbaad0daf95cf2bce299b161a2ea6d658b587e0 GIT binary patch literal 31805 zcma%iWl$7;*exI+0)jNs(p^&0-64(C3ew#OEG!aI(j~b_cZW0rf^?U}lG5FC z``)=9@3&>xVL0>TInVjQPv1*EgFshMk&qm0&8^JLKGE=S@(Lj#A;%#jDZmlGMec+m z{Xq((3;h51LGu56jTit$f~CSf6_|(c15J?l?>m?MoD^`caKJZJ-p|xK1TVSbPN`&C zfS^G1!mxbT0KpT}^YPp3FDU1y9qwgU+5I)Q$$>rP(`y&-!&~txMI^3wJ(mFjqn%xQ zP#lt)YZy8>V%oLk1Svxt1j_4#!DAWu&u8y|0!U>1AFf@l&cE+$9rwArAaL{sw|-s( zTC-J&FB#7xIp#I>ORSxg`+Fc^k=x>EBm=Y6AAylcApYZ-*RP1_(NeyA%uzI_dx5I{ z@Y3CfT~&9wy`i<)lUA=Z)8y++XSXx_;5ehdZ0p_))XmcVtW6IGVdFUu7j5lzLoB%C|!$Jm-YSUxY(xeVh1S?IU1s+JW*snyqC zE3k5%nH9h=*-unCH_AH}N44_vv&Ry?o4F^_fk&)<4MC(*Od_gU1a2BS>J5hg!o{Xk zw?;g|s@Ns_Q55k6OTe4_FsDjMax+<^(!J-8fXF4F$f$(hxrwpSQjsl+4VZafg#^9f z4p*fWY*(P-EGVt=<{h4O#lUHvQU7wEGjepOXMOBs3aiS7lS{ODSl-OYqlE<=y)%i8 zwW6|T-;9kci|y$igqIf^9@%ffI>9L8%P}{$$M*dj&jiU7mM7JLH6~ta6@T!KMvdBN z-M0b=+2&3&y(oPhWTG3H^P&odpd}brb>gjG*^j$aw~RpCgEOIpYc#$GpD91=V_dAv z{P@1{qMy@J1Lp9p(DiwOcbDqUY^IgaB;(ByNzGq*&+U1Z!P8CC`#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u3BPVCi=92Y(^BO6x-Wofr3I|JK7ZVNwrl1Y8o&6 zlEM!T>q1B=6G^@sXt5V^8)6SfeSC(U2dMFY|Bwp!4@qtWT;jNi!Irtbmi5+YCcrL| zmyFhqWfxM@%Qd}1%1pd3dL$A#*37$yyxscY{03Ym>WKL%vZVr30LOcb; zBbpyXJtIRXX5Fqo-B;Xq>EC)9&UhBl;r%j-!pupHP%yk0G*WUn?yi~qTlT?XzUj?8 zpHWrC&sUa0Eo=mf;hG9~2LHAFL$22Vxu8p_K(2!u6AZipgzYggj?AmaB44*$CwcY5 zO_@yXiexHv<s|)tC6$^kBcp2*l*eF^P2jaT$nUi} zD|;n{ujosNxO5QQmj8JJ2gzUI8C!@%e_fuC+zCY zlo+26NDT8Uwv|o)rxKA(duaY;d`WPBo0rnQOr?~RaI)-iu+@KmUwrgTJ^4>(jgmse zQ=x-fYeMLr9+{7=O=;itz1W~rmMSU(EG)_gFRu5uB3}H)93reeDhoanCy-!au_gOL z<>BWh_i`j8|BFihokvX1fZxP&x9Z%(=kky*H+2AL5NT#LKqclubPdIHl5>{THcCS= zZMWf)1FXYk3g&GFR|*q7GWc3-;_Ag5CVmbb;a6FBKWPtahT7k}P?s2pxgT@rD@hT$ zd|h;8_ff*8+gCTxZvHZew(NfRL7f7{BqgSg*6x#8>3 z-F7!6FO`n@DY?;43lL59l2bQdFBUb~F8}C2C1>-2!Y-3aKW?gN1ef{{cyNc0K?A literal 0 HcmV?d00001 diff --git a/library/core/src/test/assets/ts/sample_cbs.adts.0.dump b/library/core/src/test/assets/ts/sample_cbs.adts.0.dump new file mode 100644 index 0000000000..e535aa8cd7 --- /dev/null +++ b/library/core/src/test/assets/ts/sample_cbs.adts.0.dump @@ -0,0 +1,631 @@ +seekMap: + isSeekable = true + duration = 3356772 + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 2 +track 0: + format: + bitrate = -1 + id = 0 + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 2, hash 5F7 + total output bytes = 30797 + sample count = 144 + sample 0: + time = 0 + flags = 1 + data = length 23, hash 47DE9131 + sample 1: + time = 23219 + flags = 1 + data = length 6, hash 31CF3A46 + sample 2: + time = 46438 + flags = 1 + data = length 6, hash 31CF3A46 + sample 3: + time = 69657 + flags = 1 + data = length 6, hash 31CF3A46 + sample 4: + time = 92876 + flags = 1 + data = length 6, hash 31EC5206 + sample 5: + time = 116095 + flags = 1 + data = length 171, hash 4F6478F6 + sample 6: + time = 139314 + flags = 1 + data = length 202, hash AF4068A3 + sample 7: + time = 162533 + flags = 1 + data = length 210, hash E4C10618 + sample 8: + time = 185752 + flags = 1 + data = length 217, hash 9ECCD0D9 + sample 9: + time = 208971 + flags = 1 + data = length 212, hash 6BAC2CD9 + sample 10: + time = 232190 + flags = 1 + data = length 223, hash 188B6010 + sample 11: + time = 255409 + flags = 1 + data = length 222, hash C1A04D0C + sample 12: + time = 278628 + flags = 1 + data = length 220, hash D65F9768 + sample 13: + time = 301847 + flags = 1 + data = length 227, hash B96C9E14 + sample 14: + time = 325066 + flags = 1 + data = length 229, hash 9FB09972 + sample 15: + time = 348285 + flags = 1 + data = length 220, hash 2271F053 + sample 16: + time = 371504 + flags = 1 + data = length 226, hash 5EDD2F4F + sample 17: + time = 394723 + flags = 1 + data = length 239, hash 957510E0 + sample 18: + time = 417942 + flags = 1 + data = length 224, hash 718A8F47 + sample 19: + time = 441161 + flags = 1 + data = length 225, hash 5E11E293 + sample 20: + time = 464380 + flags = 1 + data = length 227, hash FCE50D27 + sample 21: + time = 487599 + flags = 1 + data = length 212, hash 77908C40 + sample 22: + time = 510818 + flags = 1 + data = length 227, hash 34C4EB32 + sample 23: + time = 534037 + flags = 1 + data = length 231, hash 95488307 + sample 24: + time = 557256 + flags = 1 + data = length 226, hash 97F12D6F + sample 25: + time = 580475 + flags = 1 + data = length 236, hash 91A9D9A2 + sample 26: + time = 603694 + flags = 1 + data = length 227, hash 27A608F9 + sample 27: + time = 626913 + flags = 1 + data = length 229, hash 57DAAE4 + sample 28: + time = 650132 + flags = 1 + data = length 235, hash ED30AC34 + sample 29: + time = 673351 + flags = 1 + data = length 227, hash BD3D6280 + sample 30: + time = 696570 + flags = 1 + data = length 233, hash 694B1087 + sample 31: + time = 719789 + flags = 1 + data = length 232, hash 1EDFE047 + sample 32: + time = 743008 + flags = 1 + data = length 228, hash E2A831F4 + sample 33: + time = 766227 + flags = 1 + data = length 231, hash 757E6012 + sample 34: + time = 789446 + flags = 1 + data = length 223, hash 4003D791 + sample 35: + time = 812665 + flags = 1 + data = length 232, hash 3CF9A07C + sample 36: + time = 835884 + flags = 1 + data = length 228, hash 25AC3FF7 + sample 37: + time = 859103 + flags = 1 + data = length 220, hash 2C1824CE + sample 38: + time = 882322 + flags = 1 + data = length 229, hash 46FDD8FB + sample 39: + time = 905541 + flags = 1 + data = length 237, hash F6988018 + sample 40: + time = 928760 + flags = 1 + data = length 242, hash 60436B6B + sample 41: + time = 951979 + flags = 1 + data = length 275, hash 90EDFA8E + sample 42: + time = 975198 + flags = 1 + data = length 242, hash 5C86EFCB + sample 43: + time = 998417 + flags = 1 + data = length 233, hash E0A51B82 + sample 44: + time = 1021636 + flags = 1 + data = length 235, hash 590DF14F + sample 45: + time = 1044855 + flags = 1 + data = length 238, hash 69AF4E6E + sample 46: + time = 1068074 + flags = 1 + data = length 235, hash E745AE8D + sample 47: + time = 1091293 + flags = 1 + data = length 223, hash 295F2A13 + sample 48: + time = 1114512 + flags = 1 + data = length 228, hash E2F47B21 + sample 49: + time = 1137731 + flags = 1 + data = length 229, hash 262C3CFE + sample 50: + time = 1160950 + flags = 1 + data = length 232, hash 4B5BF5E8 + sample 51: + time = 1184169 + flags = 1 + data = length 233, hash F3D80836 + sample 52: + time = 1207388 + flags = 1 + data = length 237, hash 32E0A11E + sample 53: + time = 1230607 + flags = 1 + data = length 228, hash E1B89F13 + sample 54: + time = 1253826 + flags = 1 + data = length 237, hash 8BDD9E38 + sample 55: + time = 1277045 + flags = 1 + data = length 235, hash 3C84161F + sample 56: + time = 1300264 + flags = 1 + data = length 227, hash A47E1789 + sample 57: + time = 1323483 + flags = 1 + data = length 228, hash 869FDFD3 + sample 58: + time = 1346702 + flags = 1 + data = length 233, hash 272ECE2 + sample 59: + time = 1369921 + flags = 1 + data = length 227, hash DB6B9618 + sample 60: + time = 1393140 + flags = 1 + data = length 212, hash 63214325 + sample 61: + time = 1416359 + flags = 1 + data = length 221, hash 9BA588A1 + sample 62: + time = 1439578 + flags = 1 + data = length 225, hash 21EFD50C + sample 63: + time = 1462797 + flags = 1 + data = length 231, hash F3AD0BF + sample 64: + time = 1486016 + flags = 1 + data = length 224, hash 822C9210 + sample 65: + time = 1509235 + flags = 1 + data = length 195, hash D4EF53EE + sample 66: + time = 1532454 + flags = 1 + data = length 195, hash A816647A + sample 67: + time = 1555673 + flags = 1 + data = length 184, hash 9A2B7E6 + sample 68: + time = 1578892 + flags = 1 + data = length 210, hash 956E3600 + sample 69: + time = 1602111 + flags = 1 + data = length 234, hash 35CFDA0A + sample 70: + time = 1625330 + flags = 1 + data = length 239, hash 9E15AC1E + sample 71: + time = 1648549 + flags = 1 + data = length 228, hash F3B70641 + sample 72: + time = 1671768 + flags = 1 + data = length 237, hash 124E3194 + sample 73: + time = 1694987 + flags = 1 + data = length 231, hash 950CD7C8 + sample 74: + time = 1718206 + flags = 1 + data = length 236, hash A12E49AF + sample 75: + time = 1741425 + flags = 1 + data = length 242, hash 43BC9C24 + sample 76: + time = 1764644 + flags = 1 + data = length 241, hash DCF0B17 + sample 77: + time = 1787863 + flags = 1 + data = length 251, hash C0B99968 + sample 78: + time = 1811082 + flags = 1 + data = length 245, hash 9B38ED1C + sample 79: + time = 1834301 + flags = 1 + data = length 238, hash 1BA69079 + sample 80: + time = 1857520 + flags = 1 + data = length 233, hash 44C8C6BF + sample 81: + time = 1880739 + flags = 1 + data = length 231, hash EABBEE02 + sample 82: + time = 1903958 + flags = 1 + data = length 226, hash D09C44FB + sample 83: + time = 1927177 + flags = 1 + data = length 235, hash BE6A6608 + sample 84: + time = 1950396 + flags = 1 + data = length 235, hash 2735F454 + sample 85: + time = 1973615 + flags = 1 + data = length 238, hash B160DFE7 + sample 86: + time = 1996834 + flags = 1 + data = length 232, hash 1B217D2E + sample 87: + time = 2020053 + flags = 1 + data = length 251, hash D1C14CEA + sample 88: + time = 2043272 + flags = 1 + data = length 256, hash 97C87F08 + sample 89: + time = 2066491 + flags = 1 + data = length 237, hash 6645DB3 + sample 90: + time = 2089710 + flags = 1 + data = length 235, hash 727A1C82 + sample 91: + time = 2112929 + flags = 1 + data = length 234, hash 5015F8B5 + sample 92: + time = 2136148 + flags = 1 + data = length 241, hash 9102144B + sample 93: + time = 2159367 + flags = 1 + data = length 224, hash 64E0D807 + sample 94: + time = 2182586 + flags = 1 + data = length 228, hash 1922B852 + sample 95: + time = 2205805 + flags = 1 + data = length 224, hash 953502D8 + sample 96: + time = 2229024 + flags = 1 + data = length 214, hash 92B87FE7 + sample 97: + time = 2252243 + flags = 1 + data = length 213, hash BB0C8D86 + sample 98: + time = 2275462 + flags = 1 + data = length 206, hash 9AD21017 + sample 99: + time = 2298681 + flags = 1 + data = length 209, hash C479FE94 + sample 100: + time = 2321900 + flags = 1 + data = length 220, hash 3033DCE1 + sample 101: + time = 2345119 + flags = 1 + data = length 217, hash 7D589C94 + sample 102: + time = 2368338 + flags = 1 + data = length 216, hash AAF6C183 + sample 103: + time = 2391557 + flags = 1 + data = length 206, hash 1EE1207F + sample 104: + time = 2414776 + flags = 1 + data = length 204, hash 4BEB1210 + sample 105: + time = 2437995 + flags = 1 + data = length 213, hash 21A841C9 + sample 106: + time = 2461214 + flags = 1 + data = length 207, hash B80B0424 + sample 107: + time = 2484433 + flags = 1 + data = length 212, hash 4785A1C3 + sample 108: + time = 2507652 + flags = 1 + data = length 205, hash 59BF7229 + sample 109: + time = 2530871 + flags = 1 + data = length 208, hash FA313DDE + sample 110: + time = 2554090 + flags = 1 + data = length 211, hash 190D85FD + sample 111: + time = 2577309 + flags = 1 + data = length 211, hash BA050052 + sample 112: + time = 2600528 + flags = 1 + data = length 211, hash F3080F10 + sample 113: + time = 2623747 + flags = 1 + data = length 210, hash F41B7BE7 + sample 114: + time = 2646966 + flags = 1 + data = length 207, hash 2176C97E + sample 115: + time = 2670185 + flags = 1 + data = length 220, hash 32087455 + sample 116: + time = 2693404 + flags = 1 + data = length 213, hash 4E5649A8 + sample 117: + time = 2716623 + flags = 1 + data = length 213, hash 5F12FDCF + sample 118: + time = 2739842 + flags = 1 + data = length 204, hash 1E895C2A + sample 119: + time = 2763061 + flags = 1 + data = length 219, hash 45382270 + sample 120: + time = 2786280 + flags = 1 + data = length 205, hash D66C6A1D + sample 121: + time = 2809499 + flags = 1 + data = length 204, hash 467AD01F + sample 122: + time = 2832718 + flags = 1 + data = length 211, hash F0435574 + sample 123: + time = 2855937 + flags = 1 + data = length 206, hash 8C96B75F + sample 124: + time = 2879156 + flags = 1 + data = length 200, hash 82553248 + sample 125: + time = 2902375 + flags = 1 + data = length 180, hash 1E51E6CE + sample 126: + time = 2925594 + flags = 1 + data = length 196, hash 33151DC4 + sample 127: + time = 2948813 + flags = 1 + data = length 197, hash 1E62A7D6 + sample 128: + time = 2972032 + flags = 1 + data = length 206, hash 6A6C4CC9 + sample 129: + time = 2995251 + flags = 1 + data = length 209, hash A72FABAA + sample 130: + time = 3018470 + flags = 1 + data = length 217, hash BA33B985 + sample 131: + time = 3041689 + flags = 1 + data = length 235, hash 9919CFD9 + sample 132: + time = 3064908 + flags = 1 + data = length 236, hash A22C7267 + sample 133: + time = 3088127 + flags = 1 + data = length 213, hash 3D57C901 + sample 134: + time = 3111346 + flags = 1 + data = length 205, hash 47F68FDE + sample 135: + time = 3134565 + flags = 1 + data = length 210, hash 9A756E9C + sample 136: + time = 3157784 + flags = 1 + data = length 210, hash BD45C31F + sample 137: + time = 3181003 + flags = 1 + data = length 207, hash 8774FF7B + sample 138: + time = 3204222 + flags = 1 + data = length 149, hash 4678C0E5 + sample 139: + time = 3227441 + flags = 1 + data = length 161, hash E991035D + sample 140: + time = 3250660 + flags = 1 + data = length 197, hash C3013689 + sample 141: + time = 3273879 + flags = 1 + data = length 208, hash E6C0237 + sample 142: + time = 3297098 + flags = 1 + data = length 232, hash A330F188 + sample 143: + time = 3320317 + flags = 1 + data = length 174, hash 2B69C34E +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/id3 + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 0 + sample count = 0 +tracksEnded = true diff --git a/library/core/src/test/assets/ts/sample_cbs.adts.1.dump b/library/core/src/test/assets/ts/sample_cbs.adts.1.dump new file mode 100644 index 0000000000..96d2fcfb39 --- /dev/null +++ b/library/core/src/test/assets/ts/sample_cbs.adts.1.dump @@ -0,0 +1,431 @@ +seekMap: + isSeekable = true + duration = 3356772 + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 2 +track 0: + format: + bitrate = -1 + id = 0 + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 2, hash 5F7 + total output bytes = 20533 + sample count = 94 + sample 0: + time = 1118924 + flags = 1 + data = length 232, hash 4B5BF5E8 + sample 1: + time = 1142143 + flags = 1 + data = length 233, hash F3D80836 + sample 2: + time = 1165362 + flags = 1 + data = length 237, hash 32E0A11E + sample 3: + time = 1188581 + flags = 1 + data = length 228, hash E1B89F13 + sample 4: + time = 1211800 + flags = 1 + data = length 237, hash 8BDD9E38 + sample 5: + time = 1235019 + flags = 1 + data = length 235, hash 3C84161F + sample 6: + time = 1258238 + flags = 1 + data = length 227, hash A47E1789 + sample 7: + time = 1281457 + flags = 1 + data = length 228, hash 869FDFD3 + sample 8: + time = 1304676 + flags = 1 + data = length 233, hash 272ECE2 + sample 9: + time = 1327895 + flags = 1 + data = length 227, hash DB6B9618 + sample 10: + time = 1351114 + flags = 1 + data = length 212, hash 63214325 + sample 11: + time = 1374333 + flags = 1 + data = length 221, hash 9BA588A1 + sample 12: + time = 1397552 + flags = 1 + data = length 225, hash 21EFD50C + sample 13: + time = 1420771 + flags = 1 + data = length 231, hash F3AD0BF + sample 14: + time = 1443990 + flags = 1 + data = length 224, hash 822C9210 + sample 15: + time = 1467209 + flags = 1 + data = length 195, hash D4EF53EE + sample 16: + time = 1490428 + flags = 1 + data = length 195, hash A816647A + sample 17: + time = 1513647 + flags = 1 + data = length 184, hash 9A2B7E6 + sample 18: + time = 1536866 + flags = 1 + data = length 210, hash 956E3600 + sample 19: + time = 1560085 + flags = 1 + data = length 234, hash 35CFDA0A + sample 20: + time = 1583304 + flags = 1 + data = length 239, hash 9E15AC1E + sample 21: + time = 1606523 + flags = 1 + data = length 228, hash F3B70641 + sample 22: + time = 1629742 + flags = 1 + data = length 237, hash 124E3194 + sample 23: + time = 1652961 + flags = 1 + data = length 231, hash 950CD7C8 + sample 24: + time = 1676180 + flags = 1 + data = length 236, hash A12E49AF + sample 25: + time = 1699399 + flags = 1 + data = length 242, hash 43BC9C24 + sample 26: + time = 1722618 + flags = 1 + data = length 241, hash DCF0B17 + sample 27: + time = 1745837 + flags = 1 + data = length 251, hash C0B99968 + sample 28: + time = 1769056 + flags = 1 + data = length 245, hash 9B38ED1C + sample 29: + time = 1792275 + flags = 1 + data = length 238, hash 1BA69079 + sample 30: + time = 1815494 + flags = 1 + data = length 233, hash 44C8C6BF + sample 31: + time = 1838713 + flags = 1 + data = length 231, hash EABBEE02 + sample 32: + time = 1861932 + flags = 1 + data = length 226, hash D09C44FB + sample 33: + time = 1885151 + flags = 1 + data = length 235, hash BE6A6608 + sample 34: + time = 1908370 + flags = 1 + data = length 235, hash 2735F454 + sample 35: + time = 1931589 + flags = 1 + data = length 238, hash B160DFE7 + sample 36: + time = 1954808 + flags = 1 + data = length 232, hash 1B217D2E + sample 37: + time = 1978027 + flags = 1 + data = length 251, hash D1C14CEA + sample 38: + time = 2001246 + flags = 1 + data = length 256, hash 97C87F08 + sample 39: + time = 2024465 + flags = 1 + data = length 237, hash 6645DB3 + sample 40: + time = 2047684 + flags = 1 + data = length 235, hash 727A1C82 + sample 41: + time = 2070903 + flags = 1 + data = length 234, hash 5015F8B5 + sample 42: + time = 2094122 + flags = 1 + data = length 241, hash 9102144B + sample 43: + time = 2117341 + flags = 1 + data = length 224, hash 64E0D807 + sample 44: + time = 2140560 + flags = 1 + data = length 228, hash 1922B852 + sample 45: + time = 2163779 + flags = 1 + data = length 224, hash 953502D8 + sample 46: + time = 2186998 + flags = 1 + data = length 214, hash 92B87FE7 + sample 47: + time = 2210217 + flags = 1 + data = length 213, hash BB0C8D86 + sample 48: + time = 2233436 + flags = 1 + data = length 206, hash 9AD21017 + sample 49: + time = 2256655 + flags = 1 + data = length 209, hash C479FE94 + sample 50: + time = 2279874 + flags = 1 + data = length 220, hash 3033DCE1 + sample 51: + time = 2303093 + flags = 1 + data = length 217, hash 7D589C94 + sample 52: + time = 2326312 + flags = 1 + data = length 216, hash AAF6C183 + sample 53: + time = 2349531 + flags = 1 + data = length 206, hash 1EE1207F + sample 54: + time = 2372750 + flags = 1 + data = length 204, hash 4BEB1210 + sample 55: + time = 2395969 + flags = 1 + data = length 213, hash 21A841C9 + sample 56: + time = 2419188 + flags = 1 + data = length 207, hash B80B0424 + sample 57: + time = 2442407 + flags = 1 + data = length 212, hash 4785A1C3 + sample 58: + time = 2465626 + flags = 1 + data = length 205, hash 59BF7229 + sample 59: + time = 2488845 + flags = 1 + data = length 208, hash FA313DDE + sample 60: + time = 2512064 + flags = 1 + data = length 211, hash 190D85FD + sample 61: + time = 2535283 + flags = 1 + data = length 211, hash BA050052 + sample 62: + time = 2558502 + flags = 1 + data = length 211, hash F3080F10 + sample 63: + time = 2581721 + flags = 1 + data = length 210, hash F41B7BE7 + sample 64: + time = 2604940 + flags = 1 + data = length 207, hash 2176C97E + sample 65: + time = 2628159 + flags = 1 + data = length 220, hash 32087455 + sample 66: + time = 2651378 + flags = 1 + data = length 213, hash 4E5649A8 + sample 67: + time = 2674597 + flags = 1 + data = length 213, hash 5F12FDCF + sample 68: + time = 2697816 + flags = 1 + data = length 204, hash 1E895C2A + sample 69: + time = 2721035 + flags = 1 + data = length 219, hash 45382270 + sample 70: + time = 2744254 + flags = 1 + data = length 205, hash D66C6A1D + sample 71: + time = 2767473 + flags = 1 + data = length 204, hash 467AD01F + sample 72: + time = 2790692 + flags = 1 + data = length 211, hash F0435574 + sample 73: + time = 2813911 + flags = 1 + data = length 206, hash 8C96B75F + sample 74: + time = 2837130 + flags = 1 + data = length 200, hash 82553248 + sample 75: + time = 2860349 + flags = 1 + data = length 180, hash 1E51E6CE + sample 76: + time = 2883568 + flags = 1 + data = length 196, hash 33151DC4 + sample 77: + time = 2906787 + flags = 1 + data = length 197, hash 1E62A7D6 + sample 78: + time = 2930006 + flags = 1 + data = length 206, hash 6A6C4CC9 + sample 79: + time = 2953225 + flags = 1 + data = length 209, hash A72FABAA + sample 80: + time = 2976444 + flags = 1 + data = length 217, hash BA33B985 + sample 81: + time = 2999663 + flags = 1 + data = length 235, hash 9919CFD9 + sample 82: + time = 3022882 + flags = 1 + data = length 236, hash A22C7267 + sample 83: + time = 3046101 + flags = 1 + data = length 213, hash 3D57C901 + sample 84: + time = 3069320 + flags = 1 + data = length 205, hash 47F68FDE + sample 85: + time = 3092539 + flags = 1 + data = length 210, hash 9A756E9C + sample 86: + time = 3115758 + flags = 1 + data = length 210, hash BD45C31F + sample 87: + time = 3138977 + flags = 1 + data = length 207, hash 8774FF7B + sample 88: + time = 3162196 + flags = 1 + data = length 149, hash 4678C0E5 + sample 89: + time = 3185415 + flags = 1 + data = length 161, hash E991035D + sample 90: + time = 3208634 + flags = 1 + data = length 197, hash C3013689 + sample 91: + time = 3231853 + flags = 1 + data = length 208, hash E6C0237 + sample 92: + time = 3255072 + flags = 1 + data = length 232, hash A330F188 + sample 93: + time = 3278291 + flags = 1 + data = length 174, hash 2B69C34E +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/id3 + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 0 + sample count = 0 +tracksEnded = true diff --git a/library/core/src/test/assets/ts/sample_cbs.adts.2.dump b/library/core/src/test/assets/ts/sample_cbs.adts.2.dump new file mode 100644 index 0000000000..2e581bca28 --- /dev/null +++ b/library/core/src/test/assets/ts/sample_cbs.adts.2.dump @@ -0,0 +1,251 @@ +seekMap: + isSeekable = true + duration = 3356772 + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 2 +track 0: + format: + bitrate = -1 + id = 0 + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 2, hash 5F7 + total output bytes = 10161 + sample count = 49 + sample 0: + time = 2237848 + flags = 1 + data = length 224, hash 953502D8 + sample 1: + time = 2261067 + flags = 1 + data = length 214, hash 92B87FE7 + sample 2: + time = 2284286 + flags = 1 + data = length 213, hash BB0C8D86 + sample 3: + time = 2307505 + flags = 1 + data = length 206, hash 9AD21017 + sample 4: + time = 2330724 + flags = 1 + data = length 209, hash C479FE94 + sample 5: + time = 2353943 + flags = 1 + data = length 220, hash 3033DCE1 + sample 6: + time = 2377162 + flags = 1 + data = length 217, hash 7D589C94 + sample 7: + time = 2400381 + flags = 1 + data = length 216, hash AAF6C183 + sample 8: + time = 2423600 + flags = 1 + data = length 206, hash 1EE1207F + sample 9: + time = 2446819 + flags = 1 + data = length 204, hash 4BEB1210 + sample 10: + time = 2470038 + flags = 1 + data = length 213, hash 21A841C9 + sample 11: + time = 2493257 + flags = 1 + data = length 207, hash B80B0424 + sample 12: + time = 2516476 + flags = 1 + data = length 212, hash 4785A1C3 + sample 13: + time = 2539695 + flags = 1 + data = length 205, hash 59BF7229 + sample 14: + time = 2562914 + flags = 1 + data = length 208, hash FA313DDE + sample 15: + time = 2586133 + flags = 1 + data = length 211, hash 190D85FD + sample 16: + time = 2609352 + flags = 1 + data = length 211, hash BA050052 + sample 17: + time = 2632571 + flags = 1 + data = length 211, hash F3080F10 + sample 18: + time = 2655790 + flags = 1 + data = length 210, hash F41B7BE7 + sample 19: + time = 2679009 + flags = 1 + data = length 207, hash 2176C97E + sample 20: + time = 2702228 + flags = 1 + data = length 220, hash 32087455 + sample 21: + time = 2725447 + flags = 1 + data = length 213, hash 4E5649A8 + sample 22: + time = 2748666 + flags = 1 + data = length 213, hash 5F12FDCF + sample 23: + time = 2771885 + flags = 1 + data = length 204, hash 1E895C2A + sample 24: + time = 2795104 + flags = 1 + data = length 219, hash 45382270 + sample 25: + time = 2818323 + flags = 1 + data = length 205, hash D66C6A1D + sample 26: + time = 2841542 + flags = 1 + data = length 204, hash 467AD01F + sample 27: + time = 2864761 + flags = 1 + data = length 211, hash F0435574 + sample 28: + time = 2887980 + flags = 1 + data = length 206, hash 8C96B75F + sample 29: + time = 2911199 + flags = 1 + data = length 200, hash 82553248 + sample 30: + time = 2934418 + flags = 1 + data = length 180, hash 1E51E6CE + sample 31: + time = 2957637 + flags = 1 + data = length 196, hash 33151DC4 + sample 32: + time = 2980856 + flags = 1 + data = length 197, hash 1E62A7D6 + sample 33: + time = 3004075 + flags = 1 + data = length 206, hash 6A6C4CC9 + sample 34: + time = 3027294 + flags = 1 + data = length 209, hash A72FABAA + sample 35: + time = 3050513 + flags = 1 + data = length 217, hash BA33B985 + sample 36: + time = 3073732 + flags = 1 + data = length 235, hash 9919CFD9 + sample 37: + time = 3096951 + flags = 1 + data = length 236, hash A22C7267 + sample 38: + time = 3120170 + flags = 1 + data = length 213, hash 3D57C901 + sample 39: + time = 3143389 + flags = 1 + data = length 205, hash 47F68FDE + sample 40: + time = 3166608 + flags = 1 + data = length 210, hash 9A756E9C + sample 41: + time = 3189827 + flags = 1 + data = length 210, hash BD45C31F + sample 42: + time = 3213046 + flags = 1 + data = length 207, hash 8774FF7B + sample 43: + time = 3236265 + flags = 1 + data = length 149, hash 4678C0E5 + sample 44: + time = 3259484 + flags = 1 + data = length 161, hash E991035D + sample 45: + time = 3282703 + flags = 1 + data = length 197, hash C3013689 + sample 46: + time = 3305922 + flags = 1 + data = length 208, hash E6C0237 + sample 47: + time = 3329141 + flags = 1 + data = length 232, hash A330F188 + sample 48: + time = 3352360 + flags = 1 + data = length 174, hash 2B69C34E +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/id3 + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 0 + sample count = 0 +tracksEnded = true diff --git a/library/core/src/test/assets/ts/sample_cbs.adts.3.dump b/library/core/src/test/assets/ts/sample_cbs.adts.3.dump new file mode 100644 index 0000000000..e134a711bf --- /dev/null +++ b/library/core/src/test/assets/ts/sample_cbs.adts.3.dump @@ -0,0 +1,59 @@ +seekMap: + isSeekable = true + duration = 3356772 + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 2 +track 0: + format: + bitrate = -1 + id = 0 + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 2, hash 5F7 + total output bytes = 174 + sample count = 1 + sample 0: + time = 3356772 + flags = 1 + data = length 174, hash 2B69C34E +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/id3 + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 0 + sample count = 0 +tracksEnded = true diff --git a/library/core/src/test/assets/ts/sample_cbs.adts.unklen.dump b/library/core/src/test/assets/ts/sample_cbs.adts.unklen.dump new file mode 100644 index 0000000000..93d7b776c0 --- /dev/null +++ b/library/core/src/test/assets/ts/sample_cbs.adts.unklen.dump @@ -0,0 +1,631 @@ +seekMap: + isSeekable = false + duration = UNSET TIME + getPosition(0) = [[timeUs=0, position=0]] +numberOfTracks = 2 +track 0: + format: + bitrate = -1 + id = 0 + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 2, hash 5F7 + total output bytes = 30797 + sample count = 144 + sample 0: + time = 0 + flags = 1 + data = length 23, hash 47DE9131 + sample 1: + time = 23219 + flags = 1 + data = length 6, hash 31CF3A46 + sample 2: + time = 46438 + flags = 1 + data = length 6, hash 31CF3A46 + sample 3: + time = 69657 + flags = 1 + data = length 6, hash 31CF3A46 + sample 4: + time = 92876 + flags = 1 + data = length 6, hash 31EC5206 + sample 5: + time = 116095 + flags = 1 + data = length 171, hash 4F6478F6 + sample 6: + time = 139314 + flags = 1 + data = length 202, hash AF4068A3 + sample 7: + time = 162533 + flags = 1 + data = length 210, hash E4C10618 + sample 8: + time = 185752 + flags = 1 + data = length 217, hash 9ECCD0D9 + sample 9: + time = 208971 + flags = 1 + data = length 212, hash 6BAC2CD9 + sample 10: + time = 232190 + flags = 1 + data = length 223, hash 188B6010 + sample 11: + time = 255409 + flags = 1 + data = length 222, hash C1A04D0C + sample 12: + time = 278628 + flags = 1 + data = length 220, hash D65F9768 + sample 13: + time = 301847 + flags = 1 + data = length 227, hash B96C9E14 + sample 14: + time = 325066 + flags = 1 + data = length 229, hash 9FB09972 + sample 15: + time = 348285 + flags = 1 + data = length 220, hash 2271F053 + sample 16: + time = 371504 + flags = 1 + data = length 226, hash 5EDD2F4F + sample 17: + time = 394723 + flags = 1 + data = length 239, hash 957510E0 + sample 18: + time = 417942 + flags = 1 + data = length 224, hash 718A8F47 + sample 19: + time = 441161 + flags = 1 + data = length 225, hash 5E11E293 + sample 20: + time = 464380 + flags = 1 + data = length 227, hash FCE50D27 + sample 21: + time = 487599 + flags = 1 + data = length 212, hash 77908C40 + sample 22: + time = 510818 + flags = 1 + data = length 227, hash 34C4EB32 + sample 23: + time = 534037 + flags = 1 + data = length 231, hash 95488307 + sample 24: + time = 557256 + flags = 1 + data = length 226, hash 97F12D6F + sample 25: + time = 580475 + flags = 1 + data = length 236, hash 91A9D9A2 + sample 26: + time = 603694 + flags = 1 + data = length 227, hash 27A608F9 + sample 27: + time = 626913 + flags = 1 + data = length 229, hash 57DAAE4 + sample 28: + time = 650132 + flags = 1 + data = length 235, hash ED30AC34 + sample 29: + time = 673351 + flags = 1 + data = length 227, hash BD3D6280 + sample 30: + time = 696570 + flags = 1 + data = length 233, hash 694B1087 + sample 31: + time = 719789 + flags = 1 + data = length 232, hash 1EDFE047 + sample 32: + time = 743008 + flags = 1 + data = length 228, hash E2A831F4 + sample 33: + time = 766227 + flags = 1 + data = length 231, hash 757E6012 + sample 34: + time = 789446 + flags = 1 + data = length 223, hash 4003D791 + sample 35: + time = 812665 + flags = 1 + data = length 232, hash 3CF9A07C + sample 36: + time = 835884 + flags = 1 + data = length 228, hash 25AC3FF7 + sample 37: + time = 859103 + flags = 1 + data = length 220, hash 2C1824CE + sample 38: + time = 882322 + flags = 1 + data = length 229, hash 46FDD8FB + sample 39: + time = 905541 + flags = 1 + data = length 237, hash F6988018 + sample 40: + time = 928760 + flags = 1 + data = length 242, hash 60436B6B + sample 41: + time = 951979 + flags = 1 + data = length 275, hash 90EDFA8E + sample 42: + time = 975198 + flags = 1 + data = length 242, hash 5C86EFCB + sample 43: + time = 998417 + flags = 1 + data = length 233, hash E0A51B82 + sample 44: + time = 1021636 + flags = 1 + data = length 235, hash 590DF14F + sample 45: + time = 1044855 + flags = 1 + data = length 238, hash 69AF4E6E + sample 46: + time = 1068074 + flags = 1 + data = length 235, hash E745AE8D + sample 47: + time = 1091293 + flags = 1 + data = length 223, hash 295F2A13 + sample 48: + time = 1114512 + flags = 1 + data = length 228, hash E2F47B21 + sample 49: + time = 1137731 + flags = 1 + data = length 229, hash 262C3CFE + sample 50: + time = 1160950 + flags = 1 + data = length 232, hash 4B5BF5E8 + sample 51: + time = 1184169 + flags = 1 + data = length 233, hash F3D80836 + sample 52: + time = 1207388 + flags = 1 + data = length 237, hash 32E0A11E + sample 53: + time = 1230607 + flags = 1 + data = length 228, hash E1B89F13 + sample 54: + time = 1253826 + flags = 1 + data = length 237, hash 8BDD9E38 + sample 55: + time = 1277045 + flags = 1 + data = length 235, hash 3C84161F + sample 56: + time = 1300264 + flags = 1 + data = length 227, hash A47E1789 + sample 57: + time = 1323483 + flags = 1 + data = length 228, hash 869FDFD3 + sample 58: + time = 1346702 + flags = 1 + data = length 233, hash 272ECE2 + sample 59: + time = 1369921 + flags = 1 + data = length 227, hash DB6B9618 + sample 60: + time = 1393140 + flags = 1 + data = length 212, hash 63214325 + sample 61: + time = 1416359 + flags = 1 + data = length 221, hash 9BA588A1 + sample 62: + time = 1439578 + flags = 1 + data = length 225, hash 21EFD50C + sample 63: + time = 1462797 + flags = 1 + data = length 231, hash F3AD0BF + sample 64: + time = 1486016 + flags = 1 + data = length 224, hash 822C9210 + sample 65: + time = 1509235 + flags = 1 + data = length 195, hash D4EF53EE + sample 66: + time = 1532454 + flags = 1 + data = length 195, hash A816647A + sample 67: + time = 1555673 + flags = 1 + data = length 184, hash 9A2B7E6 + sample 68: + time = 1578892 + flags = 1 + data = length 210, hash 956E3600 + sample 69: + time = 1602111 + flags = 1 + data = length 234, hash 35CFDA0A + sample 70: + time = 1625330 + flags = 1 + data = length 239, hash 9E15AC1E + sample 71: + time = 1648549 + flags = 1 + data = length 228, hash F3B70641 + sample 72: + time = 1671768 + flags = 1 + data = length 237, hash 124E3194 + sample 73: + time = 1694987 + flags = 1 + data = length 231, hash 950CD7C8 + sample 74: + time = 1718206 + flags = 1 + data = length 236, hash A12E49AF + sample 75: + time = 1741425 + flags = 1 + data = length 242, hash 43BC9C24 + sample 76: + time = 1764644 + flags = 1 + data = length 241, hash DCF0B17 + sample 77: + time = 1787863 + flags = 1 + data = length 251, hash C0B99968 + sample 78: + time = 1811082 + flags = 1 + data = length 245, hash 9B38ED1C + sample 79: + time = 1834301 + flags = 1 + data = length 238, hash 1BA69079 + sample 80: + time = 1857520 + flags = 1 + data = length 233, hash 44C8C6BF + sample 81: + time = 1880739 + flags = 1 + data = length 231, hash EABBEE02 + sample 82: + time = 1903958 + flags = 1 + data = length 226, hash D09C44FB + sample 83: + time = 1927177 + flags = 1 + data = length 235, hash BE6A6608 + sample 84: + time = 1950396 + flags = 1 + data = length 235, hash 2735F454 + sample 85: + time = 1973615 + flags = 1 + data = length 238, hash B160DFE7 + sample 86: + time = 1996834 + flags = 1 + data = length 232, hash 1B217D2E + sample 87: + time = 2020053 + flags = 1 + data = length 251, hash D1C14CEA + sample 88: + time = 2043272 + flags = 1 + data = length 256, hash 97C87F08 + sample 89: + time = 2066491 + flags = 1 + data = length 237, hash 6645DB3 + sample 90: + time = 2089710 + flags = 1 + data = length 235, hash 727A1C82 + sample 91: + time = 2112929 + flags = 1 + data = length 234, hash 5015F8B5 + sample 92: + time = 2136148 + flags = 1 + data = length 241, hash 9102144B + sample 93: + time = 2159367 + flags = 1 + data = length 224, hash 64E0D807 + sample 94: + time = 2182586 + flags = 1 + data = length 228, hash 1922B852 + sample 95: + time = 2205805 + flags = 1 + data = length 224, hash 953502D8 + sample 96: + time = 2229024 + flags = 1 + data = length 214, hash 92B87FE7 + sample 97: + time = 2252243 + flags = 1 + data = length 213, hash BB0C8D86 + sample 98: + time = 2275462 + flags = 1 + data = length 206, hash 9AD21017 + sample 99: + time = 2298681 + flags = 1 + data = length 209, hash C479FE94 + sample 100: + time = 2321900 + flags = 1 + data = length 220, hash 3033DCE1 + sample 101: + time = 2345119 + flags = 1 + data = length 217, hash 7D589C94 + sample 102: + time = 2368338 + flags = 1 + data = length 216, hash AAF6C183 + sample 103: + time = 2391557 + flags = 1 + data = length 206, hash 1EE1207F + sample 104: + time = 2414776 + flags = 1 + data = length 204, hash 4BEB1210 + sample 105: + time = 2437995 + flags = 1 + data = length 213, hash 21A841C9 + sample 106: + time = 2461214 + flags = 1 + data = length 207, hash B80B0424 + sample 107: + time = 2484433 + flags = 1 + data = length 212, hash 4785A1C3 + sample 108: + time = 2507652 + flags = 1 + data = length 205, hash 59BF7229 + sample 109: + time = 2530871 + flags = 1 + data = length 208, hash FA313DDE + sample 110: + time = 2554090 + flags = 1 + data = length 211, hash 190D85FD + sample 111: + time = 2577309 + flags = 1 + data = length 211, hash BA050052 + sample 112: + time = 2600528 + flags = 1 + data = length 211, hash F3080F10 + sample 113: + time = 2623747 + flags = 1 + data = length 210, hash F41B7BE7 + sample 114: + time = 2646966 + flags = 1 + data = length 207, hash 2176C97E + sample 115: + time = 2670185 + flags = 1 + data = length 220, hash 32087455 + sample 116: + time = 2693404 + flags = 1 + data = length 213, hash 4E5649A8 + sample 117: + time = 2716623 + flags = 1 + data = length 213, hash 5F12FDCF + sample 118: + time = 2739842 + flags = 1 + data = length 204, hash 1E895C2A + sample 119: + time = 2763061 + flags = 1 + data = length 219, hash 45382270 + sample 120: + time = 2786280 + flags = 1 + data = length 205, hash D66C6A1D + sample 121: + time = 2809499 + flags = 1 + data = length 204, hash 467AD01F + sample 122: + time = 2832718 + flags = 1 + data = length 211, hash F0435574 + sample 123: + time = 2855937 + flags = 1 + data = length 206, hash 8C96B75F + sample 124: + time = 2879156 + flags = 1 + data = length 200, hash 82553248 + sample 125: + time = 2902375 + flags = 1 + data = length 180, hash 1E51E6CE + sample 126: + time = 2925594 + flags = 1 + data = length 196, hash 33151DC4 + sample 127: + time = 2948813 + flags = 1 + data = length 197, hash 1E62A7D6 + sample 128: + time = 2972032 + flags = 1 + data = length 206, hash 6A6C4CC9 + sample 129: + time = 2995251 + flags = 1 + data = length 209, hash A72FABAA + sample 130: + time = 3018470 + flags = 1 + data = length 217, hash BA33B985 + sample 131: + time = 3041689 + flags = 1 + data = length 235, hash 9919CFD9 + sample 132: + time = 3064908 + flags = 1 + data = length 236, hash A22C7267 + sample 133: + time = 3088127 + flags = 1 + data = length 213, hash 3D57C901 + sample 134: + time = 3111346 + flags = 1 + data = length 205, hash 47F68FDE + sample 135: + time = 3134565 + flags = 1 + data = length 210, hash 9A756E9C + sample 136: + time = 3157784 + flags = 1 + data = length 210, hash BD45C31F + sample 137: + time = 3181003 + flags = 1 + data = length 207, hash 8774FF7B + sample 138: + time = 3204222 + flags = 1 + data = length 149, hash 4678C0E5 + sample 139: + time = 3227441 + flags = 1 + data = length 161, hash E991035D + sample 140: + time = 3250660 + flags = 1 + data = length 197, hash C3013689 + sample 141: + time = 3273879 + flags = 1 + data = length 208, hash E6C0237 + sample 142: + time = 3297098 + flags = 1 + data = length 232, hash A330F188 + sample 143: + time = 3320317 + flags = 1 + data = length 174, hash 2B69C34E +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = application/id3 + maxInputSize = -1 + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = 0 + encoderPadding = 0 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + total output bytes = 0 + sample count = 0 +tracksEnded = true diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorSeekTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorSeekTest.java index b7098abfcf..9f9051087d 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorSeekTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorSeekTest.java @@ -17,23 +17,13 @@ package com.google.android.exoplayer2.extractor.amr; import static com.google.common.truth.Truth.assertThat; -import android.content.Context; import android.net.Uri; -import android.support.annotation.Nullable; -import com.google.android.exoplayer2.C; -import com.google.android.exoplayer2.extractor.DefaultExtractorInput; -import com.google.android.exoplayer2.extractor.Extractor; -import com.google.android.exoplayer2.extractor.ExtractorInput; -import com.google.android.exoplayer2.extractor.PositionHolder; import com.google.android.exoplayer2.extractor.SeekMap; -import com.google.android.exoplayer2.testutil.FakeExtractorInput; import com.google.android.exoplayer2.testutil.FakeExtractorOutput; import com.google.android.exoplayer2.testutil.FakeTrackOutput; import com.google.android.exoplayer2.testutil.TestUtil; -import com.google.android.exoplayer2.upstream.DataSpec; import com.google.android.exoplayer2.upstream.DefaultDataSource; import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; -import com.google.android.exoplayer2.util.Util; import java.io.IOException; import java.util.List; import java.util.Random; @@ -43,7 +33,7 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; -/** Unit test for {@link AmrExtractor} narrow-band AMR file. */ +/** Unit test for {@link AmrExtractor}. */ @RunWith(RobolectricTestRunner.class) public final class AmrExtractorSeekTest { @@ -57,28 +47,28 @@ public final class AmrExtractorSeekTest { private FakeTrackOutput expectedTrackOutput; private DefaultDataSource dataSource; - private PositionHolder positionHolder; - - private long totalInputLength; @Before public void setUp() { dataSource = new DefaultDataSourceFactory(RuntimeEnvironment.application, "UserAgent") .createDataSource(); - positionHolder = new PositionHolder(); } @Test public void testAmrExtractorReads_returnSeekableSeekMap_forNarrowBandAmr() throws IOException, InterruptedException { String fileName = NARROW_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); - SeekMap seekMap = extractSeekMap(extractor, new FakeExtractorOutput(), fileName); + AmrExtractor extractor = createAmrExtractor(); + SeekMap seekMap = + TestUtil.extractSeekMap(extractor, new FakeExtractorOutput(), dataSource, fileUri); assertThat(seekMap).isNotNull(); assertThat(seekMap.getDurationUs()).isEqualTo(NARROW_BAND_FILE_DURATION_US); @@ -89,19 +79,23 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekingToPositionInFile_extractsCorrectFrame_forNarrowBandAmr() throws IOException, InterruptedException { String fileName = NARROW_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long targetSeekTimeUs = 980_000; int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -112,19 +106,23 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekToEoF_extractsLastFrame_forNarrowBandAmr() throws IOException, InterruptedException { String fileName = NARROW_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long targetSeekTimeUs = seekMap.getDurationUs(); int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -135,21 +133,25 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekingBackward_extractsCorrectFrames_forNarrowBandAmr() throws IOException, InterruptedException { String fileName = NARROW_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long firstSeekTimeUs = 980_000; - seekToTimeUs(extractor, seekMap, firstSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs(extractor, seekMap, firstSeekTimeUs, dataSource, trackOutput, fileUri); long targetSeekTimeUs = 0; int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -160,21 +162,25 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekingForward_extractsCorrectFrames_forNarrowBandAmr() throws IOException, InterruptedException { String fileName = NARROW_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long firstSeekTimeUs = 980_000; - seekToTimeUs(extractor, seekMap, firstSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs(extractor, seekMap, firstSeekTimeUs, dataSource, trackOutput, fileUri); long targetSeekTimeUs = 1_200_000; int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -185,20 +191,24 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesRandomSeeks_extractsCorrectFrames_forNarrowBandAmr() throws IOException, InterruptedException { String fileName = NARROW_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long numSeek = 100; for (long i = 0; i < numSeek; i++) { long targetSeekTimeUs = random.nextInt(NARROW_BAND_FILE_DURATION_US + 1); int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -210,12 +220,16 @@ public final class AmrExtractorSeekTest { public void testAmrExtractorReads_returnSeekableSeekMap_forWideBandAmr() throws IOException, InterruptedException { String fileName = WIDE_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); - SeekMap seekMap = extractSeekMap(extractor, new FakeExtractorOutput(), fileName); + AmrExtractor extractor = createAmrExtractor(); + SeekMap seekMap = + TestUtil.extractSeekMap(extractor, new FakeExtractorOutput(), dataSource, fileUri); assertThat(seekMap).isNotNull(); assertThat(seekMap.getDurationUs()).isEqualTo(WIDE_BAND_FILE_DURATION_US); @@ -226,19 +240,23 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekingToPositionInFile_extractsCorrectFrame_forWideBandAmr() throws IOException, InterruptedException { String fileName = WIDE_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long targetSeekTimeUs = 980_000; int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -249,19 +267,23 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekToEoF_extractsLastFrame_forWideBandAmr() throws IOException, InterruptedException { String fileName = WIDE_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long targetSeekTimeUs = seekMap.getDurationUs(); int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -272,21 +294,25 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekingBackward_extractsCorrectFrames_forWideBandAmr() throws IOException, InterruptedException { String fileName = WIDE_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long firstSeekTimeUs = 980_000; - seekToTimeUs(extractor, seekMap, firstSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs(extractor, seekMap, firstSeekTimeUs, dataSource, trackOutput, fileUri); long targetSeekTimeUs = 0; int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -297,21 +323,25 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesSeekingForward_extractsCorrectFrames_forWideBandAmr() throws IOException, InterruptedException { String fileName = WIDE_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long firstSeekTimeUs = 980_000; - seekToTimeUs(extractor, seekMap, firstSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs(extractor, seekMap, firstSeekTimeUs, dataSource, trackOutput, fileUri); long targetSeekTimeUs = 1_200_000; int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -322,20 +352,24 @@ public final class AmrExtractorSeekTest { public void testSeeking_handlesRandomSeeks_extractsCorrectFrames_forWideBandAmr() throws IOException, InterruptedException { String fileName = WIDE_BAND_AMR_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); expectedTrackOutput = - extractAllSamplesFromFileToExpectedOutput(RuntimeEnvironment.application, fileName); - totalInputLength = readInputLength(fileName); - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + TestUtil.extractAllSamplesFromFile( + createAmrExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AmrExtractor extractor = createAmrExtractor(); FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); - SeekMap seekMap = extractSeekMap(extractor, extractorOutput, fileName); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); long numSeek = 100; for (long i = 0; i < numSeek; i++) { long targetSeekTimeUs = random.nextInt(NARROW_BAND_FILE_DURATION_US + 1); int extractedFrameIndex = - seekToTimeUs(extractor, seekMap, targetSeekTimeUs, trackOutput, fileName); + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); assertThat(extractedFrameIndex).isNotEqualTo(-1); assertFirstFrameAfterSeekContainTargetSeekTime( @@ -345,82 +379,8 @@ public final class AmrExtractorSeekTest { // Internal methods - private static String assetPathForFile(String fileName) { - return "asset:///" + fileName; - } - - private long readInputLength(String fileName) throws IOException { - DataSpec dataSpec = - new DataSpec( - Uri.parse(assetPathForFile(fileName)), - /* absoluteStreamPosition= */ 0, - /* length= */ C.LENGTH_UNSET, - /* key= */ null); - long totalInputLength = dataSource.open(dataSpec); - Util.closeQuietly(dataSource); - return totalInputLength; - } - - /** - * Seeks to the given seek time and keeps reading from input until we can extract at least one - * frame from the seek position, or until end-of-input is reached. - * - * @return The index of the first extracted frame written to the given {@code trackOutput} after - * the seek is completed, or -1 if the seek is completed without any extracted frame. - */ - private int seekToTimeUs( - AmrExtractor amrExtractor, - SeekMap seekMap, - long seekTimeUs, - FakeTrackOutput trackOutput, - String fileName) - throws IOException, InterruptedException { - int numSampleBeforeSeek = trackOutput.getSampleCount(); - SeekMap.SeekPoints seekPoints = seekMap.getSeekPoints(seekTimeUs); - - long initialSeekLoadPosition = seekPoints.first.position; - amrExtractor.seek(initialSeekLoadPosition, seekTimeUs); - - positionHolder.position = C.POSITION_UNSET; - ExtractorInput extractorInput = - getExtractorInputFromPosition(initialSeekLoadPosition, fileName); - int extractorReadResult = Extractor.RESULT_CONTINUE; - while (true) { - try { - // Keep reading until we can read at least one frame after seek - while (extractorReadResult == Extractor.RESULT_CONTINUE - && trackOutput.getSampleCount() == numSampleBeforeSeek) { - extractorReadResult = amrExtractor.read(extractorInput, positionHolder); - } - } finally { - Util.closeQuietly(dataSource); - } - - if (extractorReadResult == Extractor.RESULT_SEEK) { - extractorInput = getExtractorInputFromPosition(positionHolder.position, fileName); - extractorReadResult = Extractor.RESULT_CONTINUE; - } else if (extractorReadResult == Extractor.RESULT_END_OF_INPUT) { - return -1; - } else if (trackOutput.getSampleCount() > numSampleBeforeSeek) { - // First index after seek = num sample before seek. - return numSampleBeforeSeek; - } - } - } - - private @Nullable SeekMap extractSeekMap( - AmrExtractor extractor, FakeExtractorOutput output, String fileName) - throws IOException, InterruptedException { - try { - ExtractorInput input = getExtractorInputFromPosition(/* position= */ 0, fileName); - extractor.init(output); - while (output.seekMap == null) { - extractor.read(input, positionHolder); - } - } finally { - Util.closeQuietly(dataSource); - } - return output.seekMap; + private AmrExtractor createAmrExtractor() { + return new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); } private void assertFirstFrameAfterSeekContainTargetSeekTime( @@ -447,26 +407,4 @@ public final class AmrExtractorSeekTest { } return sampleTimes.size() - 1; } - - private ExtractorInput getExtractorInputFromPosition(long position, String fileName) - throws IOException { - DataSpec dataSpec = - new DataSpec( - Uri.parse(assetPathForFile(fileName)), position, totalInputLength, /* key= */ null); - dataSource.open(dataSpec); - return new DefaultExtractorInput(dataSource, position, totalInputLength); - } - - private FakeTrackOutput extractAllSamplesFromFileToExpectedOutput( - Context context, String fileName) throws IOException, InterruptedException { - byte[] data = TestUtil.getByteArray(context, fileName); - - AmrExtractor extractor = new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); - FakeExtractorOutput expectedOutput = new FakeExtractorOutput(); - extractor.init(expectedOutput); - FakeExtractorInput input = new FakeExtractorInput.Builder().setData(data).build(); - - while (extractor.read(input, new PositionHolder()) != Extractor.RESULT_END_OF_INPUT) {} - return expectedOutput.trackOutputs.get(0); - } } diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorTest.java index b46612e7c3..39c1bfe05b 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/amr/AmrExtractorTest.java @@ -179,12 +179,26 @@ public final class AmrExtractorTest { @Test public void testExtractingNarrowBandSamples() throws Exception { - ExtractorAsserts.assertBehavior(createAmrExtractorFactory(), "amr/sample_nb.amr"); + ExtractorAsserts.assertBehavior( + createAmrExtractorFactory(/* withSeeking= */ false), "amr/sample_nb.amr"); } @Test public void testExtractingWideBandSamples() throws Exception { - ExtractorAsserts.assertBehavior(createAmrExtractorFactory(), "amr/sample_wb.amr"); + ExtractorAsserts.assertBehavior( + createAmrExtractorFactory(/* withSeeking= */ false), "amr/sample_wb.amr"); + } + + @Test + public void testExtractingNarrowBandSamples_withSeeking() throws Exception { + ExtractorAsserts.assertBehavior( + createAmrExtractorFactory(/* withSeeking= */ true), "amr/sample_nb_cbr.amr"); + } + + @Test + public void testExtractingWideBandSamples_withSeeking() throws Exception { + ExtractorAsserts.assertBehavior( + createAmrExtractorFactory(/* withSeeking= */ true), "amr/sample_wb_cbr.amr"); } private byte[] newWideBandAmrFrameWithType(int frameType) { @@ -235,11 +249,15 @@ public final class AmrExtractorTest { } @NonNull - private static ExtractorAsserts.ExtractorFactory createAmrExtractorFactory() { + private static ExtractorAsserts.ExtractorFactory createAmrExtractorFactory(boolean withSeeking) { return new ExtractorAsserts.ExtractorFactory() { @Override public Extractor create() { - return new AmrExtractor(); + if (!withSeeking) { + return new AmrExtractor(); + } else { + return new AmrExtractor(AmrExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + } } }; } diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorSeekTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorSeekTest.java new file mode 100644 index 0000000000..d5103aa682 --- /dev/null +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorSeekTest.java @@ -0,0 +1,256 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.android.exoplayer2.extractor.ts; + +import static com.google.common.truth.Truth.assertThat; + +import android.net.Uri; +import com.google.android.exoplayer2.extractor.SeekMap; +import com.google.android.exoplayer2.testutil.FakeExtractorOutput; +import com.google.android.exoplayer2.testutil.FakeTrackOutput; +import com.google.android.exoplayer2.testutil.TestUtil; +import com.google.android.exoplayer2.upstream.DefaultDataSource; +import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; +import java.io.IOException; +import java.util.Arrays; +import java.util.Random; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.RuntimeEnvironment; + +/** Unit test for {@link AdtsExtractor}. */ +@RunWith(RobolectricTestRunner.class) +public final class AdtsExtractorSeekTest { + + private static final Random random = new Random(1234L); + + private static final String TEST_FILE = "ts/sample.adts"; + private static final int FILE_DURATION_US = 3_356_772; + private static final long DELTA_TIMESTAMP_THRESHOLD_US = 200_000; + + private FakeTrackOutput expectedTrackOutput; + private DefaultDataSource dataSource; + + @Before + public void setUp() { + dataSource = + new DefaultDataSourceFactory(RuntimeEnvironment.application, "UserAgent") + .createDataSource(); + } + + @Test + public void testAdtsExtractorReads_returnSeekableSeekMap() + throws IOException, InterruptedException { + String fileName = TEST_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); + expectedTrackOutput = + TestUtil.extractAllSamplesFromFile( + createAdtsExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + + AdtsExtractor extractor = createAdtsExtractor(); + SeekMap seekMap = + TestUtil.extractSeekMap(extractor, new FakeExtractorOutput(), dataSource, fileUri); + + assertThat(seekMap).isNotNull(); + assertThat(seekMap.getDurationUs()).isEqualTo(FILE_DURATION_US); + assertThat(seekMap.isSeekable()).isTrue(); + } + + @Test + public void testSeeking_handlesSeekingToPositionInFile_extractsCorrectSample() + throws IOException, InterruptedException { + String fileName = TEST_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); + expectedTrackOutput = + TestUtil.extractAllSamplesFromFile( + createAdtsExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + + AdtsExtractor extractor = createAdtsExtractor(); + + FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); + FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); + + long targetSeekTimeUs = 3330033; // 980_000; + int extractedSampleIndex = + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); + + assertThat(extractedSampleIndex).isNotEqualTo(-1); + assertFirstSampleAfterSeekContainTargetSeekTime( + trackOutput, targetSeekTimeUs, extractedSampleIndex); + } + + @Test + public void testSeeking_handlesSeekToEoF_extractsLastSample() + throws IOException, InterruptedException { + String fileName = TEST_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); + expectedTrackOutput = + TestUtil.extractAllSamplesFromFile( + createAdtsExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AdtsExtractor extractor = createAdtsExtractor(); + + FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); + FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); + + long targetSeekTimeUs = seekMap.getDurationUs(); + + int extractedSampleIndex = + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); + + assertThat(extractedSampleIndex).isNotEqualTo(-1); + assertFirstSampleAfterSeekContainTargetSeekTime( + trackOutput, targetSeekTimeUs, extractedSampleIndex); + } + + @Test + public void testSeeking_handlesSeekingBackward_extractsCorrectSamples() + throws IOException, InterruptedException { + String fileName = TEST_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); + expectedTrackOutput = + TestUtil.extractAllSamplesFromFile( + createAdtsExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AdtsExtractor extractor = createAdtsExtractor(); + + FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); + FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); + + long firstSeekTimeUs = 980_000; + TestUtil.seekToTimeUs(extractor, seekMap, firstSeekTimeUs, dataSource, trackOutput, fileUri); + + long targetSeekTimeUs = 0; + int extractedSampleIndex = + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); + + assertThat(extractedSampleIndex).isNotEqualTo(-1); + assertFirstSampleAfterSeekContainTargetSeekTime( + trackOutput, targetSeekTimeUs, extractedSampleIndex); + } + + @Test + public void testSeeking_handlesSeekingForward_extractsCorrectSamples() + throws IOException, InterruptedException { + String fileName = TEST_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); + expectedTrackOutput = + TestUtil.extractAllSamplesFromFile( + createAdtsExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AdtsExtractor extractor = createAdtsExtractor(); + + FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); + FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); + + long firstSeekTimeUs = 980_000; + TestUtil.seekToTimeUs(extractor, seekMap, firstSeekTimeUs, dataSource, trackOutput, fileUri); + + long targetSeekTimeUs = 1_200_000; + int extractedSampleIndex = + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); + + assertThat(extractedSampleIndex).isNotEqualTo(-1); + assertFirstSampleAfterSeekContainTargetSeekTime( + trackOutput, targetSeekTimeUs, extractedSampleIndex); + } + + @Test + public void testSeeking_handlesRandomSeeks_extractsCorrectSamples() + throws IOException, InterruptedException { + String fileName = TEST_FILE; + Uri fileUri = TestUtil.buildAssetUri(fileName); + expectedTrackOutput = + TestUtil.extractAllSamplesFromFile( + createAdtsExtractor(), RuntimeEnvironment.application, fileName) + .trackOutputs + .get(0); + AdtsExtractor extractor = createAdtsExtractor(); + + FakeExtractorOutput extractorOutput = new FakeExtractorOutput(); + SeekMap seekMap = TestUtil.extractSeekMap(extractor, extractorOutput, dataSource, fileUri); + FakeTrackOutput trackOutput = extractorOutput.trackOutputs.get(0); + + long numSeek = 100; + for (long i = 0; i < numSeek; i++) { + long targetSeekTimeUs = random.nextInt(FILE_DURATION_US + 1); + int extractedSampleIndex = + TestUtil.seekToTimeUs( + extractor, seekMap, targetSeekTimeUs, dataSource, trackOutput, fileUri); + + assertThat(extractedSampleIndex).isNotEqualTo(-1); + assertFirstSampleAfterSeekContainTargetSeekTime( + trackOutput, targetSeekTimeUs, extractedSampleIndex); + } + } + + // Internal methods + + private static AdtsExtractor createAdtsExtractor() { + return new AdtsExtractor( + /* firstStreamSampleTimestampUs= */ 0, + /* flags= */ AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + } + + private void assertFirstSampleAfterSeekContainTargetSeekTime( + FakeTrackOutput trackOutput, long seekTimeUs, int firstSampleIndexAfterSeek) { + long outputSampleTimeUs = trackOutput.getSampleTimeUs(firstSampleIndexAfterSeek); + int expectedSampleIndex = + findOutputSampleInExpectedOutput(trackOutput.getSampleData(firstSampleIndexAfterSeek)); + // Assert that after seeking, the first sample written to output exists in the sample list + assertThat(expectedSampleIndex).isNotEqualTo(-1); + // Assert that the timestamp output for first sample after seek is near the seek point. + // For ADTS seeking, unfortunately we can't guarantee exact sample seeking, since most ADTS + // stream use VBR. + assertThat(Math.abs(outputSampleTimeUs - seekTimeUs)).isLessThan(DELTA_TIMESTAMP_THRESHOLD_US); + assertThat( + Math.abs(outputSampleTimeUs - expectedTrackOutput.getSampleTimeUs(expectedSampleIndex))) + .isLessThan(DELTA_TIMESTAMP_THRESHOLD_US); + trackOutput.assertSample( + firstSampleIndexAfterSeek, + expectedTrackOutput.getSampleData(expectedSampleIndex), + outputSampleTimeUs, + expectedTrackOutput.getSampleFlags(expectedSampleIndex), + expectedTrackOutput.getSampleCryptoData(expectedSampleIndex)); + } + + private int findOutputSampleInExpectedOutput(byte[] sampleData) { + for (int i = 0; i < expectedTrackOutput.getSampleCount(); i++) { + byte[] currentSampleData = expectedTrackOutput.getSampleData(i); + if (Arrays.equals(currentSampleData, sampleData)) { + return i; + } + } + return -1; + } +} diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorTest.java index 048a23cd67..fe2046cbe4 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractorTest.java @@ -37,4 +37,18 @@ public final class AdtsExtractorTest { }, "ts/sample.adts"); } + + @Test + public void testSample_withSeeking() throws Exception { + ExtractorAsserts.assertBehavior( + new ExtractorFactory() { + @Override + public Extractor create() { + return new AdtsExtractor( + /* firstStreamSampleTimestampUs= */ 0, + /* flags= */ AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING); + } + }, + "ts/sample_cbs.adts"); + } } diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsReaderTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsReaderTest.java index 1098ba7563..f7cfd6ccaf 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsReaderTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/ts/AdtsReaderTest.java @@ -93,14 +93,26 @@ public class AdtsReaderTest { data = new ParsableByteArray( TestUtil.joinByteArrays( + ADTS_HEADER, + ADTS_CONTENT, ADTS_HEADER, ADTS_CONTENT, // Adts sample missing the first sync byte + // The Reader should be able to read the next sample. Arrays.copyOfRange(ADTS_HEADER, 1, ADTS_HEADER.length), + ADTS_CONTENT, + ADTS_HEADER, ADTS_CONTENT)); feed(); - assertSampleCounts(0, 1); - adtsOutput.assertSample(0, ADTS_CONTENT, 0, C.BUFFER_FLAG_KEY_FRAME, null); + assertSampleCounts(0, 3); + for (int i = 0; i < 3; i++) { + adtsOutput.assertSample( + /* index= */ i, + /* data= */ ADTS_CONTENT, + /* timeUs= */ ADTS_SAMPLE_DURATION * i, + /* flags= */ C.BUFFER_FLAG_KEY_FRAME, + /* cryptoData= */ null); + } } @Test diff --git a/testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java b/testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java index 9a92ab62e8..652183a91a 100644 --- a/testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java +++ b/testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java @@ -22,8 +22,13 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; +import android.net.Uri; import com.google.android.exoplayer2.C; +import com.google.android.exoplayer2.extractor.DefaultExtractorInput; import com.google.android.exoplayer2.extractor.Extractor; +import com.google.android.exoplayer2.extractor.ExtractorInput; +import com.google.android.exoplayer2.extractor.PositionHolder; +import com.google.android.exoplayer2.extractor.SeekMap; import com.google.android.exoplayer2.testutil.FakeExtractorInput.SimulatedIOException; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DataSpec; @@ -223,4 +228,150 @@ public class TestUtil { mse / (255.0 * 255.0 * 3.0 * firstBitmap.getWidth() * firstBitmap.getHeight()); return 10 * Math.log10(1.0 / normalizedMse); } + + /** Returns the {@link Uri} for the given asset path. */ + public static Uri buildAssetUri(String assetPath) { + return Uri.parse("asset:///" + assetPath); + } + + /** + * Reads from the given input using the given {@link Extractor}, until it can produce the {@link + * SeekMap} and all of the tracks have been identified, or until the extractor encounters EOF. + * + * @param extractor The {@link Extractor} to extractor from input. + * @param output The {@link FakeTrackOutput} to store the extracted {@link SeekMap} and track. + * @param dataSource The {@link DataSource} that will be used to read from the input. + * @param uri The Uri of the input. + * @return The extracted {@link SeekMap}. + * @throws IOException If an error occurred reading from the input, or if the extractor finishes + * reading from input without extracting any {@link SeekMap}. + * @throws InterruptedException If the thread was interrupted. + */ + public static SeekMap extractSeekMap( + Extractor extractor, FakeExtractorOutput output, DataSource dataSource, Uri uri) + throws IOException, InterruptedException { + ExtractorInput input = getExtractorInputFromPosition(dataSource, /* position= */ 0, uri); + extractor.init(output); + PositionHolder positionHolder = new PositionHolder(); + int readResult = Extractor.RESULT_CONTINUE; + while (true) { + try { + // Keep reading until we can get the seek map + while (readResult == Extractor.RESULT_CONTINUE + && (output.seekMap == null || !output.tracksEnded)) { + readResult = extractor.read(input, positionHolder); + } + } finally { + Util.closeQuietly(dataSource); + } + + if (readResult == Extractor.RESULT_SEEK) { + input = getExtractorInputFromPosition(dataSource, positionHolder.position, uri); + readResult = Extractor.RESULT_CONTINUE; + } else if (readResult == Extractor.RESULT_END_OF_INPUT) { + throw new IOException("EOF encountered without seekmap"); + } + if (output.seekMap != null) { + return output.seekMap; + } + } + } + + /** + * Extracts all samples from the given file into a {@link FakeTrackOutput}. + * + * @param extractor The {@link Extractor} to extractor from input. + * @param context A {@link Context}. + * @param fileName The name of the input file. + * @return The {@link FakeTrackOutput} containing the extracted samples. + * @throws IOException If an error occurred reading from the input, or if the extractor finishes + * reading from input without extracting any {@link SeekMap}. + * @throws InterruptedException If the thread was interrupted. + */ + public static FakeExtractorOutput extractAllSamplesFromFile( + Extractor extractor, Context context, String fileName) + throws IOException, InterruptedException { + byte[] data = TestUtil.getByteArray(context, fileName); + FakeExtractorOutput expectedOutput = new FakeExtractorOutput(); + extractor.init(expectedOutput); + FakeExtractorInput input = new FakeExtractorInput.Builder().setData(data).build(); + + PositionHolder positionHolder = new PositionHolder(); + int readResult = Extractor.RESULT_CONTINUE; + while (readResult != Extractor.RESULT_END_OF_INPUT) { + while (readResult == Extractor.RESULT_CONTINUE) { + readResult = extractor.read(input, positionHolder); + } + if (readResult == Extractor.RESULT_SEEK) { + input.setPosition((int) positionHolder.position); + readResult = Extractor.RESULT_CONTINUE; + } + } + return expectedOutput; + } + + /** + * Seeks to the given seek time of the stream from the given input, and keeps reading from the + * input until we can extract at least one sample following the seek position, or until + * end-of-input is reached. + * + * @param extractor The {@link Extractor} to extractor from input. + * @param seekMap The {@link SeekMap} of the stream from the given input. + * @param seekTimeUs The seek time, in micro-seconds. + * @param trackOutput The {@link FakeTrackOutput} to store the extracted samples. + * @param dataSource The {@link DataSource} that will be used to read from the input. + * @param uri The Uri of the input. + * @return The index of the first extracted sample written to the given {@code trackOutput} after + * the seek is completed, or -1 if the seek is completed without any extracted sample. + */ + public static int seekToTimeUs( + Extractor extractor, + SeekMap seekMap, + long seekTimeUs, + DataSource dataSource, + FakeTrackOutput trackOutput, + Uri uri) + throws IOException, InterruptedException { + int numSampleBeforeSeek = trackOutput.getSampleCount(); + SeekMap.SeekPoints seekPoints = seekMap.getSeekPoints(seekTimeUs); + + long initialSeekLoadPosition = seekPoints.first.position; + extractor.seek(initialSeekLoadPosition, seekTimeUs); + + PositionHolder positionHolder = new PositionHolder(); + positionHolder.position = C.POSITION_UNSET; + ExtractorInput extractorInput = + TestUtil.getExtractorInputFromPosition(dataSource, initialSeekLoadPosition, uri); + int extractorReadResult = Extractor.RESULT_CONTINUE; + while (true) { + try { + // Keep reading until we can read at least one sample after seek + while (extractorReadResult == Extractor.RESULT_CONTINUE + && trackOutput.getSampleCount() == numSampleBeforeSeek) { + extractorReadResult = extractor.read(extractorInput, positionHolder); + } + } finally { + Util.closeQuietly(dataSource); + } + + if (extractorReadResult == Extractor.RESULT_SEEK) { + extractorInput = + TestUtil.getExtractorInputFromPosition(dataSource, positionHolder.position, uri); + extractorReadResult = Extractor.RESULT_CONTINUE; + } else if (extractorReadResult == Extractor.RESULT_END_OF_INPUT) { + return -1; + } else if (trackOutput.getSampleCount() > numSampleBeforeSeek) { + // First index after seek = num sample before seek. + return numSampleBeforeSeek; + } + } + } + + /** Returns an {@link ExtractorInput} to read from the given input at given position. */ + private static ExtractorInput getExtractorInputFromPosition( + DataSource dataSource, long position, Uri uri) throws IOException { + DataSpec dataSpec = new DataSpec(uri, position, C.LENGTH_UNSET, /* key= */ null); + long inputLength = dataSource.open(dataSpec); + return new DefaultExtractorInput(dataSource, position, inputLength); + } }