diff --git a/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/e2etest/MkvPlaybackTest.java b/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/e2etest/MkvPlaybackTest.java index 8a60e0416b..a55cdabed5 100644 --- a/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/e2etest/MkvPlaybackTest.java +++ b/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/e2etest/MkvPlaybackTest.java @@ -22,7 +22,9 @@ import androidx.media3.common.C; import androidx.media3.common.MediaItem; import androidx.media3.common.Player; import androidx.media3.exoplayer.ExoPlayer; +import androidx.media3.exoplayer.source.DefaultMediaSourceFactory; import androidx.media3.exoplayer.trackselection.DefaultTrackSelector; +import androidx.media3.extractor.DefaultExtractorsFactory; import androidx.media3.test.utils.CapturingRenderersFactory; import androidx.media3.test.utils.DumpFileAsserts; import androidx.media3.test.utils.FakeClock; @@ -66,21 +68,27 @@ public final class MkvPlaybackTest { Context applicationContext = ApplicationProvider.getApplicationContext(); CapturingRenderersFactory capturingRenderersFactory = new CapturingRenderersFactory(applicationContext); + // TODO: b/289916598 - Remove this when transcoding is the default. + DefaultExtractorsFactory extractorsFactory = + new DefaultExtractorsFactory().setTextTrackTranscodingEnabled(true); + DefaultMediaSourceFactory mediaSourceFactory = + new DefaultMediaSourceFactory(applicationContext, extractorsFactory); ExoPlayer player = - new ExoPlayer.Builder(applicationContext, capturingRenderersFactory) + new ExoPlayer.Builder(applicationContext, capturingRenderersFactory, mediaSourceFactory) .setClock(new FakeClock(/* isAutoAdvancing= */ true)) .build(); - // TODO(internal b/174661563): Remove the for-loop below to enable the text renderer when - // subtitle output is not flaky. - for (int textRendererIndex = 0; - textRendererIndex < player.getRendererCount(); - textRendererIndex++) { - if (player.getRendererType(textRendererIndex) == C.TRACK_TYPE_TEXT) { - player.setTrackSelectionParameters( - new DefaultTrackSelector.ParametersBuilder(applicationContext) - .setRendererDisabled(textRendererIndex, /* disabled= */ true) - .build()); - break; + // TODO: b/181312195 - Remove this when WebVTT is supported by DefaultSubtitleParserFactory. + if (inputFile.contains("_vtt_")) { + for (int textRendererIndex = 0; + textRendererIndex < player.getRendererCount(); + textRendererIndex++) { + if (player.getRendererType(textRendererIndex) == C.TRACK_TYPE_TEXT) { + player.setTrackSelectionParameters( + new DefaultTrackSelector.ParametersBuilder(applicationContext) + .setRendererDisabled(textRendererIndex, /* disabled= */ true) + .build()); + break; + } } } Surface surface = new Surface(new SurfaceTexture(/* texName= */ 1)); diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/DefaultExtractorsFactory.java b/libraries/extractor/src/main/java/androidx/media3/extractor/DefaultExtractorsFactory.java index 4cac197964..bfe4854fcc 100644 --- a/libraries/extractor/src/main/java/androidx/media3/extractor/DefaultExtractorsFactory.java +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/DefaultExtractorsFactory.java @@ -23,6 +23,7 @@ import androidx.annotation.GuardedBy; import androidx.annotation.Nullable; import androidx.media3.common.FileTypes; import androidx.media3.common.Format; +import androidx.media3.common.MimeTypes; import androidx.media3.common.PlaybackException; import androidx.media3.common.Player; import androidx.media3.common.util.TimestampAdjuster; @@ -37,6 +38,9 @@ import androidx.media3.extractor.mp3.Mp3Extractor; import androidx.media3.extractor.mp4.FragmentedMp4Extractor; import androidx.media3.extractor.mp4.Mp4Extractor; import androidx.media3.extractor.ogg.OggExtractor; +import androidx.media3.extractor.text.DefaultSubtitleParserFactory; +import androidx.media3.extractor.text.SubtitleParser; +import androidx.media3.extractor.text.SubtitleTranscodingExtractor; import androidx.media3.extractor.ts.Ac3Extractor; import androidx.media3.extractor.ts.Ac4Extractor; import androidx.media3.extractor.ts.AdtsExtractor; @@ -133,10 +137,13 @@ public final class DefaultExtractorsFactory implements ExtractorsFactory { // TODO (b/261183220): Initialize tsSubtitleFormats in constructor once shrinking bug is fixed. @Nullable private ImmutableList tsSubtitleFormats; private int tsTimestampSearchBytes; + private boolean textTrackTranscodingEnabled; + private SubtitleParser.Factory subtitleParserFactory; public DefaultExtractorsFactory() { tsMode = TsExtractor.MODE_SINGLE_PMT; tsTimestampSearchBytes = TsExtractor.DEFAULT_TIMESTAMP_SEARCH_BYTES; + subtitleParserFactory = new DefaultSubtitleParserFactory(); } /** @@ -336,6 +343,40 @@ public final class DefaultExtractorsFactory implements ExtractorsFactory { return this; } + /** + * Enables transcoding of text track samples to {@link MimeTypes#TEXT_EXOPLAYER_CUES} before the + * data is emitted to {@link TrackOutput}. + * + *

Transcoding is disabled by default. + * + * @param textTrackTranscodingEnabled Whether to enable transcoding. + * @return The factory, for convenience. + */ + // TODO: b/289916598 - Flip this to default to enabled and deprecate it. + @CanIgnoreReturnValue + public synchronized DefaultExtractorsFactory setTextTrackTranscodingEnabled( + boolean textTrackTranscodingEnabled) { + this.textTrackTranscodingEnabled = textTrackTranscodingEnabled; + return this; + } + + /** + * Sets a {@link SubtitleParser.Factory} to use when transcoding text tracks. + * + *

This is only used if {@link #setTextTrackTranscodingEnabled(boolean)} is enabled. + * + *

The default value is {@link DefaultSubtitleParserFactory}. + * + * @param subtitleParserFactory The factory for {@link SubtitleParser} instances. + * @return The factory, for convenience. + */ + @CanIgnoreReturnValue + public synchronized DefaultExtractorsFactory setSubtitleParserFactory( + SubtitleParser.Factory subtitleParserFactory) { + this.subtitleParserFactory = subtitleParserFactory; + return this; + } + @Override public synchronized Extractor[] createExtractors() { return createExtractors(Uri.EMPTY, new HashMap<>()); @@ -364,8 +405,14 @@ public final class DefaultExtractorsFactory implements ExtractorsFactory { addExtractorsForFileType(fileType, extractors); } } - - return extractors.toArray(new Extractor[extractors.size()]); + Extractor[] result = new Extractor[extractors.size()]; + for (int i = 0; i < extractors.size(); i++) { + result[i] = + textTrackTranscodingEnabled + ? new SubtitleTranscodingExtractor(extractors.get(i), subtitleParserFactory) + : extractors.get(i); + } + return result; } private void addExtractorsForFileType(@FileTypes.Type int fileType, List extractors) { diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingExtractor.java b/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingExtractor.java new file mode 100644 index 0000000000..ca3b298460 --- /dev/null +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingExtractor.java @@ -0,0 +1,96 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.media3.extractor.text; + +import androidx.media3.common.C; +import androidx.media3.common.Format; +import androidx.media3.common.MimeTypes; +import androidx.media3.common.util.UnstableApi; +import androidx.media3.extractor.Extractor; +import androidx.media3.extractor.ExtractorInput; +import androidx.media3.extractor.ExtractorOutput; +import androidx.media3.extractor.PositionHolder; +import androidx.media3.extractor.TrackOutput; +import java.io.IOException; +import org.checkerframework.checker.nullness.qual.MonotonicNonNull; + +/** + * A wrapping {@link Extractor} that transcodes {@linkplain C#TRACK_TYPE_TEXT text samples} from + * supported subtitle formats to {@link MimeTypes#TEXT_EXOPLAYER_CUES}. + * + *

Samples emitted by the delegate {@link Extractor} to {@linkplain C#TRACK_TYPE_TEXT text + * tracks} with a supported subtitle format are transcoded and the resulting {@link + * MimeTypes#TEXT_EXOPLAYER_CUES} samples are emitted to the underlying {@link TrackOutput}. + * + *

Samples emitted by the delegate {@link Extractor} to non-text tracks (or text tracks with an + * unsupported format) are passed through to the underlying {@link TrackOutput} without + * modification. + * + *

Support for subtitle formats is determined by {@link + * SubtitleParser.Factory#supportsFormat(Format)} on the {@link SubtitleParser.Factory} passed to + * the constructor of this class. + */ +@UnstableApi +public class SubtitleTranscodingExtractor implements Extractor { + + private final Extractor delegate; + private final SubtitleParser.Factory subtitleParserFactory; + + private @MonotonicNonNull SubtitleTranscodingExtractorOutput transcodingExtractorOutput; + + public SubtitleTranscodingExtractor( + Extractor delegate, SubtitleParser.Factory subtitleParserFactory) { + this.delegate = delegate; + this.subtitleParserFactory = subtitleParserFactory; + } + + @Override + public boolean sniff(ExtractorInput input) throws IOException { + return delegate.sniff(input); + } + + @Override + public void init(ExtractorOutput output) { + transcodingExtractorOutput = + new SubtitleTranscodingExtractorOutput(output, subtitleParserFactory); + delegate.init(transcodingExtractorOutput); + } + + @Override + public @ReadResult int read(ExtractorInput input, PositionHolder seekPosition) + throws IOException { + return delegate.read(input, seekPosition); + } + + @Override + public void seek(long position, long timeUs) { + if (transcodingExtractorOutput != null) { + transcodingExtractorOutput.resetSubtitleParsers(); + } + delegate.seek(position, timeUs); + } + + @Override + public void release() { + delegate.release(); + } + + @Override + public Extractor getUnderlyingImplementation() { + return delegate; + } +} diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorOutput.java b/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorOutput.java new file mode 100644 index 0000000000..ae0cc9394c --- /dev/null +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorOutput.java @@ -0,0 +1,71 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.media3.extractor.text; + +import android.util.SparseArray; +import androidx.media3.common.C; +import androidx.media3.extractor.ExtractorOutput; +import androidx.media3.extractor.SeekMap; +import androidx.media3.extractor.TrackOutput; + +/** A wrapping {@link ExtractorOutput} for use by {@link SubtitleTranscodingExtractor}. */ +/* package */ class SubtitleTranscodingExtractorOutput implements ExtractorOutput { + + private final ExtractorOutput delegate; + private final SubtitleParser.Factory subtitleParserFactory; + private final SparseArray textTrackOutputs; + + public SubtitleTranscodingExtractorOutput( + ExtractorOutput delegate, SubtitleParser.Factory subtitleParserFactory) { + this.delegate = delegate; + this.subtitleParserFactory = subtitleParserFactory; + textTrackOutputs = new SparseArray<>(); + } + + public void resetSubtitleParsers() { + for (int i = 0; i < textTrackOutputs.size(); i++) { + textTrackOutputs.valueAt(i).resetSubtitleParser(); + } + } + + // ExtractorOutput implementation + + @Override + public TrackOutput track(int id, @C.TrackType int type) { + if (type != C.TRACK_TYPE_TEXT) { + return delegate.track(id, type); + } + SubtitleTranscodingTrackOutput existingTrackOutput = textTrackOutputs.get(id); + if (existingTrackOutput != null) { + return existingTrackOutput; + } + SubtitleTranscodingTrackOutput trackOutput = + new SubtitleTranscodingTrackOutput(delegate.track(id, type), subtitleParserFactory); + textTrackOutputs.put(id, trackOutput); + return trackOutput; + } + + @Override + public void endTracks() { + delegate.endTracks(); + } + + @Override + public void seekMap(SeekMap seekMap) { + delegate.seekMap(seekMap); + } +} diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingTrackOutput.java b/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingTrackOutput.java new file mode 100644 index 0000000000..0587771bda --- /dev/null +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/text/SubtitleTranscodingTrackOutput.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.media3.extractor.text; + +import static androidx.media3.common.util.Assertions.checkArgument; +import static androidx.media3.common.util.Assertions.checkNotNull; +import static androidx.media3.common.util.Assertions.checkState; +import static androidx.media3.common.util.Assertions.checkStateNotNull; +import static java.lang.Math.max; + +import androidx.annotation.Nullable; +import androidx.media3.common.C; +import androidx.media3.common.DataReader; +import androidx.media3.common.Format; +import androidx.media3.common.MimeTypes; +import androidx.media3.common.util.ParsableByteArray; +import androidx.media3.common.util.Util; +import androidx.media3.extractor.TrackOutput; +import java.io.EOFException; +import java.io.IOException; +import java.util.List; +import org.checkerframework.checker.nullness.qual.MonotonicNonNull; + +/** + * A wrapping {@link TrackOutput} which transcodes from a source subtitle format like {@link + * MimeTypes#APPLICATION_SUBRIP} to ExoPlayer's internal binary cue representation ({@link + * MimeTypes#TEXT_EXOPLAYER_CUES}). + */ +/* package */ class SubtitleTranscodingTrackOutput implements TrackOutput { + + private final TrackOutput delegate; + private final SubtitleParser.Factory subtitleParserFactory; + private final CueEncoder cueEncoder; + private final ParsableByteArray parsableScratch; + + private int sampleDataStart; + private int sampleDataEnd; + private byte[] sampleData; + @Nullable private SubtitleParser currentSubtitleParser; + private @MonotonicNonNull Format currentFormat; + + public SubtitleTranscodingTrackOutput( + TrackOutput delegate, SubtitleParser.Factory subtitleParserFactory) { + this.delegate = delegate; + this.subtitleParserFactory = subtitleParserFactory; + this.cueEncoder = new CueEncoder(); + this.sampleDataStart = 0; + this.sampleDataEnd = 0; + this.sampleData = Util.EMPTY_BYTE_ARRAY; + this.parsableScratch = new ParsableByteArray(); + } + + public void resetSubtitleParser() { + if (currentSubtitleParser != null) { + currentSubtitleParser.reset(); + } + } + + // TrackOutput implementation + + @Override + public void format(Format format) { + checkNotNull(format.sampleMimeType); + checkArgument(MimeTypes.getTrackType(format.sampleMimeType) == C.TRACK_TYPE_TEXT); + if (!format.equals(currentFormat)) { + currentFormat = format; + currentSubtitleParser = + subtitleParserFactory.supportsFormat(format) + ? subtitleParserFactory.create(format) + : null; + } + if (currentSubtitleParser == null) { + delegate.format(format); + } else { + delegate.format( + format + .buildUpon() + .setSampleMimeType(MimeTypes.TEXT_EXOPLAYER_CUES) + .setCodecs(format.sampleMimeType) + // Reset this value to the default. All non-default timestamp adjustments are done + // below in sampleMetadata() and there are no 'subsamples' after transcoding. + .setSubsampleOffsetUs(Format.OFFSET_SAMPLE_RELATIVE) + .build()); + } + } + + @Override + public int sampleData( + DataReader input, int length, boolean allowEndOfInput, @SampleDataPart int sampleDataPart) + throws IOException { + if (currentSubtitleParser == null) { + return delegate.sampleData(input, length, allowEndOfInput, sampleDataPart); + } + ensureSampleDataCapacity(length); + int bytesRead = input.read(sampleData, /* offset= */ sampleDataEnd, length); + if (bytesRead == C.RESULT_END_OF_INPUT) { + if (allowEndOfInput) { + return C.RESULT_END_OF_INPUT; + } else { + throw new EOFException(); + } + } else { + sampleDataEnd += bytesRead; + return bytesRead; + } + } + + @Override + public void sampleData(ParsableByteArray data, int length, @SampleDataPart int sampleDataPart) { + if (currentSubtitleParser == null) { + delegate.sampleData(data, length, sampleDataPart); + return; + } + ensureSampleDataCapacity(length); + data.readBytes(sampleData, /* offset= */ sampleDataEnd, length); + sampleDataEnd += length; + } + + @Override + public void sampleMetadata( + long timeUs, + @C.BufferFlags int flags, + int size, + int offset, + @Nullable CryptoData cryptoData) { + if (currentSubtitleParser == null) { + delegate.sampleMetadata(timeUs, flags, size, offset, cryptoData); + return; + } + checkStateNotNull(currentFormat); // format() must be called before sampleMetadata() + checkArgument(cryptoData == null, "DRM on subtitles is not supported"); + + int sampleStart = sampleDataEnd - offset - size; + @Nullable + List cuesWithTimingList = + currentSubtitleParser.parse(sampleData, /* offset= */ sampleStart, /* length= */ size); + sampleDataStart = sampleStart + size; + if (cuesWithTimingList != null) { + for (int i = 0; i < cuesWithTimingList.size(); i++) { + CuesWithTiming cuesWithTiming = cuesWithTimingList.get(i); + byte[] cuesWithDurationBytes = + cueEncoder.encode(cuesWithTiming.cues, cuesWithTiming.durationUs); + + parsableScratch.reset(cuesWithDurationBytes); + delegate.sampleData(parsableScratch, cuesWithDurationBytes.length); + // Clear FLAG_DECODE_ONLY if it is set. + flags &= ~C.BUFFER_FLAG_DECODE_ONLY; + long outputSampleTimeUs; + if (cuesWithTiming.startTimeUs == C.TIME_UNSET) { + checkState(currentFormat.subsampleOffsetUs == Format.OFFSET_SAMPLE_RELATIVE); + outputSampleTimeUs = timeUs; + } else if (currentFormat.subsampleOffsetUs == Format.OFFSET_SAMPLE_RELATIVE) { + outputSampleTimeUs = timeUs + cuesWithTiming.startTimeUs; + } else { + outputSampleTimeUs = cuesWithTiming.startTimeUs + currentFormat.subsampleOffsetUs; + } + delegate.sampleMetadata( + outputSampleTimeUs, + flags, + cuesWithDurationBytes.length, + /* offset= */ 0, + /* cryptoData= */ null); + } + } + } + + /** + * Ensures that {@link #sampleData} has at least {@code newSampleSize} bytes available at the end + * (after {@link #sampleDataEnd}). + * + *

If there is not sufficient space, the target size is either twice the currently-used size, + * or just large enough to handle {@code newSampleSize} bytes if twice is not large enough. If + * {@link #sampleData} is already large enough to hold the new target size, we avoid allocating a + * new array and just copy bytes to the beginning of the existing array. + */ + private void ensureSampleDataCapacity(int newSampleSize) { + if (sampleData.length - sampleDataEnd >= newSampleSize) { + return; + } + int existingSampleDataLength = sampleDataEnd - sampleDataStart; + int targetLength = max(existingSampleDataLength * 2, sampleDataEnd + newSampleSize); + byte[] newSampleData = targetLength <= sampleData.length ? sampleData : new byte[targetLength]; + System.arraycopy(sampleData, sampleDataStart, newSampleData, 0, existingSampleDataLength); + sampleDataStart = 0; + sampleDataEnd = existingSampleDataLength; + sampleData = newSampleData; + } +} diff --git a/libraries/extractor/src/test/java/androidx/media3/extractor/DefaultExtractorsFactoryTest.java b/libraries/extractor/src/test/java/androidx/media3/extractor/DefaultExtractorsFactoryTest.java index 0654d5aa6b..ed189e8143 100644 --- a/libraries/extractor/src/test/java/androidx/media3/extractor/DefaultExtractorsFactoryTest.java +++ b/libraries/extractor/src/test/java/androidx/media3/extractor/DefaultExtractorsFactoryTest.java @@ -15,6 +15,7 @@ */ package androidx.media3.extractor; +import static androidx.media3.common.util.Assertions.checkState; import static com.google.common.truth.Truth.assertThat; import android.net.Uri; @@ -29,6 +30,7 @@ import androidx.media3.extractor.mp3.Mp3Extractor; import androidx.media3.extractor.mp4.FragmentedMp4Extractor; import androidx.media3.extractor.mp4.Mp4Extractor; import androidx.media3.extractor.ogg.OggExtractor; +import androidx.media3.extractor.text.SubtitleTranscodingExtractor; import androidx.media3.extractor.ts.Ac3Extractor; import androidx.media3.extractor.ts.Ac4Extractor; import androidx.media3.extractor.ts.AdtsExtractor; @@ -54,7 +56,7 @@ public final class DefaultExtractorsFactoryTest { Extractor[] extractors = defaultExtractorsFactory.createExtractors(); - List> extractorClasses = getExtractorClasses(extractors); + List> extractorClasses = getUnderlyingExtractorClasses(extractors); assertThat(extractorClasses.subList(0, 3)) .containsExactly(FlvExtractor.class, FlacExtractor.class, WavExtractor.class) .inOrder(); @@ -85,7 +87,7 @@ public final class DefaultExtractorsFactoryTest { Extractor[] extractors = defaultExtractorsFactory.createExtractors(uri, responseHeaders); - List> extractorClasses = getExtractorClasses(extractors); + List> extractorClasses = getUnderlyingExtractorClasses(extractors); assertThat(extractorClasses.subList(0, 2)) .containsExactly(Mp4Extractor.class, FragmentedMp4Extractor.class); assertThat(extractorClasses.get(2)).isEqualTo(Mp3Extractor.class); @@ -100,7 +102,7 @@ public final class DefaultExtractorsFactoryTest { Extractor[] extractors = defaultExtractorsFactory.createExtractors(uri, responseHeaders); - List> extractorClasses = getExtractorClasses(extractors); + List> extractorClasses = getUnderlyingExtractorClasses(extractors); assertThat(extractorClasses.subList(3, extractors.length)) .containsExactly( FlvExtractor.class, @@ -119,10 +121,60 @@ public final class DefaultExtractorsFactoryTest { .inOrder(); } - private static List> getExtractorClasses(Extractor[] extractors) { + @Test + public void subtitleTranscoding_notEnabledByDefault() { + DefaultExtractorsFactory defaultExtractorsFactory = new DefaultExtractorsFactory(); + + Extractor[] extractors = defaultExtractorsFactory.createExtractors(); + + for (Extractor extractor : extractors) { + assertThat(extractor.getClass()).isNotEqualTo(SubtitleTranscodingExtractor.class); + } + } + + @Test + public void subtitleTranscoding_ifEnabled_wrapsExtractorsThatSupportMuxedSubtitles() { + DefaultExtractorsFactory defaultExtractorsFactory = + new DefaultExtractorsFactory().setTextTrackTranscodingEnabled(true); + + Extractor[] extractors = defaultExtractorsFactory.createExtractors(); + + Extractor aviExtractor = null; + Extractor matroskaExtractor = null; + Extractor mp4Extractor = null; + Extractor fragmentedMp4Extractor = null; + Extractor tsExtractor = null; + + for (Extractor extractor : extractors) { + if (extractor.getUnderlyingImplementation() instanceof AviExtractor) { + checkState(aviExtractor == null); + aviExtractor = extractor; + } else if (extractor.getUnderlyingImplementation() instanceof MatroskaExtractor) { + checkState(matroskaExtractor == null); + matroskaExtractor = extractor; + } else if (extractor.getUnderlyingImplementation() instanceof Mp4Extractor) { + checkState(mp4Extractor == null); + mp4Extractor = extractor; + } else if (extractor.getUnderlyingImplementation() instanceof FragmentedMp4Extractor) { + checkState(fragmentedMp4Extractor == null); + fragmentedMp4Extractor = extractor; + } else if (extractor.getUnderlyingImplementation() instanceof TsExtractor) { + checkState(tsExtractor == null); + tsExtractor = extractor; + } + } + assertThat(aviExtractor).isInstanceOf(SubtitleTranscodingExtractor.class); + assertThat(matroskaExtractor).isInstanceOf(SubtitleTranscodingExtractor.class); + assertThat(mp4Extractor).isInstanceOf(SubtitleTranscodingExtractor.class); + assertThat(fragmentedMp4Extractor).isInstanceOf(SubtitleTranscodingExtractor.class); + assertThat(tsExtractor).isInstanceOf(SubtitleTranscodingExtractor.class); + } + + private static List> getUnderlyingExtractorClasses( + Extractor[] extractors) { List> extractorClasses = new ArrayList<>(); for (Extractor extractor : extractors) { - extractorClasses.add(extractor.getClass()); + extractorClasses.add(extractor.getUnderlyingImplementation().getClass()); } return extractorClasses; } diff --git a/libraries/extractor/src/test/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorParameterizedTest.java b/libraries/extractor/src/test/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorParameterizedTest.java new file mode 100644 index 0000000000..430103c4d4 --- /dev/null +++ b/libraries/extractor/src/test/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorParameterizedTest.java @@ -0,0 +1,91 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.media3.extractor.text; + +import androidx.media3.extractor.Extractor; +import androidx.media3.extractor.mkv.MatroskaExtractor; +import androidx.media3.test.utils.ExtractorAsserts; +import com.google.common.collect.ImmutableList; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.ParameterizedRobolectricTestRunner; + +/** + * Parameterized tests for {@link SubtitleTranscodingExtractor}. + * + *

Non-parameterized tests are in {@link SubtitleTranscodingExtractorTest}. + */ +@RunWith(ParameterizedRobolectricTestRunner.class) +public class SubtitleTranscodingExtractorParameterizedTest { + + @ParameterizedRobolectricTestRunner.Parameters(name = "{0}") + public static ImmutableList params() { + return ExtractorAsserts.configs(); + } + + @ParameterizedRobolectricTestRunner.Parameter + public ExtractorAsserts.SimulationConfig simulationConfig; + + @Test + public void sampleWithSrtInMkv() throws Exception { + ExtractorAsserts.assertBehavior( + () -> createWrappedMatroskaExtractor(), + "media/mkv/sample_with_srt.mkv", + new ExtractorAsserts.AssertionConfig.Builder() + .setDumpFilesPrefix("extractordumps/subtitle_transcoding/srt_in_mkv") + .build(), + simulationConfig); + } + + @Test + public void sampleWithOverlappingSrtInMkv() throws Exception { + ExtractorAsserts.assertBehavior( + () -> createWrappedMatroskaExtractor(), + "media/mkv/sample_with_overlapping_srt.mkv", + new ExtractorAsserts.AssertionConfig.Builder() + .setDumpFilesPrefix("extractordumps/subtitle_transcoding/overlapping_srt_in_mkv") + .build(), + simulationConfig); + } + + @Test + public void sampleWithSsaInMkv() throws Exception { + ExtractorAsserts.assertBehavior( + () -> createWrappedMatroskaExtractor(), + "media/mkv/sample_with_ssa_subtitles.mkv", + new ExtractorAsserts.AssertionConfig.Builder() + .setDumpFilesPrefix("extractordumps/subtitle_transcoding/ssa_in_mkv") + .build(), + simulationConfig); + } + + @Test + public void sampleWithOverlappingSsaInMkv() throws Exception { + ExtractorAsserts.assertBehavior( + () -> createWrappedMatroskaExtractor(), + "media/mkv/sample_with_overlapping_ssa_subtitles.mkv", + new ExtractorAsserts.AssertionConfig.Builder() + .setDumpFilesPrefix("extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv") + .build(), + simulationConfig); + } + + private static Extractor createWrappedMatroskaExtractor() { + return new SubtitleTranscodingExtractor( + new MatroskaExtractor(), new DefaultSubtitleParserFactory()); + } +} diff --git a/libraries/extractor/src/test/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorTest.java b/libraries/extractor/src/test/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorTest.java new file mode 100644 index 0000000000..e6ddfc055a --- /dev/null +++ b/libraries/extractor/src/test/java/androidx/media3/extractor/text/SubtitleTranscodingExtractorTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.media3.extractor.text; + +import static com.google.common.truth.Truth.assertThat; + +import androidx.media3.extractor.Extractor; +import androidx.media3.extractor.mkv.MatroskaExtractor; +import androidx.test.ext.junit.runners.AndroidJUnit4; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Non-parameterized tests for {@link SubtitleTranscodingExtractor}. + * + *

Parameterized tests are in {@link SubtitleTranscodingExtractorParameterizedTest}. + */ +@RunWith(AndroidJUnit4.class) +public class SubtitleTranscodingExtractorTest { + + @Test + public void underlyingImplementationReturnsDelegate() { + Extractor matroskaExtractor = new MatroskaExtractor(); + Extractor subtitleTranscodingExtractor = + new SubtitleTranscodingExtractor(matroskaExtractor, new DefaultSubtitleParserFactory()); + + assertThat(subtitleTranscodingExtractor.getUnderlyingImplementation()) + .isSameInstanceAs(matroskaExtractor); + } +} diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.0.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.0.dump new file mode 100644 index 0000000000..900a55e35e --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.0.dump @@ -0,0 +1,290 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5679]] + getPosition(1) = [[timeUs=67000, position=5679]] + getPosition(536000) = [[timeUs=200000, position=5679]] + getPosition(1072000) = [[timeUs=200000, position=5679]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3017 + sample count = 3 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = und + sample 0: + time = 100000 + flags = 1 + data = length 1002, hash 83D96DE7 + sample 1: + time = 150000 + flags = 1 + data = length 1007, hash BFF2DCF4 + sample 2: + time = 200000 + flags = 1 + data = length 1008, hash 2B5F6191 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.1.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.1.dump new file mode 100644 index 0000000000..900a55e35e --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.1.dump @@ -0,0 +1,290 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5679]] + getPosition(1) = [[timeUs=67000, position=5679]] + getPosition(536000) = [[timeUs=200000, position=5679]] + getPosition(1072000) = [[timeUs=200000, position=5679]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3017 + sample count = 3 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = und + sample 0: + time = 100000 + flags = 1 + data = length 1002, hash 83D96DE7 + sample 1: + time = 150000 + flags = 1 + data = length 1007, hash BFF2DCF4 + sample 2: + time = 200000 + flags = 1 + data = length 1008, hash 2B5F6191 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.2.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.2.dump new file mode 100644 index 0000000000..900a55e35e --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.2.dump @@ -0,0 +1,290 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5679]] + getPosition(1) = [[timeUs=67000, position=5679]] + getPosition(536000) = [[timeUs=200000, position=5679]] + getPosition(1072000) = [[timeUs=200000, position=5679]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3017 + sample count = 3 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = und + sample 0: + time = 100000 + flags = 1 + data = length 1002, hash 83D96DE7 + sample 1: + time = 150000 + flags = 1 + data = length 1007, hash BFF2DCF4 + sample 2: + time = 200000 + flags = 1 + data = length 1008, hash 2B5F6191 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.3.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.3.dump new file mode 100644 index 0000000000..900a55e35e --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.3.dump @@ -0,0 +1,290 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5679]] + getPosition(1) = [[timeUs=67000, position=5679]] + getPosition(536000) = [[timeUs=200000, position=5679]] + getPosition(1072000) = [[timeUs=200000, position=5679]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3017 + sample count = 3 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = und + sample 0: + time = 100000 + flags = 1 + data = length 1002, hash 83D96DE7 + sample 1: + time = 150000 + flags = 1 + data = length 1007, hash BFF2DCF4 + sample 2: + time = 200000 + flags = 1 + data = length 1008, hash 2B5F6191 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.unknown_length.dump new file mode 100644 index 0000000000..900a55e35e --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_srt_in_mkv.unknown_length.dump @@ -0,0 +1,290 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5679]] + getPosition(1) = [[timeUs=67000, position=5679]] + getPosition(536000) = [[timeUs=200000, position=5679]] + getPosition(1072000) = [[timeUs=200000, position=5679]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3017 + sample count = 3 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = und + sample 0: + time = 100000 + flags = 1 + data = length 1002, hash 83D96DE7 + sample 1: + time = 150000 + flags = 1 + data = length 1007, hash BFF2DCF4 + sample 2: + time = 200000 + flags = 1 + data = length 1008, hash 2B5F6191 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.0.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.0.dump new file mode 100644 index 0000000000..81e2b277f2 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.0.dump @@ -0,0 +1,305 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5775]] + getPosition(1) = [[timeUs=67000, position=5775]] + getPosition(536000) = [[timeUs=200000, position=5775]] + getPosition(1072000) = [[timeUs=200000, position=5775]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3746 + sample count = 6 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 93, hash 48D1F6B7 + sample 0: + time = 100000 + flags = 1 + data = length 997, hash A1198858 + sample 1: + time = 330000 + flags = 1 + data = length 248, hash FD751B3 + sample 2: + time = 150000 + flags = 1 + data = length 1002, hash E686A781 + sample 3: + time = 550000 + flags = 1 + data = length 248, hash FD751B3 + sample 4: + time = 200000 + flags = 1 + data = length 1003, hash 27A316D2 + sample 5: + time = 450000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.1.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.1.dump new file mode 100644 index 0000000000..81e2b277f2 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.1.dump @@ -0,0 +1,305 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5775]] + getPosition(1) = [[timeUs=67000, position=5775]] + getPosition(536000) = [[timeUs=200000, position=5775]] + getPosition(1072000) = [[timeUs=200000, position=5775]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3746 + sample count = 6 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 93, hash 48D1F6B7 + sample 0: + time = 100000 + flags = 1 + data = length 997, hash A1198858 + sample 1: + time = 330000 + flags = 1 + data = length 248, hash FD751B3 + sample 2: + time = 150000 + flags = 1 + data = length 1002, hash E686A781 + sample 3: + time = 550000 + flags = 1 + data = length 248, hash FD751B3 + sample 4: + time = 200000 + flags = 1 + data = length 1003, hash 27A316D2 + sample 5: + time = 450000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.2.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.2.dump new file mode 100644 index 0000000000..81e2b277f2 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.2.dump @@ -0,0 +1,305 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5775]] + getPosition(1) = [[timeUs=67000, position=5775]] + getPosition(536000) = [[timeUs=200000, position=5775]] + getPosition(1072000) = [[timeUs=200000, position=5775]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3746 + sample count = 6 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 93, hash 48D1F6B7 + sample 0: + time = 100000 + flags = 1 + data = length 997, hash A1198858 + sample 1: + time = 330000 + flags = 1 + data = length 248, hash FD751B3 + sample 2: + time = 150000 + flags = 1 + data = length 1002, hash E686A781 + sample 3: + time = 550000 + flags = 1 + data = length 248, hash FD751B3 + sample 4: + time = 200000 + flags = 1 + data = length 1003, hash 27A316D2 + sample 5: + time = 450000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.3.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.3.dump new file mode 100644 index 0000000000..81e2b277f2 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.3.dump @@ -0,0 +1,305 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5775]] + getPosition(1) = [[timeUs=67000, position=5775]] + getPosition(536000) = [[timeUs=200000, position=5775]] + getPosition(1072000) = [[timeUs=200000, position=5775]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3746 + sample count = 6 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 93, hash 48D1F6B7 + sample 0: + time = 100000 + flags = 1 + data = length 997, hash A1198858 + sample 1: + time = 330000 + flags = 1 + data = length 248, hash FD751B3 + sample 2: + time = 150000 + flags = 1 + data = length 1002, hash E686A781 + sample 3: + time = 550000 + flags = 1 + data = length 248, hash FD751B3 + sample 4: + time = 200000 + flags = 1 + data = length 1003, hash 27A316D2 + sample 5: + time = 450000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.unknown_length.dump new file mode 100644 index 0000000000..81e2b277f2 --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/overlapping_ssa_in_mkv.unknown_length.dump @@ -0,0 +1,305 @@ +seekMap: + isSeekable = true + duration = 1072000 + getPosition(0) = [[timeUs=67000, position=5775]] + getPosition(1) = [[timeUs=67000, position=5775]] + getPosition(536000) = [[timeUs=200000, position=5775]] + getPosition(1072000) = [[timeUs=200000, position=5775]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 3746 + sample count = 6 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 93, hash 48D1F6B7 + sample 0: + time = 100000 + flags = 1 + data = length 997, hash A1198858 + sample 1: + time = 330000 + flags = 1 + data = length 248, hash FD751B3 + sample 2: + time = 150000 + flags = 1 + data = length 1002, hash E686A781 + sample 3: + time = 550000 + flags = 1 + data = length 248, hash FD751B3 + sample 4: + time = 200000 + flags = 1 + data = length 1003, hash 27A316D2 + sample 5: + time = 450000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.0.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.0.dump new file mode 100644 index 0000000000..aa93d1d04f --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.0.dump @@ -0,0 +1,283 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=1163]] + getPosition(1) = [[timeUs=0, position=1163]] + getPosition(617000) = [[timeUs=0, position=1163]] + getPosition(1234000) = [[timeUs=0, position=1163]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 97000 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131000 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166000 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201000 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236000 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270000 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 306000 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 376000 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410000 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445000 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480000 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 514000 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 550000 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 585000 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654000 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 690000 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724000 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759000 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 793000 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 829000 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 864000 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932000 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 968000 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002000 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037000 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 993 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = en + label = Subs Label + sample 0: + time = 0 + flags = 1 + data = length 993, hash E926FD1E +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.1.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.1.dump new file mode 100644 index 0000000000..aa93d1d04f --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.1.dump @@ -0,0 +1,283 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=1163]] + getPosition(1) = [[timeUs=0, position=1163]] + getPosition(617000) = [[timeUs=0, position=1163]] + getPosition(1234000) = [[timeUs=0, position=1163]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 97000 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131000 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166000 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201000 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236000 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270000 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 306000 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 376000 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410000 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445000 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480000 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 514000 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 550000 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 585000 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654000 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 690000 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724000 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759000 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 793000 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 829000 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 864000 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932000 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 968000 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002000 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037000 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 993 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = en + label = Subs Label + sample 0: + time = 0 + flags = 1 + data = length 993, hash E926FD1E +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.2.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.2.dump new file mode 100644 index 0000000000..aa93d1d04f --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.2.dump @@ -0,0 +1,283 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=1163]] + getPosition(1) = [[timeUs=0, position=1163]] + getPosition(617000) = [[timeUs=0, position=1163]] + getPosition(1234000) = [[timeUs=0, position=1163]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 97000 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131000 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166000 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201000 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236000 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270000 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 306000 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 376000 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410000 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445000 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480000 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 514000 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 550000 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 585000 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654000 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 690000 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724000 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759000 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 793000 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 829000 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 864000 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932000 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 968000 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002000 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037000 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 993 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = en + label = Subs Label + sample 0: + time = 0 + flags = 1 + data = length 993, hash E926FD1E +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.3.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.3.dump new file mode 100644 index 0000000000..aa93d1d04f --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.3.dump @@ -0,0 +1,283 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=1163]] + getPosition(1) = [[timeUs=0, position=1163]] + getPosition(617000) = [[timeUs=0, position=1163]] + getPosition(1234000) = [[timeUs=0, position=1163]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 97000 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131000 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166000 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201000 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236000 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270000 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 306000 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 376000 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410000 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445000 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480000 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 514000 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 550000 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 585000 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654000 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 690000 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724000 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759000 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 793000 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 829000 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 864000 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932000 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 968000 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002000 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037000 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 993 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = en + label = Subs Label + sample 0: + time = 0 + flags = 1 + data = length 993, hash E926FD1E +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.unknown_length.dump new file mode 100644 index 0000000000..aa93d1d04f --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/srt_in_mkv.unknown_length.dump @@ -0,0 +1,283 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=1163]] + getPosition(1) = [[timeUs=0, position=1163]] + getPosition(617000) = [[timeUs=0, position=1163]] + getPosition(1234000) = [[timeUs=0, position=1163]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 97000 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131000 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166000 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201000 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236000 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270000 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 306000 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 376000 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410000 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445000 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480000 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 514000 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 550000 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 585000 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654000 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 690000 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724000 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759000 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 793000 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 829000 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 864000 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932000 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 968000 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002000 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037000 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 993 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = application/x-subrip + selectionFlags = 1 + language = en + label = Subs Label + sample 0: + time = 0 + flags = 1 + data = length 993, hash E926FD1E +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.0.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.0.dump new file mode 100644 index 0000000000..3f55dc346c --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.0.dump @@ -0,0 +1,289 @@ +seekMap: + isSeekable = true + duration = 1139000 + getPosition(0) = [[timeUs=0, position=6106]] + getPosition(1) = [[timeUs=0, position=6106], [timeUs=67000, position=6106]] + getPosition(569500) = [[timeUs=67000, position=6106]] + getPosition(1139000) = [[timeUs=67000, position=6106]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 1528 + sample count = 2 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 470, hash 40E7D996 + sample 0: + time = 0 + flags = 1 + data = length 1280, hash EEF152A1 + sample 1: + time = 500000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.1.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.1.dump new file mode 100644 index 0000000000..3f55dc346c --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.1.dump @@ -0,0 +1,289 @@ +seekMap: + isSeekable = true + duration = 1139000 + getPosition(0) = [[timeUs=0, position=6106]] + getPosition(1) = [[timeUs=0, position=6106], [timeUs=67000, position=6106]] + getPosition(569500) = [[timeUs=67000, position=6106]] + getPosition(1139000) = [[timeUs=67000, position=6106]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 1528 + sample count = 2 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 470, hash 40E7D996 + sample 0: + time = 0 + flags = 1 + data = length 1280, hash EEF152A1 + sample 1: + time = 500000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.2.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.2.dump new file mode 100644 index 0000000000..3f55dc346c --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.2.dump @@ -0,0 +1,289 @@ +seekMap: + isSeekable = true + duration = 1139000 + getPosition(0) = [[timeUs=0, position=6106]] + getPosition(1) = [[timeUs=0, position=6106], [timeUs=67000, position=6106]] + getPosition(569500) = [[timeUs=67000, position=6106]] + getPosition(1139000) = [[timeUs=67000, position=6106]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 1528 + sample count = 2 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 470, hash 40E7D996 + sample 0: + time = 0 + flags = 1 + data = length 1280, hash EEF152A1 + sample 1: + time = 500000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.3.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.3.dump new file mode 100644 index 0000000000..3f55dc346c --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.3.dump @@ -0,0 +1,289 @@ +seekMap: + isSeekable = true + duration = 1139000 + getPosition(0) = [[timeUs=0, position=6106]] + getPosition(1) = [[timeUs=0, position=6106], [timeUs=67000, position=6106]] + getPosition(569500) = [[timeUs=67000, position=6106]] + getPosition(1139000) = [[timeUs=67000, position=6106]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 1528 + sample count = 2 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 470, hash 40E7D996 + sample 0: + time = 0 + flags = 1 + data = length 1280, hash EEF152A1 + sample 1: + time = 500000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.unknown_length.dump new file mode 100644 index 0000000000..3f55dc346c --- /dev/null +++ b/libraries/test_data/src/test/assets/extractordumps/subtitle_transcoding/ssa_in_mkv.unknown_length.dump @@ -0,0 +1,289 @@ +seekMap: + isSeekable = true + duration = 1139000 + getPosition(0) = [[timeUs=0, position=6106]] + getPosition(1) = [[timeUs=0, position=6106], [timeUs=67000, position=6106]] + getPosition(569500) = [[timeUs=67000, position=6106]] + getPosition(1139000) = [[timeUs=67000, position=6106]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 163829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 198659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 233489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 268319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 337979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 372809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 442829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 477659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 616979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 651809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 895979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 999829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1034659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1069489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 1528 + sample count = 2 + format 0: + id = 3 + sampleMimeType = text/x-exoplayer-cues + codecs = text/x-ssa + selectionFlags = 1 + language = und + initializationData: + data = length 90, hash A5E21974 + data = length 470, hash 40E7D996 + sample 0: + time = 0 + flags = 1 + data = length 1280, hash EEF152A1 + sample 1: + time = 500000 + flags = 1 + data = length 248, hash FD751B3 +tracksEnded = true diff --git a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_srt.mkv.dump b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_srt.mkv.dump index 4ef153f9bd..1af6717df6 100644 --- a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_srt.mkv.dump +++ b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_srt.mkv.dump @@ -522,3 +522,11 @@ AudioSink: buffer #28: time = 1000001037000 data = 1 +TextOutput: + Subtitle[0]: + presentationTimeUs = 0 + Cues = [] + Subtitle[1]: + presentationTimeUs = 0 + Cue[0]: + text = This is the first diff --git a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_ssa_subtitles.mkv.dump b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_ssa_subtitles.mkv.dump index 180c71315f..92eb5c5061 100644 --- a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_ssa_subtitles.mkv.dump +++ b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_ssa_subtitles.mkv.dump @@ -522,3 +522,20 @@ AudioSink: buffer #28: time = 1000001104319 data = 1 +TextOutput: + Subtitle[0]: + presentationTimeUs = 0 + Cues = [] + Subtitle[1]: + presentationTimeUs = 0 + Cue[0]: + text = This is the first + textAlignment = ALIGN_CENTER + line = 0.95 + lineType = 0 + lineAnchor = 2 + position = 0.5 + positionAnchor = 1 + Subtitle[2]: + presentationTimeUs = 500000 + Cues = [] diff --git a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_srt.mkv.dump b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_srt.mkv.dump index 180c71315f..96f68da9c6 100644 --- a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_srt.mkv.dump +++ b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_srt.mkv.dump @@ -522,3 +522,22 @@ AudioSink: buffer #28: time = 1000001104319 data = 1 +TextOutput: + Subtitle[0]: + presentationTimeUs = 0 + Cues = [] + Subtitle[1]: + presentationTimeUs = 100000 + Cue[0]: + text = First subtitle - end overlaps second + Subtitle[2]: + presentationTimeUs = 150000 + Cue[0]: + text = Third subtitle - fully encompasses second + Subtitle[3]: + presentationTimeUs = 200000 + Cue[0]: + text = Second subtitle - beginning overlaps first + Subtitle[4]: + presentationTimeUs = 450000 + Cues = [] diff --git a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_ssa_subtitles.mkv.dump b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_ssa_subtitles.mkv.dump index 180c71315f..234a3d17e8 100644 --- a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_ssa_subtitles.mkv.dump +++ b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_overlapping_ssa_subtitles.mkv.dump @@ -522,3 +522,29 @@ AudioSink: buffer #28: time = 1000001104319 data = 1 +TextOutput: + Subtitle[0]: + presentationTimeUs = 0 + Cues = [] + Subtitle[1]: + presentationTimeUs = 100000 + Cue[0]: + text = First subtitle - end overlaps second + lineType = 0 + Subtitle[2]: + presentationTimeUs = 330000 + Cues = [] + Subtitle[3]: + presentationTimeUs = 150000 + Cue[0]: + text = Third subtitle - fully encompasses second + lineType = 0 + Subtitle[4]: + presentationTimeUs = 550000 + Cues = [] + Subtitle[5]: + presentationTimeUs = 450000 + Cues = [] + Subtitle[6]: + presentationTimeUs = 450000 + Cues = [] diff --git a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_srt.mkv.dump b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_srt.mkv.dump index 4ef153f9bd..e9d9d2c908 100644 --- a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_srt.mkv.dump +++ b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_srt.mkv.dump @@ -522,3 +522,11 @@ AudioSink: buffer #28: time = 1000001037000 data = 1 +TextOutput: + Subtitle[0]: + presentationTimeUs = 0 + Cues = [] + Subtitle[1]: + presentationTimeUs = 0 + Cue[0]: + text = This is the first subtitle. diff --git a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_ssa_subtitles.mkv.dump b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_ssa_subtitles.mkv.dump index 180c71315f..b2d082c31e 100644 --- a/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_ssa_subtitles.mkv.dump +++ b/libraries/test_data/src/test/assets/playbackdumps/mkv/sample_with_ssa_subtitles.mkv.dump @@ -522,3 +522,20 @@ AudioSink: buffer #28: time = 1000001104319 data = 1 +TextOutput: + Subtitle[0]: + presentationTimeUs = 0 + Cues = [] + Subtitle[1]: + presentationTimeUs = 0 + Cue[0]: + text = This is the first subtitle. + textAlignment = ALIGN_CENTER + line = 0.95 + lineType = 0 + lineAnchor = 2 + position = 0.5 + positionAnchor = 1 + Subtitle[2]: + presentationTimeUs = 500000 + Cues = []