diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java index 42aeab64b34..c0d1581c39d 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java @@ -962,20 +962,20 @@ private static int parseTrun( // Offset to the entire video timeline. In the presence of B-frames this is usually used to // ensure that the first frame's presentation timestamp is zero. - long edtsOffset = 0; + long edtsOffsetUs = 0; // Currently we only support a single edit that moves the entire media timeline (indicated by // duration == 0). Other uses of edit lists are uncommon and unsupported. if (track.editListDurations != null && track.editListDurations.length == 1 && track.editListDurations[0] == 0) { - edtsOffset = + edtsOffsetUs = Util.scaleLargeTimestamp( - track.editListMediaTimes[0], C.MILLIS_PER_SECOND, track.timescale); + track.editListMediaTimes[0], C.MICROS_PER_SECOND, track.timescale); } int[] sampleSizeTable = fragment.sampleSizeTable; - int[] sampleCompositionTimeOffsetTable = fragment.sampleCompositionTimeOffsetTable; - long[] sampleDecodingTimeTable = fragment.sampleDecodingTimeTable; + int[] sampleCompositionTimeOffsetUsTable = fragment.sampleCompositionTimeOffsetUsTable; + long[] sampleDecodingTimeUsTable = fragment.sampleDecodingTimeUsTable; boolean[] sampleIsSyncFrameTable = fragment.sampleIsSyncFrameTable; boolean workaroundEveryVideoFrameIsSyncFrame = track.type == C.TRACK_TYPE_VIDEO @@ -999,13 +999,13 @@ private static int parseTrun( // here, because unsigned integers will still be parsed correctly (unless their top bit is // set, which is never true in practice because sample offsets are always small). int sampleOffset = trun.readInt(); - sampleCompositionTimeOffsetTable[i] = - (int) ((sampleOffset * C.MILLIS_PER_SECOND) / timescale); + sampleCompositionTimeOffsetUsTable[i] = + (int) ((sampleOffset * C.MICROS_PER_SECOND) / timescale); } else { - sampleCompositionTimeOffsetTable[i] = 0; + sampleCompositionTimeOffsetUsTable[i] = 0; } - sampleDecodingTimeTable[i] = - Util.scaleLargeTimestamp(cumulativeTime, C.MILLIS_PER_SECOND, timescale) - edtsOffset; + sampleDecodingTimeUsTable[i] = + Util.scaleLargeTimestamp(cumulativeTime, C.MICROS_PER_SECOND, timescale) - edtsOffsetUs; sampleSizeTable[i] = sampleSize; sampleIsSyncFrameTable[i] = ((sampleFlags >> 16) & 0x1) == 0 && (!workaroundEveryVideoFrameIsSyncFrame || i == 0); @@ -1291,7 +1291,7 @@ private boolean readSample(ExtractorInput input) throws IOException, Interrupted Track track = currentTrackBundle.track; TrackOutput output = currentTrackBundle.output; int sampleIndex = currentTrackBundle.currentSampleIndex; - long sampleTimeUs = fragment.getSamplePresentationTime(sampleIndex) * 1000L; + long sampleTimeUs = fragment.getSamplePresentationTimeUs(sampleIndex); if (timestampAdjuster != null) { sampleTimeUs = timestampAdjuster.adjustSampleTimestamp(sampleTimeUs); } @@ -1535,10 +1535,9 @@ public void reset() { * @param timeUs The seek time, in microseconds. */ public void seek(long timeUs) { - long timeMs = C.usToMs(timeUs); int searchIndex = currentSampleIndex; while (searchIndex < fragment.sampleCount - && fragment.getSamplePresentationTime(searchIndex) < timeMs) { + && fragment.getSamplePresentationTimeUs(searchIndex) < timeUs) { if (fragment.sampleIsSyncFrameTable[searchIndex]) { firstSampleToOutputIndex = searchIndex; } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackFragment.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackFragment.java index 51ec2bf282a..0272e8e3381 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackFragment.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/TrackFragment.java @@ -60,14 +60,10 @@ * The size of each sample in the fragment. */ public int[] sampleSizeTable; - /** - * The composition time offset of each sample in the fragment. - */ - public int[] sampleCompositionTimeOffsetTable; - /** - * The decoding time of each sample in the fragment. - */ - public long[] sampleDecodingTimeTable; + /** The composition time offset of each sample in the fragment, in microseconds. */ + public int[] sampleCompositionTimeOffsetUsTable; + /** The decoding time of each sample in the fragment, in microseconds. */ + public long[] sampleDecodingTimeUsTable; /** * Indicates which samples are sync frames. */ @@ -139,8 +135,8 @@ public void initTables(int trunCount, int sampleCount) { // likely. The choice of 25% is relatively arbitrary. int tableSize = (sampleCount * 125) / 100; sampleSizeTable = new int[tableSize]; - sampleCompositionTimeOffsetTable = new int[tableSize]; - sampleDecodingTimeTable = new long[tableSize]; + sampleCompositionTimeOffsetUsTable = new int[tableSize]; + sampleDecodingTimeUsTable = new long[tableSize]; sampleIsSyncFrameTable = new boolean[tableSize]; sampleHasSubsampleEncryptionTable = new boolean[tableSize]; } @@ -186,8 +182,14 @@ public void fillEncryptionData(ParsableByteArray source) { sampleEncryptionDataNeedsFill = false; } - public long getSamplePresentationTime(int index) { - return sampleDecodingTimeTable[index] + sampleCompositionTimeOffsetTable[index]; + /** + * Returns the sample presentation timestamp in microseconds. + * + * @param index The sample index. + * @return The presentation timestamps of this sample in microseconds. + */ + public long getSamplePresentationTimeUs(int index) { + return sampleDecodingTimeUsTable[index] + sampleCompositionTimeOffsetUsTable[index]; } /** Returns whether the sample at the given index has a subsample encryption table. */ diff --git a/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.0.dump b/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.0.dump index 505c85e51fe..b2412d09ff9 100644 --- a/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.0.dump +++ b/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.0.dump @@ -81,7 +81,7 @@ track 0: flags = 1 data = length 520, hash FEE56928 sample 13: - time = 520000 + time = 519999 flags = 1 data = length 599, hash 41F496C5 sample 14: diff --git a/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.1.dump b/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.1.dump index 8bee343bd94..41844c32a3a 100644 --- a/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.1.dump +++ b/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.1.dump @@ -57,7 +57,7 @@ track 0: flags = 1 data = length 520, hash FEE56928 sample 7: - time = 520000 + time = 519999 flags = 1 data = length 599, hash 41F496C5 sample 8: diff --git a/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.2.dump b/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.2.dump index ee1cf91a570..0f00ba9c5b6 100644 --- a/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.2.dump +++ b/library/core/src/test/assets/mp4/sample_ac4_fragmented.mp4.2.dump @@ -33,7 +33,7 @@ track 0: flags = 1 data = length 520, hash FEE56928 sample 1: - time = 520000 + time = 519999 flags = 1 data = length 599, hash 41F496C5 sample 2: diff --git a/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.0.dump b/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.0.dump index 02db599cd71..c0e7d2a38d7 100644 --- a/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.0.dump +++ b/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.0.dump @@ -107,7 +107,7 @@ track 0: crypto mode = 1 encryption key = length 16, hash 9FDDEA52 sample 13: - time = 520000 + time = 519999 flags = 1073741825 data = length 616, hash 3F657E23 crypto mode = 1 diff --git a/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.1.dump b/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.1.dump index 8b45dd0a506..7886fc21acf 100644 --- a/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.1.dump +++ b/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.1.dump @@ -71,7 +71,7 @@ track 0: crypto mode = 1 encryption key = length 16, hash 9FDDEA52 sample 7: - time = 520000 + time = 519999 flags = 1073741825 data = length 616, hash 3F657E23 crypto mode = 1 diff --git a/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.2.dump b/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.2.dump index a6be34dec77..e726932cb06 100644 --- a/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.2.dump +++ b/library/core/src/test/assets/mp4/sample_ac4_protected.mp4.2.dump @@ -35,7 +35,7 @@ track 0: crypto mode = 1 encryption key = length 16, hash 9FDDEA52 sample 1: - time = 520000 + time = 519999 flags = 1073741825 data = length 616, hash 3F657E23 crypto mode = 1 diff --git a/library/core/src/test/assets/mp4/sample_fragmented.mp4.0.dump b/library/core/src/test/assets/mp4/sample_fragmented.mp4.0.dump index 65f59d78b5f..d2b197286b6 100644 --- a/library/core/src/test/assets/mp4/sample_fragmented.mp4.0.dump +++ b/library/core/src/test/assets/mp4/sample_fragmented.mp4.0.dump @@ -31,123 +31,123 @@ track 0: total output bytes = 85933 sample count = 30 sample 0: - time = 66000 + time = 66733 flags = 1 data = length 38070, hash B58E1AEE sample 1: - time = 199000 + time = 200199 flags = 0 data = length 8340, hash 8AC449FF sample 2: - time = 132000 + time = 133466 flags = 0 data = length 1295, hash C0DA5090 sample 3: - time = 100000 + time = 100100 flags = 0 data = length 469, hash D6E0A200 sample 4: - time = 166000 + time = 166832 flags = 0 data = length 564, hash E5F56C5B sample 5: - time = 332000 + time = 333666 flags = 0 data = length 6075, hash 8756E49E sample 6: - time = 266000 + time = 266933 flags = 0 data = length 847, hash DCC2B618 sample 7: - time = 233000 + time = 233566 flags = 0 data = length 455, hash B9CCE047 sample 8: - time = 299000 + time = 300299 flags = 0 data = length 467, hash 69806D94 sample 9: - time = 466000 + time = 467133 flags = 0 data = length 4549, hash 3944F501 sample 10: - time = 399000 + time = 400399 flags = 0 data = length 1087, hash 491BF106 sample 11: - time = 367000 + time = 367033 flags = 0 data = length 380, hash 5FED016A sample 12: - time = 433000 + time = 433766 flags = 0 data = length 455, hash 8A0610 sample 13: - time = 599000 + time = 600599 flags = 0 data = length 5190, hash B9031D8 sample 14: - time = 533000 + time = 533866 flags = 0 data = length 1071, hash 684E7DC8 sample 15: - time = 500000 + time = 500500 flags = 0 data = length 653, hash 8494F326 sample 16: - time = 566000 + time = 567232 flags = 0 data = length 485, hash 2CCC85F4 sample 17: - time = 733000 + time = 734066 flags = 0 data = length 4884, hash D16B6A96 sample 18: - time = 666000 + time = 667333 flags = 0 data = length 997, hash 164FF210 sample 19: - time = 633000 + time = 633966 flags = 0 data = length 640, hash F664125B sample 20: - time = 700000 + time = 700699 flags = 0 data = length 491, hash B5930C7C sample 21: - time = 866000 + time = 867533 flags = 0 data = length 2989, hash 92CF4FCF sample 22: - time = 800000 + time = 800799 flags = 0 data = length 838, hash 294A3451 sample 23: - time = 767000 + time = 767433 flags = 0 data = length 544, hash FCCE2DE6 sample 24: - time = 833000 + time = 834166 flags = 0 data = length 329, hash A654FFA1 sample 25: - time = 1000000 + time = 1000999 flags = 0 data = length 1517, hash 5F7EBF8B sample 26: - time = 933000 + time = 934266 flags = 0 data = length 803, hash 7A5C4C1D sample 27: - time = 900000 + time = 900900 flags = 0 data = length 415, hash B31BBC3B sample 28: - time = 967000 + time = 967632 flags = 0 data = length 415, hash 850DFEA3 sample 29: - time = 1033000 + time = 1034366 flags = 0 data = length 619, hash AB5E56CA track 1: @@ -181,183 +181,183 @@ track 1: flags = 1 data = length 18, hash 96519432 sample 1: - time = 23000 + time = 23219 flags = 1 data = length 4, hash EE9DF sample 2: - time = 46000 + time = 46439 flags = 1 data = length 4, hash EEDBF sample 3: - time = 69000 + time = 69659 flags = 1 data = length 157, hash E2F078F4 sample 4: - time = 92000 + time = 92879 flags = 1 data = length 371, hash B9471F94 sample 5: - time = 116000 + time = 116099 flags = 1 data = length 373, hash 2AB265CB sample 6: - time = 139000 + time = 139319 flags = 1 data = length 402, hash 1295477C sample 7: - time = 162000 + time = 162539 flags = 1 data = length 455, hash 2D8146C8 sample 8: - time = 185000 + time = 185759 flags = 1 data = length 434, hash F2C5D287 sample 9: - time = 208000 + time = 208979 flags = 1 data = length 450, hash 84143FCD sample 10: - time = 232000 + time = 232199 flags = 1 data = length 429, hash EF769D50 sample 11: - time = 255000 + time = 255419 flags = 1 data = length 450, hash EC3DE692 sample 12: - time = 278000 + time = 278639 flags = 1 data = length 447, hash 3E519E13 sample 13: - time = 301000 + time = 301859 flags = 1 data = length 457, hash 1E4F23A0 sample 14: - time = 325000 + time = 325079 flags = 1 data = length 447, hash A439EA97 sample 15: - time = 348000 + time = 348299 flags = 1 data = length 456, hash 1E9034C6 sample 16: - time = 371000 + time = 371519 flags = 1 data = length 398, hash 99DB7345 sample 17: - time = 394000 + time = 394739 flags = 1 data = length 474, hash 3F05F10A sample 18: - time = 417000 + time = 417959 flags = 1 data = length 416, hash C105EE09 sample 19: - time = 441000 + time = 441179 flags = 1 data = length 454, hash 5FDBE458 sample 20: - time = 464000 + time = 464399 flags = 1 data = length 438, hash 41A93AC3 sample 21: - time = 487000 + time = 487619 flags = 1 data = length 443, hash 10FDA652 sample 22: - time = 510000 + time = 510839 flags = 1 data = length 412, hash 1F791E25 sample 23: - time = 534000 + time = 534058 flags = 1 data = length 482, hash A6D983D sample 24: - time = 557000 + time = 557278 flags = 1 data = length 386, hash BED7392F sample 25: - time = 580000 + time = 580498 flags = 1 data = length 463, hash 5309F8C9 sample 26: - time = 603000 + time = 603718 flags = 1 data = length 394, hash 21C7321F sample 27: - time = 626000 + time = 626938 flags = 1 data = length 489, hash 71B4730D sample 28: - time = 650000 + time = 650158 flags = 1 data = length 403, hash D9C6DE89 sample 29: - time = 673000 + time = 673378 flags = 1 data = length 447, hash 9B14B73B sample 30: - time = 696000 + time = 696598 flags = 1 data = length 439, hash 4760D35B sample 31: - time = 719000 + time = 719818 flags = 1 data = length 463, hash 1601F88D sample 32: - time = 743000 + time = 743038 flags = 1 data = length 423, hash D4AE6773 sample 33: - time = 766000 + time = 766258 flags = 1 data = length 497, hash A3C674D3 sample 34: - time = 789000 + time = 789478 flags = 1 data = length 419, hash D3734A1F sample 35: - time = 812000 + time = 812698 flags = 1 data = length 474, hash DFB41F9 sample 36: - time = 835000 + time = 835918 flags = 1 data = length 413, hash 53E7CB9F sample 37: - time = 859000 + time = 859138 flags = 1 data = length 445, hash D15B0E39 sample 38: - time = 882000 + time = 882358 flags = 1 data = length 453, hash 77ED81E4 sample 39: - time = 905000 + time = 905578 flags = 1 data = length 545, hash 3321AEB9 sample 40: - time = 928000 + time = 928798 flags = 1 data = length 317, hash F557D0E sample 41: - time = 952000 + time = 952018 flags = 1 data = length 537, hash ED58CF7B sample 42: - time = 975000 + time = 975238 flags = 1 data = length 458, hash 51CDAA10 sample 43: - time = 998000 + time = 998458 flags = 1 data = length 465, hash CBA1EFD7 sample 44: - time = 1021000 + time = 1021678 flags = 1 data = length 446, hash D6735B8A sample 45: - time = 1044000 + time = 1044897 flags = 1 data = length 10, hash A453EEBE tracksEnded = true diff --git a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.0.dump b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.0.dump index 27838bd2a83..8df0f881aa6 100644 --- a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.0.dump +++ b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.0.dump @@ -31,123 +31,123 @@ track 0: total output bytes = 85933 sample count = 30 sample 0: - time = 66000 + time = 66733 flags = 1 data = length 38070, hash B58E1AEE sample 1: - time = 199000 + time = 200199 flags = 0 data = length 8340, hash 8AC449FF sample 2: - time = 132000 + time = 133466 flags = 0 data = length 1295, hash C0DA5090 sample 3: - time = 100000 + time = 100100 flags = 0 data = length 469, hash D6E0A200 sample 4: - time = 166000 + time = 166832 flags = 0 data = length 564, hash E5F56C5B sample 5: - time = 332000 + time = 333666 flags = 0 data = length 6075, hash 8756E49E sample 6: - time = 266000 + time = 266933 flags = 0 data = length 847, hash DCC2B618 sample 7: - time = 233000 + time = 233566 flags = 0 data = length 455, hash B9CCE047 sample 8: - time = 299000 + time = 300299 flags = 0 data = length 467, hash 69806D94 sample 9: - time = 466000 + time = 467133 flags = 0 data = length 4549, hash 3944F501 sample 10: - time = 399000 + time = 400399 flags = 0 data = length 1087, hash 491BF106 sample 11: - time = 367000 + time = 367033 flags = 0 data = length 380, hash 5FED016A sample 12: - time = 433000 + time = 433766 flags = 0 data = length 455, hash 8A0610 sample 13: - time = 599000 + time = 600599 flags = 0 data = length 5190, hash B9031D8 sample 14: - time = 533000 + time = 533866 flags = 0 data = length 1071, hash 684E7DC8 sample 15: - time = 500000 + time = 500500 flags = 0 data = length 653, hash 8494F326 sample 16: - time = 566000 + time = 567232 flags = 0 data = length 485, hash 2CCC85F4 sample 17: - time = 733000 + time = 734066 flags = 0 data = length 4884, hash D16B6A96 sample 18: - time = 666000 + time = 667333 flags = 0 data = length 997, hash 164FF210 sample 19: - time = 633000 + time = 633966 flags = 0 data = length 640, hash F664125B sample 20: - time = 700000 + time = 700699 flags = 0 data = length 491, hash B5930C7C sample 21: - time = 866000 + time = 867533 flags = 0 data = length 2989, hash 92CF4FCF sample 22: - time = 800000 + time = 800799 flags = 0 data = length 838, hash 294A3451 sample 23: - time = 767000 + time = 767433 flags = 0 data = length 544, hash FCCE2DE6 sample 24: - time = 833000 + time = 834166 flags = 0 data = length 329, hash A654FFA1 sample 25: - time = 1000000 + time = 1000999 flags = 0 data = length 1517, hash 5F7EBF8B sample 26: - time = 933000 + time = 934266 flags = 0 data = length 803, hash 7A5C4C1D sample 27: - time = 900000 + time = 900900 flags = 0 data = length 415, hash B31BBC3B sample 28: - time = 967000 + time = 967632 flags = 0 data = length 415, hash 850DFEA3 sample 29: - time = 1033000 + time = 1034366 flags = 0 data = length 619, hash AB5E56CA track 1: @@ -181,183 +181,183 @@ track 1: flags = 1 data = length 18, hash 96519432 sample 1: - time = 23000 + time = 23219 flags = 1 data = length 4, hash EE9DF sample 2: - time = 46000 + time = 46439 flags = 1 data = length 4, hash EEDBF sample 3: - time = 69000 + time = 69659 flags = 1 data = length 157, hash E2F078F4 sample 4: - time = 92000 + time = 92879 flags = 1 data = length 371, hash B9471F94 sample 5: - time = 116000 + time = 116099 flags = 1 data = length 373, hash 2AB265CB sample 6: - time = 139000 + time = 139319 flags = 1 data = length 402, hash 1295477C sample 7: - time = 162000 + time = 162539 flags = 1 data = length 455, hash 2D8146C8 sample 8: - time = 185000 + time = 185759 flags = 1 data = length 434, hash F2C5D287 sample 9: - time = 208000 + time = 208979 flags = 1 data = length 450, hash 84143FCD sample 10: - time = 232000 + time = 232199 flags = 1 data = length 429, hash EF769D50 sample 11: - time = 255000 + time = 255419 flags = 1 data = length 450, hash EC3DE692 sample 12: - time = 278000 + time = 278639 flags = 1 data = length 447, hash 3E519E13 sample 13: - time = 301000 + time = 301859 flags = 1 data = length 457, hash 1E4F23A0 sample 14: - time = 325000 + time = 325079 flags = 1 data = length 447, hash A439EA97 sample 15: - time = 348000 + time = 348299 flags = 1 data = length 456, hash 1E9034C6 sample 16: - time = 371000 + time = 371519 flags = 1 data = length 398, hash 99DB7345 sample 17: - time = 394000 + time = 394739 flags = 1 data = length 474, hash 3F05F10A sample 18: - time = 417000 + time = 417959 flags = 1 data = length 416, hash C105EE09 sample 19: - time = 441000 + time = 441179 flags = 1 data = length 454, hash 5FDBE458 sample 20: - time = 464000 + time = 464399 flags = 1 data = length 438, hash 41A93AC3 sample 21: - time = 487000 + time = 487619 flags = 1 data = length 443, hash 10FDA652 sample 22: - time = 510000 + time = 510839 flags = 1 data = length 412, hash 1F791E25 sample 23: - time = 534000 + time = 534058 flags = 1 data = length 482, hash A6D983D sample 24: - time = 557000 + time = 557278 flags = 1 data = length 386, hash BED7392F sample 25: - time = 580000 + time = 580498 flags = 1 data = length 463, hash 5309F8C9 sample 26: - time = 603000 + time = 603718 flags = 1 data = length 394, hash 21C7321F sample 27: - time = 626000 + time = 626938 flags = 1 data = length 489, hash 71B4730D sample 28: - time = 650000 + time = 650158 flags = 1 data = length 403, hash D9C6DE89 sample 29: - time = 673000 + time = 673378 flags = 1 data = length 447, hash 9B14B73B sample 30: - time = 696000 + time = 696598 flags = 1 data = length 439, hash 4760D35B sample 31: - time = 719000 + time = 719818 flags = 1 data = length 463, hash 1601F88D sample 32: - time = 743000 + time = 743038 flags = 1 data = length 423, hash D4AE6773 sample 33: - time = 766000 + time = 766258 flags = 1 data = length 497, hash A3C674D3 sample 34: - time = 789000 + time = 789478 flags = 1 data = length 419, hash D3734A1F sample 35: - time = 812000 + time = 812698 flags = 1 data = length 474, hash DFB41F9 sample 36: - time = 835000 + time = 835918 flags = 1 data = length 413, hash 53E7CB9F sample 37: - time = 859000 + time = 859138 flags = 1 data = length 445, hash D15B0E39 sample 38: - time = 882000 + time = 882358 flags = 1 data = length 453, hash 77ED81E4 sample 39: - time = 905000 + time = 905578 flags = 1 data = length 545, hash 3321AEB9 sample 40: - time = 928000 + time = 928798 flags = 1 data = length 317, hash F557D0E sample 41: - time = 952000 + time = 952018 flags = 1 data = length 537, hash ED58CF7B sample 42: - time = 975000 + time = 975238 flags = 1 data = length 458, hash 51CDAA10 sample 43: - time = 998000 + time = 998458 flags = 1 data = length 465, hash CBA1EFD7 sample 44: - time = 1021000 + time = 1021678 flags = 1 data = length 446, hash D6735B8A sample 45: - time = 1044000 + time = 1044897 flags = 1 data = length 10, hash A453EEBE tracksEnded = true diff --git a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.1.dump b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.1.dump index ea6deafcad7..2e806471998 100644 --- a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.1.dump +++ b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.1.dump @@ -31,123 +31,123 @@ track 0: total output bytes = 85933 sample count = 30 sample 0: - time = 66000 + time = 66733 flags = 1 data = length 38070, hash B58E1AEE sample 1: - time = 199000 + time = 200199 flags = 0 data = length 8340, hash 8AC449FF sample 2: - time = 132000 + time = 133466 flags = 0 data = length 1295, hash C0DA5090 sample 3: - time = 100000 + time = 100100 flags = 0 data = length 469, hash D6E0A200 sample 4: - time = 166000 + time = 166832 flags = 0 data = length 564, hash E5F56C5B sample 5: - time = 332000 + time = 333666 flags = 0 data = length 6075, hash 8756E49E sample 6: - time = 266000 + time = 266933 flags = 0 data = length 847, hash DCC2B618 sample 7: - time = 233000 + time = 233566 flags = 0 data = length 455, hash B9CCE047 sample 8: - time = 299000 + time = 300299 flags = 0 data = length 467, hash 69806D94 sample 9: - time = 466000 + time = 467133 flags = 0 data = length 4549, hash 3944F501 sample 10: - time = 399000 + time = 400399 flags = 0 data = length 1087, hash 491BF106 sample 11: - time = 367000 + time = 367033 flags = 0 data = length 380, hash 5FED016A sample 12: - time = 433000 + time = 433766 flags = 0 data = length 455, hash 8A0610 sample 13: - time = 599000 + time = 600599 flags = 0 data = length 5190, hash B9031D8 sample 14: - time = 533000 + time = 533866 flags = 0 data = length 1071, hash 684E7DC8 sample 15: - time = 500000 + time = 500500 flags = 0 data = length 653, hash 8494F326 sample 16: - time = 566000 + time = 567232 flags = 0 data = length 485, hash 2CCC85F4 sample 17: - time = 733000 + time = 734066 flags = 0 data = length 4884, hash D16B6A96 sample 18: - time = 666000 + time = 667333 flags = 0 data = length 997, hash 164FF210 sample 19: - time = 633000 + time = 633966 flags = 0 data = length 640, hash F664125B sample 20: - time = 700000 + time = 700699 flags = 0 data = length 491, hash B5930C7C sample 21: - time = 866000 + time = 867533 flags = 0 data = length 2989, hash 92CF4FCF sample 22: - time = 800000 + time = 800799 flags = 0 data = length 838, hash 294A3451 sample 23: - time = 767000 + time = 767433 flags = 0 data = length 544, hash FCCE2DE6 sample 24: - time = 833000 + time = 834166 flags = 0 data = length 329, hash A654FFA1 sample 25: - time = 1000000 + time = 1000999 flags = 0 data = length 1517, hash 5F7EBF8B sample 26: - time = 933000 + time = 934266 flags = 0 data = length 803, hash 7A5C4C1D sample 27: - time = 900000 + time = 900900 flags = 0 data = length 415, hash B31BBC3B sample 28: - time = 967000 + time = 967632 flags = 0 data = length 415, hash 850DFEA3 sample 29: - time = 1033000 + time = 1034366 flags = 0 data = length 619, hash AB5E56CA track 1: @@ -177,127 +177,127 @@ track 1: total output bytes = 13359 sample count = 31 sample 0: - time = 348000 + time = 348299 flags = 1 data = length 456, hash 1E9034C6 sample 1: - time = 371000 + time = 371519 flags = 1 data = length 398, hash 99DB7345 sample 2: - time = 394000 + time = 394739 flags = 1 data = length 474, hash 3F05F10A sample 3: - time = 417000 + time = 417959 flags = 1 data = length 416, hash C105EE09 sample 4: - time = 441000 + time = 441179 flags = 1 data = length 454, hash 5FDBE458 sample 5: - time = 464000 + time = 464399 flags = 1 data = length 438, hash 41A93AC3 sample 6: - time = 487000 + time = 487619 flags = 1 data = length 443, hash 10FDA652 sample 7: - time = 510000 + time = 510839 flags = 1 data = length 412, hash 1F791E25 sample 8: - time = 534000 + time = 534058 flags = 1 data = length 482, hash A6D983D sample 9: - time = 557000 + time = 557278 flags = 1 data = length 386, hash BED7392F sample 10: - time = 580000 + time = 580498 flags = 1 data = length 463, hash 5309F8C9 sample 11: - time = 603000 + time = 603718 flags = 1 data = length 394, hash 21C7321F sample 12: - time = 626000 + time = 626938 flags = 1 data = length 489, hash 71B4730D sample 13: - time = 650000 + time = 650158 flags = 1 data = length 403, hash D9C6DE89 sample 14: - time = 673000 + time = 673378 flags = 1 data = length 447, hash 9B14B73B sample 15: - time = 696000 + time = 696598 flags = 1 data = length 439, hash 4760D35B sample 16: - time = 719000 + time = 719818 flags = 1 data = length 463, hash 1601F88D sample 17: - time = 743000 + time = 743038 flags = 1 data = length 423, hash D4AE6773 sample 18: - time = 766000 + time = 766258 flags = 1 data = length 497, hash A3C674D3 sample 19: - time = 789000 + time = 789478 flags = 1 data = length 419, hash D3734A1F sample 20: - time = 812000 + time = 812698 flags = 1 data = length 474, hash DFB41F9 sample 21: - time = 835000 + time = 835918 flags = 1 data = length 413, hash 53E7CB9F sample 22: - time = 859000 + time = 859138 flags = 1 data = length 445, hash D15B0E39 sample 23: - time = 882000 + time = 882358 flags = 1 data = length 453, hash 77ED81E4 sample 24: - time = 905000 + time = 905578 flags = 1 data = length 545, hash 3321AEB9 sample 25: - time = 928000 + time = 928798 flags = 1 data = length 317, hash F557D0E sample 26: - time = 952000 + time = 952018 flags = 1 data = length 537, hash ED58CF7B sample 27: - time = 975000 + time = 975238 flags = 1 data = length 458, hash 51CDAA10 sample 28: - time = 998000 + time = 998458 flags = 1 data = length 465, hash CBA1EFD7 sample 29: - time = 1021000 + time = 1021678 flags = 1 data = length 446, hash D6735B8A sample 30: - time = 1044000 + time = 1044897 flags = 1 data = length 10, hash A453EEBE tracksEnded = true diff --git a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.2.dump b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.2.dump index d14025e0b17..17157953208 100644 --- a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.2.dump +++ b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.2.dump @@ -31,123 +31,123 @@ track 0: total output bytes = 85933 sample count = 30 sample 0: - time = 66000 + time = 66733 flags = 1 data = length 38070, hash B58E1AEE sample 1: - time = 199000 + time = 200199 flags = 0 data = length 8340, hash 8AC449FF sample 2: - time = 132000 + time = 133466 flags = 0 data = length 1295, hash C0DA5090 sample 3: - time = 100000 + time = 100100 flags = 0 data = length 469, hash D6E0A200 sample 4: - time = 166000 + time = 166832 flags = 0 data = length 564, hash E5F56C5B sample 5: - time = 332000 + time = 333666 flags = 0 data = length 6075, hash 8756E49E sample 6: - time = 266000 + time = 266933 flags = 0 data = length 847, hash DCC2B618 sample 7: - time = 233000 + time = 233566 flags = 0 data = length 455, hash B9CCE047 sample 8: - time = 299000 + time = 300299 flags = 0 data = length 467, hash 69806D94 sample 9: - time = 466000 + time = 467133 flags = 0 data = length 4549, hash 3944F501 sample 10: - time = 399000 + time = 400399 flags = 0 data = length 1087, hash 491BF106 sample 11: - time = 367000 + time = 367033 flags = 0 data = length 380, hash 5FED016A sample 12: - time = 433000 + time = 433766 flags = 0 data = length 455, hash 8A0610 sample 13: - time = 599000 + time = 600599 flags = 0 data = length 5190, hash B9031D8 sample 14: - time = 533000 + time = 533866 flags = 0 data = length 1071, hash 684E7DC8 sample 15: - time = 500000 + time = 500500 flags = 0 data = length 653, hash 8494F326 sample 16: - time = 566000 + time = 567232 flags = 0 data = length 485, hash 2CCC85F4 sample 17: - time = 733000 + time = 734066 flags = 0 data = length 4884, hash D16B6A96 sample 18: - time = 666000 + time = 667333 flags = 0 data = length 997, hash 164FF210 sample 19: - time = 633000 + time = 633966 flags = 0 data = length 640, hash F664125B sample 20: - time = 700000 + time = 700699 flags = 0 data = length 491, hash B5930C7C sample 21: - time = 866000 + time = 867533 flags = 0 data = length 2989, hash 92CF4FCF sample 22: - time = 800000 + time = 800799 flags = 0 data = length 838, hash 294A3451 sample 23: - time = 767000 + time = 767433 flags = 0 data = length 544, hash FCCE2DE6 sample 24: - time = 833000 + time = 834166 flags = 0 data = length 329, hash A654FFA1 sample 25: - time = 1000000 + time = 1000999 flags = 0 data = length 1517, hash 5F7EBF8B sample 26: - time = 933000 + time = 934266 flags = 0 data = length 803, hash 7A5C4C1D sample 27: - time = 900000 + time = 900900 flags = 0 data = length 415, hash B31BBC3B sample 28: - time = 967000 + time = 967632 flags = 0 data = length 415, hash 850DFEA3 sample 29: - time = 1033000 + time = 1034366 flags = 0 data = length 619, hash AB5E56CA track 1: @@ -177,67 +177,67 @@ track 1: total output bytes = 6804 sample count = 16 sample 0: - time = 696000 + time = 696598 flags = 1 data = length 439, hash 4760D35B sample 1: - time = 719000 + time = 719818 flags = 1 data = length 463, hash 1601F88D sample 2: - time = 743000 + time = 743038 flags = 1 data = length 423, hash D4AE6773 sample 3: - time = 766000 + time = 766258 flags = 1 data = length 497, hash A3C674D3 sample 4: - time = 789000 + time = 789478 flags = 1 data = length 419, hash D3734A1F sample 5: - time = 812000 + time = 812698 flags = 1 data = length 474, hash DFB41F9 sample 6: - time = 835000 + time = 835918 flags = 1 data = length 413, hash 53E7CB9F sample 7: - time = 859000 + time = 859138 flags = 1 data = length 445, hash D15B0E39 sample 8: - time = 882000 + time = 882358 flags = 1 data = length 453, hash 77ED81E4 sample 9: - time = 905000 + time = 905578 flags = 1 data = length 545, hash 3321AEB9 sample 10: - time = 928000 + time = 928798 flags = 1 data = length 317, hash F557D0E sample 11: - time = 952000 + time = 952018 flags = 1 data = length 537, hash ED58CF7B sample 12: - time = 975000 + time = 975238 flags = 1 data = length 458, hash 51CDAA10 sample 13: - time = 998000 + time = 998458 flags = 1 data = length 465, hash CBA1EFD7 sample 14: - time = 1021000 + time = 1021678 flags = 1 data = length 446, hash D6735B8A sample 15: - time = 1044000 + time = 1044897 flags = 1 data = length 10, hash A453EEBE tracksEnded = true diff --git a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.3.dump b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.3.dump index d08a1e93ad7..fcd968440f7 100644 --- a/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.3.dump +++ b/library/core/src/test/assets/mp4/sample_fragmented_seekable.mp4.3.dump @@ -31,123 +31,123 @@ track 0: total output bytes = 85933 sample count = 30 sample 0: - time = 66000 + time = 66733 flags = 1 data = length 38070, hash B58E1AEE sample 1: - time = 199000 + time = 200199 flags = 0 data = length 8340, hash 8AC449FF sample 2: - time = 132000 + time = 133466 flags = 0 data = length 1295, hash C0DA5090 sample 3: - time = 100000 + time = 100100 flags = 0 data = length 469, hash D6E0A200 sample 4: - time = 166000 + time = 166832 flags = 0 data = length 564, hash E5F56C5B sample 5: - time = 332000 + time = 333666 flags = 0 data = length 6075, hash 8756E49E sample 6: - time = 266000 + time = 266933 flags = 0 data = length 847, hash DCC2B618 sample 7: - time = 233000 + time = 233566 flags = 0 data = length 455, hash B9CCE047 sample 8: - time = 299000 + time = 300299 flags = 0 data = length 467, hash 69806D94 sample 9: - time = 466000 + time = 467133 flags = 0 data = length 4549, hash 3944F501 sample 10: - time = 399000 + time = 400399 flags = 0 data = length 1087, hash 491BF106 sample 11: - time = 367000 + time = 367033 flags = 0 data = length 380, hash 5FED016A sample 12: - time = 433000 + time = 433766 flags = 0 data = length 455, hash 8A0610 sample 13: - time = 599000 + time = 600599 flags = 0 data = length 5190, hash B9031D8 sample 14: - time = 533000 + time = 533866 flags = 0 data = length 1071, hash 684E7DC8 sample 15: - time = 500000 + time = 500500 flags = 0 data = length 653, hash 8494F326 sample 16: - time = 566000 + time = 567232 flags = 0 data = length 485, hash 2CCC85F4 sample 17: - time = 733000 + time = 734066 flags = 0 data = length 4884, hash D16B6A96 sample 18: - time = 666000 + time = 667333 flags = 0 data = length 997, hash 164FF210 sample 19: - time = 633000 + time = 633966 flags = 0 data = length 640, hash F664125B sample 20: - time = 700000 + time = 700699 flags = 0 data = length 491, hash B5930C7C sample 21: - time = 866000 + time = 867533 flags = 0 data = length 2989, hash 92CF4FCF sample 22: - time = 800000 + time = 800799 flags = 0 data = length 838, hash 294A3451 sample 23: - time = 767000 + time = 767433 flags = 0 data = length 544, hash FCCE2DE6 sample 24: - time = 833000 + time = 834166 flags = 0 data = length 329, hash A654FFA1 sample 25: - time = 1000000 + time = 1000999 flags = 0 data = length 1517, hash 5F7EBF8B sample 26: - time = 933000 + time = 934266 flags = 0 data = length 803, hash 7A5C4C1D sample 27: - time = 900000 + time = 900900 flags = 0 data = length 415, hash B31BBC3B sample 28: - time = 967000 + time = 967632 flags = 0 data = length 415, hash 850DFEA3 sample 29: - time = 1033000 + time = 1034366 flags = 0 data = length 619, hash AB5E56CA track 1: @@ -177,7 +177,7 @@ track 1: total output bytes = 10 sample count = 1 sample 0: - time = 1044000 + time = 1044897 flags = 1 data = length 10, hash A453EEBE tracksEnded = true diff --git a/library/core/src/test/assets/mp4/sample_fragmented_sei.mp4.0.dump b/library/core/src/test/assets/mp4/sample_fragmented_sei.mp4.0.dump index d596a77f780..3967f392517 100644 --- a/library/core/src/test/assets/mp4/sample_fragmented_sei.mp4.0.dump +++ b/library/core/src/test/assets/mp4/sample_fragmented_sei.mp4.0.dump @@ -31,123 +31,123 @@ track 0: total output bytes = 85933 sample count = 30 sample 0: - time = 66000 + time = 66733 flags = 1 data = length 38070, hash B58E1AEE sample 1: - time = 199000 + time = 200199 flags = 0 data = length 8340, hash 8AC449FF sample 2: - time = 132000 + time = 133466 flags = 0 data = length 1295, hash C0DA5090 sample 3: - time = 100000 + time = 100100 flags = 0 data = length 469, hash D6E0A200 sample 4: - time = 166000 + time = 166832 flags = 0 data = length 564, hash E5F56C5B sample 5: - time = 332000 + time = 333666 flags = 0 data = length 6075, hash 8756E49E sample 6: - time = 266000 + time = 266933 flags = 0 data = length 847, hash DCC2B618 sample 7: - time = 233000 + time = 233566 flags = 0 data = length 455, hash B9CCE047 sample 8: - time = 299000 + time = 300299 flags = 0 data = length 467, hash 69806D94 sample 9: - time = 466000 + time = 467133 flags = 0 data = length 4549, hash 3944F501 sample 10: - time = 399000 + time = 400399 flags = 0 data = length 1087, hash 491BF106 sample 11: - time = 367000 + time = 367033 flags = 0 data = length 380, hash 5FED016A sample 12: - time = 433000 + time = 433766 flags = 0 data = length 455, hash 8A0610 sample 13: - time = 599000 + time = 600599 flags = 0 data = length 5190, hash B9031D8 sample 14: - time = 533000 + time = 533866 flags = 0 data = length 1071, hash 684E7DC8 sample 15: - time = 500000 + time = 500500 flags = 0 data = length 653, hash 8494F326 sample 16: - time = 566000 + time = 567232 flags = 0 data = length 485, hash 2CCC85F4 sample 17: - time = 733000 + time = 734066 flags = 0 data = length 4884, hash D16B6A96 sample 18: - time = 666000 + time = 667333 flags = 0 data = length 997, hash 164FF210 sample 19: - time = 633000 + time = 633966 flags = 0 data = length 640, hash F664125B sample 20: - time = 700000 + time = 700699 flags = 0 data = length 491, hash B5930C7C sample 21: - time = 866000 + time = 867533 flags = 0 data = length 2989, hash 92CF4FCF sample 22: - time = 800000 + time = 800799 flags = 0 data = length 838, hash 294A3451 sample 23: - time = 767000 + time = 767433 flags = 0 data = length 544, hash FCCE2DE6 sample 24: - time = 833000 + time = 834166 flags = 0 data = length 329, hash A654FFA1 sample 25: - time = 1000000 + time = 1000999 flags = 0 data = length 1517, hash 5F7EBF8B sample 26: - time = 933000 + time = 934266 flags = 0 data = length 803, hash 7A5C4C1D sample 27: - time = 900000 + time = 900900 flags = 0 data = length 415, hash B31BBC3B sample 28: - time = 967000 + time = 967632 flags = 0 data = length 415, hash 850DFEA3 sample 29: - time = 1033000 + time = 1034366 flags = 0 data = length 619, hash AB5E56CA track 1: @@ -181,183 +181,183 @@ track 1: flags = 1 data = length 18, hash 96519432 sample 1: - time = 23000 + time = 23219 flags = 1 data = length 4, hash EE9DF sample 2: - time = 46000 + time = 46439 flags = 1 data = length 4, hash EEDBF sample 3: - time = 69000 + time = 69659 flags = 1 data = length 157, hash E2F078F4 sample 4: - time = 92000 + time = 92879 flags = 1 data = length 371, hash B9471F94 sample 5: - time = 116000 + time = 116099 flags = 1 data = length 373, hash 2AB265CB sample 6: - time = 139000 + time = 139319 flags = 1 data = length 402, hash 1295477C sample 7: - time = 162000 + time = 162539 flags = 1 data = length 455, hash 2D8146C8 sample 8: - time = 185000 + time = 185759 flags = 1 data = length 434, hash F2C5D287 sample 9: - time = 208000 + time = 208979 flags = 1 data = length 450, hash 84143FCD sample 10: - time = 232000 + time = 232199 flags = 1 data = length 429, hash EF769D50 sample 11: - time = 255000 + time = 255419 flags = 1 data = length 450, hash EC3DE692 sample 12: - time = 278000 + time = 278639 flags = 1 data = length 447, hash 3E519E13 sample 13: - time = 301000 + time = 301859 flags = 1 data = length 457, hash 1E4F23A0 sample 14: - time = 325000 + time = 325079 flags = 1 data = length 447, hash A439EA97 sample 15: - time = 348000 + time = 348299 flags = 1 data = length 456, hash 1E9034C6 sample 16: - time = 371000 + time = 371519 flags = 1 data = length 398, hash 99DB7345 sample 17: - time = 394000 + time = 394739 flags = 1 data = length 474, hash 3F05F10A sample 18: - time = 417000 + time = 417959 flags = 1 data = length 416, hash C105EE09 sample 19: - time = 441000 + time = 441179 flags = 1 data = length 454, hash 5FDBE458 sample 20: - time = 464000 + time = 464399 flags = 1 data = length 438, hash 41A93AC3 sample 21: - time = 487000 + time = 487619 flags = 1 data = length 443, hash 10FDA652 sample 22: - time = 510000 + time = 510839 flags = 1 data = length 412, hash 1F791E25 sample 23: - time = 534000 + time = 534058 flags = 1 data = length 482, hash A6D983D sample 24: - time = 557000 + time = 557278 flags = 1 data = length 386, hash BED7392F sample 25: - time = 580000 + time = 580498 flags = 1 data = length 463, hash 5309F8C9 sample 26: - time = 603000 + time = 603718 flags = 1 data = length 394, hash 21C7321F sample 27: - time = 626000 + time = 626938 flags = 1 data = length 489, hash 71B4730D sample 28: - time = 650000 + time = 650158 flags = 1 data = length 403, hash D9C6DE89 sample 29: - time = 673000 + time = 673378 flags = 1 data = length 447, hash 9B14B73B sample 30: - time = 696000 + time = 696598 flags = 1 data = length 439, hash 4760D35B sample 31: - time = 719000 + time = 719818 flags = 1 data = length 463, hash 1601F88D sample 32: - time = 743000 + time = 743038 flags = 1 data = length 423, hash D4AE6773 sample 33: - time = 766000 + time = 766258 flags = 1 data = length 497, hash A3C674D3 sample 34: - time = 789000 + time = 789478 flags = 1 data = length 419, hash D3734A1F sample 35: - time = 812000 + time = 812698 flags = 1 data = length 474, hash DFB41F9 sample 36: - time = 835000 + time = 835918 flags = 1 data = length 413, hash 53E7CB9F sample 37: - time = 859000 + time = 859138 flags = 1 data = length 445, hash D15B0E39 sample 38: - time = 882000 + time = 882358 flags = 1 data = length 453, hash 77ED81E4 sample 39: - time = 905000 + time = 905578 flags = 1 data = length 545, hash 3321AEB9 sample 40: - time = 928000 + time = 928798 flags = 1 data = length 317, hash F557D0E sample 41: - time = 952000 + time = 952018 flags = 1 data = length 537, hash ED58CF7B sample 42: - time = 975000 + time = 975238 flags = 1 data = length 458, hash 51CDAA10 sample 43: - time = 998000 + time = 998458 flags = 1 data = length 465, hash CBA1EFD7 sample 44: - time = 1021000 + time = 1021678 flags = 1 data = length 446, hash D6735B8A sample 45: - time = 1044000 + time = 1044897 flags = 1 data = length 10, hash A453EEBE track 3: