Merge pull request #1189 from v-novaltd:dsparano-exo245

PiperOrigin-RevId: 629476777
This commit is contained in:
Copybara-Service 2024-04-30 11:31:53 -07:00
commit 6e8f3a8f97
62 changed files with 400 additions and 78 deletions

View File

@ -20,6 +20,13 @@
count constraints as they only apply for playback. count constraints as they only apply for playback.
* Track Selection: * Track Selection:
* Extractors: * Extractors:
* MPEG-TS: Roll forward the change ensuring the last frame is rendered by
passing the last access unit of a stream to the sample queue
([#7909](https://github.com/google/ExoPlayer/issues/7909)).
Incorporating fixes to resolve the issues that emerged in I-frame only
HLS streams([#1150](https://github.com/google/ExoPlayer/issues/1150))
and H.262 HLS streams
([#1126](https://github.com/google/ExoPlayer/issues/1126)).
* Audio: * Audio:
* Video: * Video:
* Text: * Text:

View File

@ -159,7 +159,7 @@ public final class Ac3Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -161,7 +161,7 @@ public final class Ac4Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -194,7 +194,7 @@ public final class AdtsReader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -215,7 +215,7 @@ public final class DtsReader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -86,7 +86,7 @@ public final class DvbSubtitleReader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
if (writingSample) { if (writingSample) {
// packetStarted method must be called before reading sample. // packetStarted method must be called before reading sample.
checkState(sampleTimeUs != C.TIME_UNSET); checkState(sampleTimeUs != C.TIME_UNSET);

View File

@ -31,7 +31,7 @@ import androidx.media3.extractor.TrackOutput;
* <li>{@link #seek()} (optional, to reset the state) * <li>{@link #seek()} (optional, to reset the state)
* <li>{@link #packetStarted(long, int)} (to signal the start of a new packet) * <li>{@link #packetStarted(long, int)} (to signal the start of a new packet)
* <li>{@link #consume(ParsableByteArray)} (zero or more times, to provide packet data) * <li>{@link #consume(ParsableByteArray)} (zero or more times, to provide packet data)
* <li>{@link #packetFinished()} (to signal the end of the current packet) * <li>{@link #packetFinished(boolean)} (to signal the end of the current packet)
* <li>Repeat steps 3-5 for subsequent packets * <li>Repeat steps 3-5 for subsequent packets
* </ol> * </ol>
*/ */
@ -67,5 +67,5 @@ public interface ElementaryStreamReader {
void consume(ParsableByteArray data) throws ParserException; void consume(ParsableByteArray data) throws ParserException;
/** Called when a packet ends. */ /** Called when a packet ends. */
void packetFinished(); void packetFinished(boolean isEndOfInput);
} }

View File

@ -217,8 +217,13 @@ public final class H262Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. checkStateNotNull(output); // Asserts that createTracks has been called.
if (isEndOfInput) {
@C.BufferFlags int flags = sampleIsKeyframe ? C.BUFFER_FLAG_KEY_FRAME : 0;
int size = (int) (totalBytesWritten - samplePosition);
output.sampleMetadata(sampleTimeUs, flags, size, /* offset= */ 0, /* cryptoData= */ null);
}
} }
/** /**

View File

@ -216,8 +216,13 @@ public final class H263Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Assert that createTracks has been called.
checkStateNotNull(sampleReader);
if (isEndOfInput) {
sampleReader.onDataEnd(totalBytesWritten, /* bytesWrittenPastPosition= */ 0, hasOutputFormat);
sampleReader.reset();
}
} }
/** /**

View File

@ -167,8 +167,11 @@ public final class H264Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. assertTracksCreated();
if (isEndOfInput) {
sampleReader.end(totalBytesWritten);
}
} }
@RequiresNonNull("sampleReader") @RequiresNonNull("sampleReader")
@ -491,12 +494,24 @@ public final class H264Reader implements ElementaryStreamReader {
sampleIsKeyframe = false; sampleIsKeyframe = false;
readingSample = true; readingSample = true;
} }
setSampleIsKeyframe();
return sampleIsKeyframe;
}
public void end(long position) {
setSampleIsKeyframe();
// Output a final sample with the NAL units currently held
nalUnitStartPosition = position;
outputSample(/* offset= */ 0);
readingSample = false;
}
private void setSampleIsKeyframe() {
boolean treatIFrameAsKeyframe = boolean treatIFrameAsKeyframe =
allowNonIdrKeyframes ? sliceHeader.isISlice() : randomAccessIndicator; allowNonIdrKeyframes ? sliceHeader.isISlice() : randomAccessIndicator;
sampleIsKeyframe |= sampleIsKeyframe |=
nalUnitType == NalUnitUtil.NAL_UNIT_TYPE_IDR nalUnitType == NalUnitUtil.NAL_UNIT_TYPE_IDR
|| (treatIFrameAsKeyframe && nalUnitType == NalUnitUtil.NAL_UNIT_TYPE_NON_IDR); || (treatIFrameAsKeyframe && nalUnitType == NalUnitUtil.NAL_UNIT_TYPE_NON_IDR);
return sampleIsKeyframe;
} }
private void outputSample(int offset) { private void outputSample(int offset) {

View File

@ -172,8 +172,11 @@ public final class H265Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. assertTracksCreated();
if (isEndOfInput) {
sampleReader.end(totalBytesWritten);
}
} }
@RequiresNonNull("sampleReader") @RequiresNonNull("sampleReader")
@ -374,6 +377,17 @@ public final class H265Reader implements ElementaryStreamReader {
} }
} }
public void end(long position) {
sampleIsKeyframe = nalUnitHasKeyframeData;
// Output a sample with the NAL units since the current nalUnitPosition
outputSample(/* offset= */ (int) (position - nalUnitPosition));
// Output a final sample with the remaining NAL units up to the passed position
samplePosition = nalUnitPosition;
nalUnitPosition = position;
outputSample(/* offset= */ 0);
readingSample = false;
}
private void outputSample(int offset) { private void outputSample(int offset) {
if (sampleTimeUs == C.TIME_UNSET) { if (sampleTimeUs == C.TIME_UNSET) {
return; return;

View File

@ -120,7 +120,7 @@ public final class Id3Reader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
Assertions.checkStateNotNull(output); // Asserts that createTracks has been called. Assertions.checkStateNotNull(output); // Asserts that createTracks has been called.
if (!writingSample || sampleSize == 0 || sampleBytesRead != sampleSize) { if (!writingSample || sampleSize == 0 || sampleBytesRead != sampleSize) {
return; return;

View File

@ -153,7 +153,7 @@ public final class LatmReader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -119,7 +119,7 @@ public final class MpegAudioReader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -214,7 +214,7 @@ public final class MpeghReader implements ElementaryStreamReader {
} }
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
// Do nothing. // Do nothing.
} }

View File

@ -107,7 +107,8 @@ public final class PesReader implements TsPayloadReader {
Log.w(TAG, "Unexpected start indicator: expected " + payloadSize + " more bytes"); Log.w(TAG, "Unexpected start indicator: expected " + payloadSize + " more bytes");
} }
// Either way, notify the reader that it has now finished. // Either way, notify the reader that it has now finished.
reader.packetFinished(); boolean isEndOfInput = (data.limit() == 0);
reader.packetFinished(isEndOfInput);
break; break;
default: default:
throw new IllegalStateException(); throw new IllegalStateException();
@ -147,7 +148,8 @@ public final class PesReader implements TsPayloadReader {
if (payloadSize != C.LENGTH_UNSET) { if (payloadSize != C.LENGTH_UNSET) {
payloadSize -= readLength; payloadSize -= readLength;
if (payloadSize == 0) { if (payloadSize == 0) {
reader.packetFinished(); // There are bytes left in data, see above, so this is not the end of input
reader.packetFinished(/* isEndOfInput= */ false);
setState(STATE_READING_HEADER); setState(STATE_READING_HEADER);
} }
} }
@ -158,6 +160,22 @@ public final class PesReader implements TsPayloadReader {
} }
} }
/**
* Determines if the parser can consume a synthesized empty pusi.
*
* @param isModeHls {@code True} if operating in HLS (HTTP Live Streaming) mode, {@code false}
* otherwise.
*/
public boolean canConsumeSynthesizedEmptyPusi(boolean isModeHls) {
// Pusi only payload to trigger end of sample data is only applicable if
// pes does not have a length field and body is being read, another exclusion
// is due to H262 streams possibly having, in HLS mode, a pes across more than one segment
// which would trigger committing an unfinished sample in the middle of the access unit
return state == STATE_READING_BODY
&& payloadSize == C.LENGTH_UNSET
&& !(isModeHls && reader instanceof H262Reader);
}
private void setState(int state) { private void setState(int state) {
this.state = state; this.state = state;
bytesRead = 0; bytesRead = 0;

View File

@ -357,7 +357,7 @@ public final class PsExtractor implements Extractor {
pesPayloadReader.packetStarted(timeUs, TsPayloadReader.FLAG_DATA_ALIGNMENT_INDICATOR); pesPayloadReader.packetStarted(timeUs, TsPayloadReader.FLAG_DATA_ALIGNMENT_INDICATOR);
pesPayloadReader.consume(data); pesPayloadReader.consume(data);
// We always have complete PES packets with program stream. // We always have complete PES packets with program stream.
pesPayloadReader.packetFinished(); pesPayloadReader.packetFinished(/* isEndOfInput= */ false);
} }
private void parseHeader() { private void parseHeader() {

View File

@ -425,8 +425,9 @@ public final class TsExtractor implements Extractor {
public @ReadResult int read(ExtractorInput input, PositionHolder seekPosition) public @ReadResult int read(ExtractorInput input, PositionHolder seekPosition)
throws IOException { throws IOException {
long inputLength = input.getLength(); long inputLength = input.getLength();
boolean isModeHls = mode == MODE_HLS;
if (tracksEnded) { if (tracksEnded) {
boolean canReadDuration = inputLength != C.LENGTH_UNSET && mode != MODE_HLS; boolean canReadDuration = inputLength != C.LENGTH_UNSET && !isModeHls;
if (canReadDuration && !durationReader.isDurationReadFinished()) { if (canReadDuration && !durationReader.isDurationReadFinished()) {
return durationReader.readDuration(input, seekPosition, pcrPid); return durationReader.readDuration(input, seekPosition, pcrPid);
} }
@ -447,6 +448,16 @@ public final class TsExtractor implements Extractor {
} }
if (!fillBufferWithAtLeastOnePacket(input)) { if (!fillBufferWithAtLeastOnePacket(input)) {
// Send a synthesized empty pusi to allow for packetFinished to be triggered on the last unit.
for (int i = 0; i < tsPayloadReaders.size(); i++) {
TsPayloadReader payloadReader = tsPayloadReaders.valueAt(i);
if (payloadReader instanceof PesReader) {
PesReader pesReader = (PesReader) payloadReader;
if (pesReader.canConsumeSynthesizedEmptyPusi(isModeHls)) {
pesReader.consume(new ParsableByteArray(), FLAG_PAYLOAD_UNIT_START_INDICATOR);
}
}
}
return RESULT_END_OF_INPUT; return RESULT_END_OF_INPUT;
} }

View File

@ -545,7 +545,7 @@ public final class TsExtractorTest {
public void consume(ParsableByteArray data) {} public void consume(ParsableByteArray data) {}
@Override @Override
public void packetFinished() { public void packetFinished(boolean isEndOfInput) {
packetsRead++; packetsRead++;
} }

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 39002 total output bytes = 39002
sample count = 24 sample count = 25
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/mp4v-es sampleMimeType = video/mp4v-es
@ -112,4 +112,8 @@ track 256:
time = 920000 time = 920000
flags = 0 flags = 0
data = length 222, hash 7E77BF79 data = length 222, hash 7E77BF79
sample 24:
time = 960000
flags = 1
data = length 11769, hash D94C80C0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 27354 total output bytes = 27354
sample count = 18 sample count = 19
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/mp4v-es sampleMimeType = video/mp4v-es
@ -88,4 +88,8 @@ track 256:
time = 920000 time = 920000
flags = 0 flags = 0
data = length 222, hash 7E77BF79 data = length 222, hash 7E77BF79
sample 18:
time = 960000
flags = 1
data = length 11769, hash D94C80C0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 13592 total output bytes = 13592
sample count = 8 sample count = 9
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/mp4v-es sampleMimeType = video/mp4v-es
@ -48,4 +48,8 @@ track 256:
time = 920000 time = 920000
flags = 0 flags = 0
data = length 222, hash 7E77BF79 data = length 222, hash 7E77BF79
sample 8:
time = 960000
flags = 1
data = length 11769, hash D94C80C0
tracksEnded = true tracksEnded = true

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 39002 total output bytes = 39002
sample count = 24 sample count = 25
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/mp4v-es sampleMimeType = video/mp4v-es
@ -109,4 +109,8 @@ track 256:
time = 920000 time = 920000
flags = 0 flags = 0
data = length 222, hash 7E77BF79 data = length 222, hash 7E77BF79
sample 24:
time = 960000
flags = 1
data = length 11769, hash D94C80C0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 41614 total output bytes = 41614
sample count = 29 sample count = 30
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -137,4 +137,8 @@ track 256:
time = 966666 time = 966666
flags = 0 flags = 0
data = length 93, hash B6B6263C data = length 93, hash B6B6263C
sample 29:
time = 1033333
flags = 0
data = length 234, hash A48D3D90
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 25812 total output bytes = 25812
sample count = 20 sample count = 21
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -101,4 +101,8 @@ track 256:
time = 966666 time = 966666
flags = 0 flags = 0
data = length 93, hash B6B6263C data = length 93, hash B6B6263C
sample 20:
time = 1033333
flags = 0
data = length 234, hash A48D3D90
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 13114 total output bytes = 13114
sample count = 11 sample count = 12
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -65,4 +65,8 @@ track 256:
time = 966666 time = 966666
flags = 0 flags = 0
data = length 93, hash B6B6263C data = length 93, hash B6B6263C
sample 11:
time = 1033333
flags = 0
data = length 234, hash A48D3D90
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 412 total output bytes = 412
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -29,4 +29,8 @@ track 256:
time = 966666 time = 966666
flags = 0 flags = 0
data = length 93, hash B6B6263C data = length 93, hash B6B6263C
sample 2:
time = 1033333
flags = 0
data = length 234, hash A48D3D90
tracksEnded = true tracksEnded = true

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 41614 total output bytes = 41614
sample count = 29 sample count = 30
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -134,4 +134,8 @@ track 256:
time = 966666 time = 966666
flags = 0 flags = 0
data = length 93, hash B6B6263C data = length 93, hash B6B6263C
sample 29:
time = 1033333
flags = 0
data = length 234, hash A48D3D90
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 2 numberOfTracks = 2
track 256: track 256:
total output bytes = 13650 total output bytes = 13650
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -29,6 +29,10 @@ track 256:
time = 100100 time = 100100
flags = 0 flags = 0
data = length 813, hash 99F7B4FA data = length 813, hash 99F7B4FA
sample 2:
time = 133466
flags = 0
data = length 442, hash A7367ECF
track 257: track 257:
total output bytes = 18432 total output bytes = 18432
sample count = 9 sample count = 9

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 2 numberOfTracks = 2
track 256: track 256:
total output bytes = 13650 total output bytes = 13650
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -26,6 +26,10 @@ track 256:
time = 100100 time = 100100
flags = 0 flags = 0
data = length 813, hash 99F7B4FA data = length 813, hash 99F7B4FA
sample 2:
time = 133466
flags = 0
data = length 442, hash A7367ECF
track 257: track 257:
total output bytes = 18432 total output bytes = 18432
sample count = 9 sample count = 9

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 207313 total output bytes = 207313
sample count = 29 sample count = 30
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -137,4 +137,8 @@ track 256:
time = 933333 time = 933333
flags = 1 flags = 1
data = length 7334, hash 614FA397 data = length 7334, hash 614FA397
sample 29:
time = 966666
flags = 1
data = length 7287, hash A67CBA0A
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 153789 total output bytes = 153789
sample count = 20 sample count = 21
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -101,4 +101,8 @@ track 256:
time = 933333 time = 933333
flags = 1 flags = 1
data = length 7334, hash 614FA397 data = length 7334, hash 614FA397
sample 20:
time = 966666
flags = 1
data = length 7287, hash A67CBA0A
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 87806 total output bytes = 87806
sample count = 11 sample count = 12
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -65,4 +65,8 @@ track 256:
time = 933333 time = 933333
flags = 1 flags = 1
data = length 7334, hash 614FA397 data = length 7334, hash 614FA397
sample 11:
time = 966666
flags = 1
data = length 7287, hash A67CBA0A
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 7288 total output bytes = 7288
sample count = 0 sample count = 1
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -21,4 +21,8 @@ track 256:
initializationData: initializationData:
data = length 25, hash 8F89F820 data = length 25, hash 8F89F820
data = length 8, hash 9BAAE288 data = length 8, hash 9BAAE288
sample 0:
time = 966666
flags = 1
data = length 7287, hash A67CBA0A
tracksEnded = true tracksEnded = true

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 207313 total output bytes = 207313
sample count = 29 sample count = 30
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -134,4 +134,8 @@ track 256:
time = 933333 time = 933333
flags = 1 flags = 1
data = length 7334, hash 614FA397 data = length 7334, hash 614FA397
sample 29:
time = 966666
flags = 1
data = length 7287, hash A67CBA0A
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 2 numberOfTracks = 2
track 256: track 256:
total output bytes = 13650 total output bytes = 13650
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -29,6 +29,10 @@ track 256:
time = 100100 time = 100100
flags = 0 flags = 0
data = length 813, hash 99F7B4FA data = length 813, hash 99F7B4FA
sample 2:
time = 133466
flags = 0
data = length 442, hash A7367ECF
track 257: track 257:
total output bytes = 5015 total output bytes = 5015
sample count = 4 sample count = 4

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 2 numberOfTracks = 2
track 256: track 256:
total output bytes = 13650 total output bytes = 13650
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -29,6 +29,10 @@ track 256:
time = 100100 time = 100100
flags = 0 flags = 0
data = length 813, hash 99F7B4FA data = length 813, hash 99F7B4FA
sample 2:
time = 133466
flags = 0
data = length 442, hash A7367ECF
track 257: track 257:
total output bytes = 5015 total output bytes = 5015
sample count = 4 sample count = 4

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 2 numberOfTracks = 2
track 256: track 256:
total output bytes = 13650 total output bytes = 13650
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -29,6 +29,10 @@ track 256:
time = 100100 time = 100100
flags = 0 flags = 0
data = length 813, hash 99F7B4FA data = length 813, hash 99F7B4FA
sample 2:
time = 133466
flags = 0
data = length 442, hash A7367ECF
track 257: track 257:
total output bytes = 5015 total output bytes = 5015
sample count = 4 sample count = 4

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 2 numberOfTracks = 2
track 256: track 256:
total output bytes = 13650 total output bytes = 13650
sample count = 2 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -26,6 +26,10 @@ track 256:
time = 100100 time = 100100
flags = 0 flags = 0
data = length 813, hash 99F7B4FA data = length 813, hash 99F7B4FA
sample 2:
time = 133466
flags = 0
data = length 442, hash A7367ECF
track 257: track 257:
total output bytes = 5015 total output bytes = 5015
sample count = 4 sample count = 4

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 12451 total output bytes = 12451
sample count = 4 sample count = 5
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -37,4 +37,8 @@ track 256:
time = 133466 time = 133466
flags = 0 flags = 0
data = length 518, hash 546C177 data = length 518, hash 546C177
sample 4:
time = 100100
flags = 0
data = length 254, hash 36EBDA1
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 12451 total output bytes = 12451
sample count = 4 sample count = 5
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -37,4 +37,8 @@ track 256:
time = 133466 time = 133466
flags = 0 flags = 0
data = length 518, hash 546C177 data = length 518, hash 546C177
sample 4:
time = 100100
flags = 0
data = length 254, hash 36EBDA1
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 12451 total output bytes = 12451
sample count = 4 sample count = 5
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -37,4 +37,8 @@ track 256:
time = 133466 time = 133466
flags = 0 flags = 0
data = length 518, hash 546C177 data = length 518, hash 546C177
sample 4:
time = 100100
flags = 0
data = length 254, hash 36EBDA1
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 255 total output bytes = 255
sample count = 0 sample count = 1
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -21,4 +21,8 @@ track 256:
initializationData: initializationData:
data = length 29, hash 4C2CAE9C data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89 data = length 9, hash D971CD89
sample 0:
time = 100100
flags = 0
data = length 254, hash 36EBDA1
tracksEnded = true tracksEnded = true

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 12451 total output bytes = 12451
sample count = 4 sample count = 5
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/avc sampleMimeType = video/avc
@ -34,4 +34,8 @@ track 256:
time = 133466 time = 133466
flags = 0 flags = 0
data = length 518, hash 546C177 data = length 518, hash 546C177
sample 4:
time = 100100
flags = 0
data = length 254, hash 36EBDA1
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 19364 total output bytes = 19364
sample count = 29 sample count = 31
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -137,4 +137,12 @@ track 256:
time = 933333 time = 933333
flags = 0 flags = 0
data = length 87, hash EEC4D98C data = length 87, hash EEC4D98C
sample 29:
time = 1000000
flags = 0
data = length 7, hash 680F23CB
sample 30:
time = 1000000
flags = 0
data = length 160, hash 11EC03D0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 3806 total output bytes = 3806
sample count = 20 sample count = 22
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -101,4 +101,12 @@ track 256:
time = 933333 time = 933333
flags = 0 flags = 0
data = length 87, hash EEC4D98C data = length 87, hash EEC4D98C
sample 20:
time = 1000000
flags = 0
data = length 7, hash 680F23CB
sample 21:
time = 1000000
flags = 0
data = length 160, hash 11EC03D0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 1796 total output bytes = 1796
sample count = 11 sample count = 13
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -65,4 +65,12 @@ track 256:
time = 933333 time = 933333
flags = 0 flags = 0
data = length 87, hash EEC4D98C data = length 87, hash EEC4D98C
sample 11:
time = 1000000
flags = 0
data = length 7, hash 680F23CB
sample 12:
time = 1000000
flags = 0
data = length 160, hash 11EC03D0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 396 total output bytes = 396
sample count = 2 sample count = 4
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -29,4 +29,12 @@ track 256:
time = 933333 time = 933333
flags = 0 flags = 0
data = length 87, hash EEC4D98C data = length 87, hash EEC4D98C
sample 2:
time = 1000000
flags = 0
data = length 7, hash 680F23CB
sample 3:
time = 1000000
flags = 0
data = length 160, hash 11EC03D0
tracksEnded = true tracksEnded = true

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 19364 total output bytes = 19364
sample count = 29 sample count = 31
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -134,4 +134,12 @@ track 256:
time = 933333 time = 933333
flags = 0 flags = 0
data = length 87, hash EEC4D98C data = length 87, hash EEC4D98C
sample 29:
time = 1000000
flags = 0
data = length 7, hash 680F23CB
sample 30:
time = 1000000
flags = 0
data = length 160, hash 11EC03D0
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 10004 total output bytes = 10004
sample count = 15 sample count = 17
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -81,4 +81,12 @@ track 256:
time = 1133333 time = 1133333
flags = 0 flags = 0
data = length 46, hash CE770A40 data = length 46, hash CE770A40
sample 15:
time = 1266666
flags = 0
data = length 7, hash 680F23CB
sample 16:
time = 1266666
flags = 0
data = length 92, hash 531EE3AD
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 856 total output bytes = 856
sample count = 11 sample count = 13
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -65,4 +65,12 @@ track 256:
time = 1133333 time = 1133333
flags = 0 flags = 0
data = length 46, hash CE770A40 data = length 46, hash CE770A40
sample 11:
time = 1266666
flags = 0
data = length 7, hash 680F23CB
sample 12:
time = 1266666
flags = 0
data = length 92, hash 531EE3AD
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 563 total output bytes = 563
sample count = 6 sample count = 8
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -45,4 +45,12 @@ track 256:
time = 1133333 time = 1133333
flags = 0 flags = 0
data = length 46, hash CE770A40 data = length 46, hash CE770A40
sample 6:
time = 1266666
flags = 0
data = length 7, hash 680F23CB
sample 7:
time = 1266666
flags = 0
data = length 92, hash 531EE3AD
tracksEnded = true tracksEnded = true

View File

@ -8,7 +8,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 146 total output bytes = 146
sample count = 1 sample count = 3
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -25,4 +25,12 @@ track 256:
time = 1133333 time = 1133333
flags = 0 flags = 0
data = length 46, hash CE770A40 data = length 46, hash CE770A40
sample 1:
time = 1266666
flags = 0
data = length 7, hash 680F23CB
sample 2:
time = 1266666
flags = 0
data = length 92, hash 531EE3AD
tracksEnded = true tracksEnded = true

View File

@ -5,7 +5,7 @@ seekMap:
numberOfTracks = 1 numberOfTracks = 1
track 256: track 256:
total output bytes = 10004 total output bytes = 10004
sample count = 15 sample count = 17
format 0: format 0:
id = 1/256 id = 1/256
sampleMimeType = video/hevc sampleMimeType = video/hevc
@ -78,4 +78,12 @@ track 256:
time = 1133333 time = 1133333
flags = 0 flags = 0
data = length 46, hash CE770A40 data = length 46, hash CE770A40
sample 15:
time = 1266666
flags = 0
data = length 7, hash 680F23CB
sample 16:
time = 1266666
flags = 0
data = length 92, hash 531EE3AD
tracksEnded = true tracksEnded = true

View File

@ -807,7 +807,7 @@ MediaCodecAdapter (exotest.audio.aac):
rendered = false rendered = false
MediaCodecAdapter (exotest.video.avc): MediaCodecAdapter (exotest.video.avc):
inputBuffers: inputBuffers:
count = 58 count = 59
input buffer #0: input buffer #0:
timeUs = 1000000000000 timeUs = 1000000000000
contents = length 427, hash 45C53469 contents = length 427, hash 45C53469
@ -980,11 +980,14 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000002416666 timeUs = 1000002416666
contents = length 1035, hash 324B27D0 contents = length 1035, hash 324B27D0
input buffer #57: input buffer #57:
timeUs = 1000002458322
contents = length 787, hash 1111D81C
input buffer #58:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 57 count = 58
output buffer #0: output buffer #0:
timeUs = 1000000000000 timeUs = 1000000000000
size = 427 size = 427
@ -1213,6 +1216,10 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000002416666 timeUs = 1000002416666
size = 1035 size = 1035
rendered = true rendered = true
output buffer #57:
timeUs = 1000002458322
size = 787
rendered = true
AudioSink: AudioSink:
buffer count = 114 buffer count = 114
config: config:

View File

@ -660,7 +660,7 @@ MediaCodecAdapter (exotest.audio.mpegl2):
rendered = false rendered = false
MediaCodecAdapter (exotest.video.mpeg2): MediaCodecAdapter (exotest.video.mpeg2):
inputBuffers: inputBuffers:
count = 58 count = 59
input buffer #0: input buffer #0:
timeUs = 1000000125000 timeUs = 1000000125000
contents = length 32732, hash 7B7C01FD contents = length 32732, hash 7B7C01FD
@ -833,11 +833,14 @@ MediaCodecAdapter (exotest.video.mpeg2):
timeUs = 1000002541666 timeUs = 1000002541666
contents = length 2738, hash 8F8FDE0A contents = length 2738, hash 8F8FDE0A
input buffer #57: input buffer #57:
timeUs = 1000002583333
contents = length 2970, hash 78651B41
input buffer #58:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 57 count = 58
output buffer #0: output buffer #0:
timeUs = 1000000125000 timeUs = 1000000125000
size = 32732 size = 32732
@ -1066,6 +1069,10 @@ MediaCodecAdapter (exotest.video.mpeg2):
timeUs = 1000002541666 timeUs = 1000002541666
size = 2738 size = 2738
rendered = true rendered = true
output buffer #57:
timeUs = 1000002583333
size = 2970
rendered = true
AudioSink: AudioSink:
buffer count = 93 buffer count = 93
config: config:

View File

@ -1,6 +1,6 @@
MediaCodecAdapter (exotest.video.avc): MediaCodecAdapter (exotest.video.avc):
inputBuffers: inputBuffers:
count = 3 count = 4
input buffer #0: input buffer #0:
timeUs = 1000000066733 timeUs = 1000000066733
contents = length 12394, hash A39F5311 contents = length 12394, hash A39F5311
@ -8,11 +8,14 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000000100100 timeUs = 1000000100100
contents = length 813, hash 99F7B4FA contents = length 813, hash 99F7B4FA
input buffer #2: input buffer #2:
timeUs = 1000000133466
contents = length 442, hash A7367ECF
input buffer #3:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 2 count = 3
output buffer #0: output buffer #0:
timeUs = 1000000066733 timeUs = 1000000066733
size = 12394 size = 12394
@ -21,3 +24,7 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000000100100 timeUs = 1000000100100
size = 813 size = 813
rendered = true rendered = true
output buffer #2:
timeUs = 1000000133466
size = 442
rendered = true

View File

@ -37,7 +37,7 @@ MediaCodecAdapter (exotest.audio.mpegl2):
rendered = false rendered = false
MediaCodecAdapter (exotest.video.avc): MediaCodecAdapter (exotest.video.avc):
inputBuffers: inputBuffers:
count = 3 count = 4
input buffer #0: input buffer #0:
timeUs = 1000000066733 timeUs = 1000000066733
contents = length 12394, hash A39F5311 contents = length 12394, hash A39F5311
@ -45,11 +45,14 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000000100100 timeUs = 1000000100100
contents = length 813, hash 99F7B4FA contents = length 813, hash 99F7B4FA
input buffer #2: input buffer #2:
timeUs = 1000000133466
contents = length 442, hash A7367ECF
input buffer #3:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 2 count = 3
output buffer #0: output buffer #0:
timeUs = 1000000066733 timeUs = 1000000066733
size = 12394 size = 12394
@ -58,6 +61,10 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000000100100 timeUs = 1000000100100
size = 813 size = 813
rendered = true rendered = true
output buffer #2:
timeUs = 1000000133466
size = 442
rendered = true
AudioSink: AudioSink:
buffer count = 4 buffer count = 4
config: config:

View File

@ -1,6 +1,6 @@
MediaCodecAdapter (exotest.video.avc): MediaCodecAdapter (exotest.video.avc):
inputBuffers: inputBuffers:
count = 3 count = 4
input buffer #0: input buffer #0:
timeUs = 1000000066733 timeUs = 1000000066733
contents = length 11672, hash 476AEFF9 contents = length 11672, hash 476AEFF9
@ -8,11 +8,14 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000000133466 timeUs = 1000000133466
contents = length 524, hash 184416EF contents = length 524, hash 184416EF
input buffer #2: input buffer #2:
timeUs = 1000000100100
contents = length 254, hash 36EBDA1
input buffer #3:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 2 count = 3
output buffer #0: output buffer #0:
timeUs = 1000000066733 timeUs = 1000000066733
size = 11672 size = 11672
@ -21,3 +24,7 @@ MediaCodecAdapter (exotest.video.avc):
timeUs = 1000000133466 timeUs = 1000000133466
size = 524 size = 524
rendered = true rendered = true
output buffer #2:
timeUs = 1000000100100
size = 254
rendered = true

View File

@ -1,6 +1,6 @@
MediaCodecAdapter (exotest.video.hevc): MediaCodecAdapter (exotest.video.hevc):
inputBuffers: inputBuffers:
count = 30 count = 32
input buffer #0: input buffer #0:
timeUs = 1000000066666 timeUs = 1000000066666
contents = length 2517, hash 85352308 contents = length 2517, hash 85352308
@ -89,11 +89,17 @@ MediaCodecAdapter (exotest.video.hevc):
timeUs = 1000000933333 timeUs = 1000000933333
contents = length 87, hash EEC4D98C contents = length 87, hash EEC4D98C
input buffer #29: input buffer #29:
timeUs = 1000001000000
contents = length 7, hash 680F23CB
input buffer #30:
timeUs = 1000001000000
contents = length 160, hash 11EC03D0
input buffer #31:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 29 count = 31
output buffer #0: output buffer #0:
timeUs = 1000000066666 timeUs = 1000000066666
size = 2517 size = 2517
@ -210,3 +216,11 @@ MediaCodecAdapter (exotest.video.hevc):
timeUs = 1000000933333 timeUs = 1000000933333
size = 87 size = 87
rendered = true rendered = true
output buffer #29:
timeUs = 1000001000000
size = 7
rendered = true
output buffer #30:
timeUs = 1000001000000
size = 160
rendered = true

View File

@ -1,6 +1,6 @@
MediaCodecAdapter (exotest.video.hevc): MediaCodecAdapter (exotest.video.hevc):
inputBuffers: inputBuffers:
count = 16 count = 18
input buffer #0: input buffer #0:
timeUs = 1000000266666 timeUs = 1000000266666
contents = length 7464, hash EBF8518B contents = length 7464, hash EBF8518B
@ -47,11 +47,17 @@ MediaCodecAdapter (exotest.video.hevc):
timeUs = 1000001133333 timeUs = 1000001133333
contents = length 46, hash CE770A40 contents = length 46, hash CE770A40
input buffer #15: input buffer #15:
timeUs = 1000001266666
contents = length 7, hash 680F23CB
input buffer #16:
timeUs = 1000001266666
contents = length 92, hash 531EE3AD
input buffer #17:
timeUs = 0 timeUs = 0
flags = 4 flags = 4
contents = length 0, hash 1 contents = length 0, hash 1
outputBuffers: outputBuffers:
count = 15 count = 17
output buffer #0: output buffer #0:
timeUs = 1000000266666 timeUs = 1000000266666
size = 7464 size = 7464
@ -112,3 +118,11 @@ MediaCodecAdapter (exotest.video.hevc):
timeUs = 1000001133333 timeUs = 1000001133333
size = 46 size = 46
rendered = true rendered = true
output buffer #15:
timeUs = 1000001266666
size = 7
rendered = true
output buffer #16:
timeUs = 1000001266666
size = 92
rendered = true

View File

@ -7,8 +7,8 @@ seekMap:
getPosition(1065600) = [[timeUs=0, position=44]] getPosition(1065600) = [[timeUs=0, position=44]]
numberOfTracks = 2 numberOfTracks = 2
track 0: track 0:
total output bytes = 287190 total output bytes = 301430
sample count = 29 sample count = 30
format 0: format 0:
id = 1 id = 1
sampleMimeType = video/avc sampleMimeType = video/avc
@ -16,7 +16,7 @@ track 0:
maxInputSize = 22910 maxInputSize = 22910
width = 1080 width = 1080
height = 720 height = 720
frameRate = 31.042604 frameRate = 31.004547
colorInfo: colorInfo:
colorSpace = 1 colorSpace = 1
colorRange = 2 colorRange = 2
@ -141,8 +141,12 @@ track 0:
data = length 20866, hash 219DA8C0 data = length 20866, hash 219DA8C0
sample 28: sample 28:
time = 934255 time = 934255
flags = 536870912 flags = 0
data = length 7215, hash A853B1A9 data = length 7215, hash A853B1A9
sample 29:
time = 967622
flags = 536870912
data = length 14240, hash 4EE77DF9
track 1: track 1:
total output bytes = 9529 total output bytes = 9529
sample count = 45 sample count = 45