diff --git a/libraries/container/src/main/java/androidx/media3/container/NalUnitUtil.java b/libraries/container/src/main/java/androidx/media3/container/NalUnitUtil.java index 748d5b81ef..4f3fa76e34 100644 --- a/libraries/container/src/main/java/androidx/media3/container/NalUnitUtil.java +++ b/libraries/container/src/main/java/androidx/media3/container/NalUnitUtil.java @@ -681,6 +681,59 @@ public final class NalUnitUtil { return true; } + /** + * Returns the number of bytes needed from the NAL unit to determine whether subsequent NAL units + * can depend on the current NAL unit. + * + * @param format The sample {@link Format}. + */ + public static int numberOfBytesToDetermineSampleDependencies(Format format) { + if (Objects.equals(format.sampleMimeType, MimeTypes.VIDEO_H264)) { + return 1; + } + if (Objects.equals(format.sampleMimeType, MimeTypes.VIDEO_H265)) { + return 2; + } + return 0; + } + + /** + * Returns whether the NAL unit starting with the given bytes can be depended on by subsequent NAL + * units in decoding order. + * + * @param data The array holding the first {@code length} bytes of the NAL unit. + * @param offset The offset in {@code data} at which the NAL unit starts. + * @param length The number of bytes available. + * @param format The sample {@link Format}. + */ + public static boolean isDependedOn(byte[] data, int offset, int length, Format format) { + if (Objects.equals(format.sampleMimeType, MimeTypes.VIDEO_H264)) { + return isH264NalUnitDependedOn(data[offset]); + } + if (Objects.equals(format.sampleMimeType, MimeTypes.VIDEO_H265)) { + return isH265NalUnitDependedOn(data, offset, length, format); + } + return true; + } + + private static boolean isH265NalUnitDependedOn( + byte[] data, int offset, int length, Format format) { + H265NalHeader header = + parseH265NalHeader(new ParsableNalUnitBitArray(data, offset, /* limit= */ offset + length)); + if (header.nalUnitType == H265_NAL_UNIT_TYPE_AUD) { + // NAL unit delimiters are not depended on. + return false; + } + boolean isSubLayerNonReferencePicture = header.nalUnitType <= 14 && header.nalUnitType % 2 == 0; + if (isSubLayerNonReferencePicture && header.temporalId == format.maxSubLayers - 1) { + // Sub-layer non-reference (SLNR) pictures cannot be used for inter prediction in the same + // temporal layer. That is, SLNR pictures are not depended on if they are part of the highest + // temporal layer. + return false; + } + return true; + } + /** * Returns the type of the H.265 NAL unit in {@code data} that starts at {@code offset}. * diff --git a/libraries/container/src/test/java/androidx/media3/container/NalUnitUtilTest.java b/libraries/container/src/test/java/androidx/media3/container/NalUnitUtilTest.java index 334000ac35..fa2cd5a6dc 100644 --- a/libraries/container/src/test/java/androidx/media3/container/NalUnitUtilTest.java +++ b/libraries/container/src/test/java/androidx/media3/container/NalUnitUtilTest.java @@ -15,9 +15,13 @@ */ package androidx.media3.container; +import static androidx.media3.container.NalUnitUtil.isDependedOn; +import static androidx.media3.container.NalUnitUtil.numberOfBytesToDetermineSampleDependencies; import static androidx.media3.test.utils.TestUtil.createByteArray; import static com.google.common.truth.Truth.assertThat; +import androidx.media3.common.Format; +import androidx.media3.common.MimeTypes; import androidx.media3.common.util.Util; import androidx.test.ext.junit.runners.AndroidJUnit4; import com.google.common.collect.ImmutableList; @@ -494,6 +498,20 @@ public final class NalUnitUtilTest { assertThat(spsData.maxNumReorderPics).isEqualTo(0); } + @Test + public void numberOfBytesToDetermineSampleDependencies_vp8_returnsZero() { + Format vp8Video = new Format.Builder().setSampleMimeType(MimeTypes.VIDEO_VP8).build(); + + assertThat(numberOfBytesToDetermineSampleDependencies(vp8Video)).isEqualTo(0); + } + + @Test + public void isDependedOn_vp8_returnsTrue() { + Format vp8Video = new Format.Builder().setSampleMimeType(MimeTypes.VIDEO_VP8).build(); + + assertThat(isDependedOn(new byte[0], /* offset= */ 0, /* length= */ 0, vp8Video)).isTrue(); + } + private static byte[] buildTestData() { byte[] data = new byte[20]; Arrays.fill(data, (byte) 0xFF); diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/Mp4Extractor.java b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/Mp4Extractor.java index 5b51804b0e..3891f27879 100644 --- a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/Mp4Extractor.java +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/Mp4Extractor.java @@ -164,6 +164,14 @@ public final class Mp4Extractor implements Extractor, SeekMap { */ public static final int FLAG_READ_AUXILIARY_TRACKS = 1 << 6; + /** + * Flag to extract additional sample dependency information, and mark output buffers with {@link + * C#BUFFER_FLAG_NOT_DEPENDED_ON} for {@linkplain MimeTypes#VIDEO_H265 H.265} video. + * + *

See {@link #FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES}. + */ + public static final int FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES_H265 = 1 << 7; + /** * @deprecated Use {@link #newFactory(SubtitleParser.Factory)} instead. */ @@ -302,13 +310,11 @@ public final class Mp4Extractor implements Extractor, SeekMap { atomHeader = new ParsableByteArray(Mp4Box.LONG_HEADER_SIZE); containerAtoms = new ArrayDeque<>(); nalStartCode = new ParsableByteArray(NalUnitUtil.NAL_START_CODE); - nalPrefix = new ParsableByteArray(5); + nalPrefix = new ParsableByteArray(6); scratch = new ParsableByteArray(); sampleTrackIndex = C.INDEX_UNSET; extractorOutput = ExtractorOutput.PLACEHOLDER; tracks = new Mp4Track[0]; - // Treat all samples as depended on when FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES is unset. - isSampleDependedOn = (flags & FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES) == 0; } @Override @@ -342,8 +348,7 @@ public final class Mp4Extractor implements Extractor, SeekMap { sampleBytesRead = 0; sampleBytesWritten = 0; sampleCurrentNalBytesRemaining = 0; - // Treat all samples as depended on when FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES is unset. - isSampleDependedOn = (flags & FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES) == 0; + isSampleDependedOn = false; if (position == 0) { // Reading the SEF data occurs before normal MP4 parsing. Therefore we can not transition to // reading the atom header until that has completed. @@ -877,8 +882,7 @@ public final class Mp4Extractor implements Extractor, SeekMap { sampleSize -= Mp4Box.HEADER_SIZE; } input.skipFully((int) skipAmount); - // Treat all samples in non-H.264 codecs as depended on. - if (!Objects.equals(track.track.format.sampleMimeType, MimeTypes.VIDEO_H264)) { + if (!canReadWithinGopSampleDependencies(track.track.format)) { isSampleDependedOn = true; } if (track.track.nalUnitLengthFieldLength != 0) { @@ -895,16 +899,19 @@ public final class Mp4Extractor implements Extractor, SeekMap { while (sampleBytesWritten < sampleSize) { if (sampleCurrentNalBytesRemaining == 0) { int nalUnitPrefixLength = track.track.nalUnitLengthFieldLength; - boolean readNalType = false; + int numberOfBytesToDetermineSampleDependencies = 0; if (!isSampleDependedOn - && nalUnitPrefixLength + 1 + && nalUnitPrefixLength + + NalUnitUtil.numberOfBytesToDetermineSampleDependencies(track.track.format) <= track.sampleTable.sizes[sampleIndex] - sampleBytesRead) { - // Parsing sample dependencies needs the first NAL unit byte. Read it in the same + // Parsing sample dependencies needs the first few NAL unit bytes. Read them in the same // readFully call that reads the NAL length. This ensures sampleBytesRead, // sampleBytesWritten and isSampleDependedOn remain in a consistent state if we have // read failures. - nalUnitPrefixLength = track.track.nalUnitLengthFieldLength + 1; - readNalType = true; + numberOfBytesToDetermineSampleDependencies = + NalUnitUtil.numberOfBytesToDetermineSampleDependencies(track.track.format); + nalUnitPrefixLength = + track.track.nalUnitLengthFieldLength + numberOfBytesToDetermineSampleDependencies; } // Read the NAL length so that we know where we find the next one. input.readFully(nalPrefixData, nalUnitLengthFieldLengthDiff, nalUnitPrefixLength); @@ -915,19 +922,24 @@ public final class Mp4Extractor implements Extractor, SeekMap { throw ParserException.createForMalformedContainer( "Invalid NAL length", /* cause= */ null); } - sampleCurrentNalBytesRemaining = nalLengthInt - (readNalType ? 1 : 0); + sampleCurrentNalBytesRemaining = + nalLengthInt - numberOfBytesToDetermineSampleDependencies; // Write a start code for the current NAL unit. nalStartCode.setPosition(0); trackOutput.sampleData(nalStartCode, 4); sampleBytesWritten += 4; sampleSize += nalUnitLengthFieldLengthDiff; - if (readNalType) { - // Write the NAL unit type byte. - trackOutput.sampleData(nalPrefix, 1); - sampleBytesWritten += 1; + if (numberOfBytesToDetermineSampleDependencies > 0) { + // Write the first NAL unit bytes that were read. + trackOutput.sampleData(nalPrefix, numberOfBytesToDetermineSampleDependencies); + sampleBytesWritten += numberOfBytesToDetermineSampleDependencies; // If any NAL unit that's part of this sample can be depended on, treat the entire // sample as depended on. - if (NalUnitUtil.isH264NalUnitDependedOn(nalPrefixData[4])) { + if (NalUnitUtil.isDependedOn( + nalPrefixData, + /* offset= */ 4, + /* length= */ numberOfBytesToDetermineSampleDependencies, + track.track.format)) { isSampleDependedOn = true; } } @@ -980,8 +992,7 @@ public final class Mp4Extractor implements Extractor, SeekMap { sampleBytesRead = 0; sampleBytesWritten = 0; sampleCurrentNalBytesRemaining = 0; - // Treat all samples as depended on when FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES is unset. - isSampleDependedOn = (flags & FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES) == 0; + isSampleDependedOn = false; return RESULT_CONTINUE; } @@ -1083,6 +1094,20 @@ public final class Mp4Extractor implements Extractor, SeekMap { } } + /** + * Returns whether reading within GOP sample dependencies is enabled for the sample {@link + * Format}. + */ + private boolean canReadWithinGopSampleDependencies(Format format) { + if (Objects.equals(format.sampleMimeType, MimeTypes.VIDEO_H264)) { + return (flags & FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES) != 0; + } + if (Objects.equals(format.sampleMimeType, MimeTypes.VIDEO_H265)) { + return (flags & FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES_H265) != 0; + } + return false; + } + /** * For each sample of each track, calculates accumulated size of all samples which need to be read * before this sample can be used. diff --git a/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java b/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java index 427be2b6b0..57c1619933 100644 --- a/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java +++ b/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java @@ -244,6 +244,11 @@ public final class Mp4ExtractorParameterizedTest { assertExtractorBehavior("media/mp4/sample_with_invalid_nalu.mp4"); } + @Test + public void mp4SampleWithNonReferenceH265Frames() throws Exception { + assertExtractorBehavior("media/mp4/h265_bframes.mp4"); + } + private void assertExtractorBehavior(String file) throws IOException { ExtractorAsserts.AssertionConfig.Builder assertionConfigBuilder = new ExtractorAsserts.AssertionConfig.Builder(); @@ -272,6 +277,7 @@ public final class Mp4ExtractorParameterizedTest { } if (readWithinGopSampleDependencies) { flags |= Mp4Extractor.FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES; + flags |= Mp4Extractor.FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES_H265; } @Mp4Extractor.Flags int finalFlags = flags; diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.0.dump new file mode 100644 index 0000000000..c3747ca083 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.0.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 0 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 0 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 0 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 0 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 0 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 0 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 0 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 0 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 0 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 0 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 0 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 0 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 0 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 0 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 536870912 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.1.dump new file mode 100644 index 0000000000..c3747ca083 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.1.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 0 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 0 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 0 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 0 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 0 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 0 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 0 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 0 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 0 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 0 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 0 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 0 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 0 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 0 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 536870912 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.2.dump new file mode 100644 index 0000000000..c3747ca083 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.2.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 0 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 0 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 0 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 0 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 0 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 0 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 0 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 0 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 0 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 0 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 0 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 0 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 0 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 0 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 536870912 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.3.dump new file mode 100644 index 0000000000..c3747ca083 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.3.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 0 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 0 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 0 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 0 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 0 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 0 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 0 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 0 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 0 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 0 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 0 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 0 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 0 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 0 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 536870912 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.0.dump new file mode 100644 index 0000000000..7f2a42e0e9 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.0.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 67108864 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 67108864 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 67108864 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 67108864 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 67108864 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 67108864 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 67108864 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 67108864 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 67108864 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 67108864 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 67108864 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 67108864 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 67108864 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 67108864 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 603979776 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.1.dump new file mode 100644 index 0000000000..7f2a42e0e9 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.1.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 67108864 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 67108864 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 67108864 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 67108864 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 67108864 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 67108864 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 67108864 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 67108864 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 67108864 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 67108864 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 67108864 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 67108864 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 67108864 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 67108864 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 603979776 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.2.dump new file mode 100644 index 0000000000..7f2a42e0e9 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.2.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 67108864 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 67108864 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 67108864 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 67108864 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 67108864 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 67108864 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 67108864 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 67108864 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 67108864 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 67108864 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 67108864 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 67108864 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 67108864 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 67108864 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 603979776 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.3.dump new file mode 100644 index 0000000000..7f2a42e0e9 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.3.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 67108864 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 67108864 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 67108864 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 67108864 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 67108864 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 67108864 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 67108864 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 67108864 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 67108864 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 67108864 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 67108864 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 67108864 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 67108864 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 67108864 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 603979776 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.unknown_length.dump new file mode 100644 index 0000000000..7f2a42e0e9 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.reading_within_gop_sample_dependencies.unknown_length.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 67108864 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 67108864 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 67108864 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 67108864 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 67108864 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 67108864 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 67108864 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 67108864 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 67108864 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 67108864 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 67108864 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 67108864 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 67108864 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 67108864 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 603979776 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.unknown_length.dump new file mode 100644 index 0000000000..c3747ca083 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/mp4/h265_bframes.mp4.unknown_length.dump @@ -0,0 +1,151 @@ +seekMap: + isSeekable = true + duration = 1000000 + getPosition(0) = [[timeUs=0, position=44]] + getPosition(1) = [[timeUs=0, position=44]] + getPosition(500000) = [[timeUs=0, position=44]] + getPosition(1000000) = [[timeUs=0, position=44]] +numberOfTracks = 1 +track 0: + total output bytes = 19395 + sample count = 30 + track duration = 1000000 + format 0: + id = 1 + containerMimeType = video/mp4 + sampleMimeType = video/hevc + codecs = hvc1.1.6.L90.90 + maxInputSize = 7848 + maxNumReorderSamples = 2 + width = 854 + height = 480 + frameRate = 30.00 + maxSubLayers = 1 + colorInfo: + colorRange = 2 + lumaBitdepth = 8 + chromaBitdepth = 8 + metadata = entries=[TSSE: description=null: values=[Lavf60.16.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000] + initializationData: + data = length 84, hash 6FF5034A + sample 0: + time = 0 + flags = 1 + data = length 2520, hash 9DF10E5A + sample 1: + time = 33333 + flags = 0 + data = length 1227, hash C3B78778 + sample 2: + time = 200000 + flags = 0 + data = length 7818, hash 3118F8A5 + sample 3: + time = 133333 + flags = 0 + data = length 2314, hash F06B088 + sample 4: + time = 66666 + flags = 0 + data = length 1066, hash 2F1BE2DB + sample 5: + time = 100000 + flags = 0 + data = length 106, hash CF881CF + sample 6: + time = 166666 + flags = 0 + data = length 69, hash 43B2E357 + sample 7: + time = 366666 + flags = 0 + data = length 304, hash 19293C74 + sample 8: + time = 300000 + flags = 0 + data = length 145, hash C3F16A + sample 9: + time = 233333 + flags = 0 + data = length 226, hash FDA9A38B + sample 10: + time = 266666 + flags = 0 + data = length 185, hash 9C800E54 + sample 11: + time = 333333 + flags = 0 + data = length 90, hash D1EA90C4 + sample 12: + time = 466666 + flags = 0 + data = length 298, hash F203E87C + sample 13: + time = 433333 + flags = 0 + data = length 276, hash 66430FFD + sample 14: + time = 400000 + flags = 0 + data = length 186, hash B985342A + sample 15: + time = 500000 + flags = 0 + data = length 279, hash 1EFA3459 + sample 16: + time = 666666 + flags = 0 + data = length 265, hash 7FCB3588 + sample 17: + time = 600000 + flags = 0 + data = length 214, hash EFA105EC + sample 18: + time = 533333 + flags = 0 + data = length 138, hash 5F4FDE79 + sample 19: + time = 566666 + flags = 0 + data = length 122, hash 951D945A + sample 20: + time = 633333 + flags = 0 + data = length 103, hash 50A4D1ED + sample 21: + time = 833333 + flags = 0 + data = length 241, hash 290CE032 + sample 22: + time = 766666 + flags = 0 + data = length 211, hash D120B486 + sample 23: + time = 700000 + flags = 0 + data = length 103, hash D33CDF67 + sample 24: + time = 733333 + flags = 0 + data = length 111, hash E8A78D5 + sample 25: + time = 800000 + flags = 0 + data = length 119, hash 3FA7645D + sample 26: + time = 966666 + flags = 0 + data = length 261, hash 53B1BD3B + sample 27: + time = 900000 + flags = 0 + data = length 142, hash B45973DC + sample 28: + time = 866666 + flags = 0 + data = length 88, hash 757187AE + sample 29: + time = 933333 + flags = 536870912 + data = length 168, hash 8220F9BC +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/media/mp4/h265_bframes.mp4 b/libraries/test_data/src/test/assets/media/mp4/h265_bframes.mp4 new file mode 100644 index 0000000000..d389df86f7 Binary files /dev/null and b/libraries/test_data/src/test/assets/media/mp4/h265_bframes.mp4 differ