Commit 55f2d1a5 by kimvde Committed by Rohit Singh

Make onOutputFormat nullable

- This is to make sure we know about all the tracks before initializing
the SamplePipelines. This allows to set the muxer and the fallback
listener track count before the SamplePipelines are built.
- As a result, the test files had to be updated because the order in
which the tracks are written has changed.
- The ImageAssetLoader also had to be updated to call onOutputFormat
repeatedly until it returns a non-null SampleConsumer.
- Also fix the trackCount sent to the muxer and fallback listener. The
correct track count can be computed now that we know about all the
tracks before building the SamplePipelines.

PiperOrigin-RevId: 514426123
parent 67e359c8
......@@ -21,6 +21,7 @@ import static java.lang.annotation.ElementType.TYPE_USE;
import android.os.Looper;
import androidx.annotation.IntDef;
import androidx.annotation.IntRange;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.Format;
import com.google.common.collect.ImmutableMap;
import java.lang.annotation.Documented;
......@@ -112,17 +113,21 @@ public interface AssetLoader {
* Called when the {@link Format} of samples that will be output by the {@link AssetLoader} is
* known.
*
* <p>Must be called once per {@linkplain #onTrackCount declared} track, and only after that
* track has been {@link #onTrackAdded added}.
* <p>Must be called after the corresponding track has been {@link #onTrackAdded added}.
*
* <p>For each {@link #onTrackAdded added} track, this method must be called regularly until the
* returned {@link SampleConsumer} is non-null.
*
* <p>Must be called from the thread that will be used to call the returned {@link
* SampleConsumer}'s methods. This thread must be the same for all formats output, and is
* generally different from the one used to access the {@link AssetLoader} methods.
*
* @param format The {@link Format} of samples that will be output.
* @return The {@link SampleConsumer} of samples of the given {@link Format}.
* @return The {@link SampleConsumer} of samples of the given {@link Format}, or {@code null} if
* it could not be retrieved yet.
* @throws ExportException If an error occurs configuring the {@link SampleConsumer}.
*/
@Nullable
SampleConsumer onOutputFormat(Format format) throws ExportException;
/**
......
......@@ -235,25 +235,31 @@ import java.util.concurrent.atomic.AtomicInteger;
return decodeOutput;
}
@Nullable
@Override
public SampleConsumer onOutputFormat(Format format) throws ExportException {
@C.TrackType int trackType = getProcessedTrackType(format.sampleMimeType);
SampleConsumer sampleConsumer;
if (currentMediaItemIndex.get() == 0) {
sampleConsumer =
new SampleConsumerWrapper(compositeAssetLoaderListener.onOutputFormat(format));
@Nullable
SampleConsumer wrappedSampleConsumer = compositeAssetLoaderListener.onOutputFormat(format);
if (wrappedSampleConsumer == null) {
return null;
}
sampleConsumer = new SampleConsumerWrapper(wrappedSampleConsumer);
sampleConsumersByTrackType.put(trackType, sampleConsumer);
if (forceAudioTrack && nonEndedTracks.get() == 1 && trackType == C.TRACK_TYPE_VIDEO) {
sampleConsumersByTrackType.put(
C.TRACK_TYPE_AUDIO,
new SampleConsumerWrapper(
SampleConsumer wrappedAudioSampleConsumer =
checkStateNotNull(
compositeAssetLoaderListener.onOutputFormat(
FORCE_AUDIO_TRACK_FORMAT
.buildUpon()
.setSampleMimeType(MimeTypes.AUDIO_RAW)
.setPcmEncoding(C.ENCODING_PCM_16BIT)
.build())));
.build()));
sampleConsumersByTrackType.put(
C.TRACK_TYPE_AUDIO, new SampleConsumerWrapper(wrappedAudioSampleConsumer));
}
} else {
// TODO(b/270533049): Remove the check below when implementing blank video frames generation.
......
......@@ -46,6 +46,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
protected @MonotonicNonNull Codec decoder;
protected boolean isEnded;
private @MonotonicNonNull Format inputFormat;
private @MonotonicNonNull Format outputFormat;
private final TransformerMediaClock mediaClock;
private final AssetLoader.Listener assetLoaderListener;
......@@ -244,19 +245,26 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
return true;
}
if (outputFormat == null) {
if (decoder != null
&& getProcessedTrackType(inputFormat.sampleMimeType) == C.TRACK_TYPE_AUDIO) {
@Nullable Format decoderOutputFormat = decoder.getOutputFormat();
if (decoderOutputFormat == null) {
return false;
}
sampleConsumer = assetLoaderListener.onOutputFormat(decoderOutputFormat);
outputFormat = decoderOutputFormat;
} else {
// TODO(b/237674316): Move surface creation out of video sampleConsumer. Init decoder and get
// decoderOutput Format before init sampleConsumer.
sampleConsumer = assetLoaderListener.onOutputFormat(inputFormat);
// TODO(b/237674316): Move surface creation out of video sampleConsumer. Init decoder and
// get decoderOutput Format before init sampleConsumer.
outputFormat = inputFormat;
}
}
SampleConsumer sampleConsumer = assetLoaderListener.onOutputFormat(outputFormat);
if (sampleConsumer == null) {
return false;
}
this.sampleConsumer = sampleConsumer;
return true;
}
......
......@@ -22,14 +22,18 @@ import static com.google.android.exoplayer2.transformer.Transformer.PROGRESS_STA
import static com.google.android.exoplayer2.transformer.Transformer.PROGRESS_STATE_NOT_STARTED;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Assertions.checkState;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Looper;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSourceBitmapLoader;
import com.google.android.exoplayer2.upstream.DefaultDataSource;
import com.google.android.exoplayer2.util.BitmapLoader;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.common.collect.ImmutableMap;
......@@ -37,6 +41,8 @@ import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
/** An {@link AssetLoader} implementation that loads images into {@link Bitmap} instances. */
public final class ImageAssetLoader implements AssetLoader {
......@@ -59,26 +65,36 @@ public final class ImageAssetLoader implements AssetLoader {
public static final String MIME_TYPE_IMAGE_ALL = MimeTypes.BASE_TYPE_IMAGE + "/*";
private final Context context;
private static final int QUEUE_BITMAP_INTERVAL_MS = 10;
private final EditedMediaItem editedMediaItem;
private final DataSource.Factory dataSourceFactory;
private final Listener listener;
private final ScheduledExecutorService scheduledExecutorService;
private @Transformer.ProgressState int progressState;
private int progress;
private volatile int progress;
private ImageAssetLoader(Context context, EditedMediaItem editedMediaItem, Listener listener) {
this.context = context;
checkState(editedMediaItem.durationUs != C.TIME_UNSET);
checkState(editedMediaItem.frameRate != C.RATE_UNSET_INT);
this.editedMediaItem = editedMediaItem;
dataSourceFactory = new DefaultDataSource.Factory(context);
this.listener = listener;
scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
progressState = PROGRESS_STATE_NOT_STARTED;
}
@Override
@SuppressWarnings("FutureReturnValueIgnored")
public void start() {
progressState = PROGRESS_STATE_AVAILABLE;
listener.onDurationUs(editedMediaItem.durationUs);
listener.onTrackCount(1);
BitmapLoader bitmapLoader = new DataSourceBitmapLoader(context);
BitmapLoader bitmapLoader =
new DataSourceBitmapLoader(
MoreExecutors.listeningDecorator(scheduledExecutorService), dataSourceFactory);
MediaItem.LocalConfiguration localConfiguration =
checkNotNull(editedMediaItem.mediaItem.localConfiguration);
ListenableFuture<Bitmap> future = bitmapLoader.loadBitmap(localConfiguration.uri);
......@@ -100,21 +116,10 @@ public final class ImageAssetLoader implements AssetLoader {
SUPPORTED_OUTPUT_TYPE_DECODED,
/* streamStartPositionUs= */ 0,
/* streamOffsetUs= */ 0);
SampleConsumer sampleConsumer = listener.onOutputFormat(format);
checkState(editedMediaItem.durationUs != C.TIME_UNSET);
checkState(editedMediaItem.frameRate != C.RATE_UNSET_INT);
// TODO(b/262693274): consider using listener.onDurationUs() or the MediaItem change
// callback (when it's added) rather than setting duration here.
sampleConsumer.queueInputBitmap(
bitmap, editedMediaItem.durationUs, editedMediaItem.frameRate);
sampleConsumer.signalEndOfVideoInput();
} catch (ExportException e) {
listener.onError(e);
scheduledExecutorService.submit(() -> queueBitmapInternal(bitmap, format));
} catch (RuntimeException e) {
listener.onError(ExportException.createForAssetLoader(e, ERROR_CODE_UNSPECIFIED));
}
progress = 100;
}
@Override
......@@ -122,7 +127,7 @@ public final class ImageAssetLoader implements AssetLoader {
listener.onError(ExportException.createForAssetLoader(t, ERROR_CODE_IO_UNSPECIFIED));
}
},
MoreExecutors.directExecutor());
scheduledExecutorService);
}
@Override
......@@ -141,5 +146,28 @@ public final class ImageAssetLoader implements AssetLoader {
@Override
public void release() {
progressState = PROGRESS_STATE_NOT_STARTED;
scheduledExecutorService.shutdownNow();
}
@SuppressWarnings("FutureReturnValueIgnored")
private void queueBitmapInternal(Bitmap bitmap, Format format) {
try {
@Nullable SampleConsumer sampleConsumer = listener.onOutputFormat(format);
if (sampleConsumer == null) {
scheduledExecutorService.schedule(
() -> queueBitmapInternal(bitmap, format), QUEUE_BITMAP_INTERVAL_MS, MILLISECONDS);
return;
}
// TODO(b/262693274): consider using listener.onDurationUs() or the MediaItem change
// callback rather than setting duration here.
sampleConsumer.queueInputBitmap(
bitmap, editedMediaItem.durationUs, editedMediaItem.frameRate);
sampleConsumer.signalEndOfVideoInput();
progress = 100;
} catch (ExportException e) {
listener.onError(e);
} catch (RuntimeException e) {
listener.onError(ExportException.createForAssetLoader(e, ERROR_CODE_UNSPECIFIED));
}
}
}
......@@ -54,6 +54,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
......@@ -99,8 +100,10 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
private final HandlerThread internalHandlerThread;
private final HandlerWrapper internalHandler;
private final List<CompositeAssetLoader> compositeAssetLoaders;
private final AtomicInteger totalInputTrackCount;
private final AtomicInteger unreportedInputTrackCounts;
private final AtomicInteger trackCountsToReport;
private final AtomicInteger tracksToAdd;
private final AtomicBoolean outputHasAudio;
private final AtomicBoolean outputHasVideo;
private final List<SamplePipeline> samplePipelines;
private final MuxerWrapper muxerWrapper;
private final ConditionVariable transformerConditionVariable;
......@@ -153,8 +156,10 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
compositeAssetLoaderListener,
clock));
}
totalInputTrackCount = new AtomicInteger();
unreportedInputTrackCounts = new AtomicInteger(composition.sequences.size());
trackCountsToReport = new AtomicInteger(composition.sequences.size());
tracksToAdd = new AtomicInteger();
outputHasAudio = new AtomicBoolean();
outputHasVideo = new AtomicBoolean();
samplePipelines = new ArrayList<>();
transformerConditionVariable = new ConditionVariable();
exportResultBuilder = new ExportResult.Builder();
......@@ -435,12 +440,8 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
ERROR_CODE_FAILED_RUNTIME_CHECK));
return;
}
totalInputTrackCount.addAndGet(trackCount);
unreportedInputTrackCounts.decrementAndGet();
if (unreportedInputTrackCounts.get() == 0) {
muxerWrapper.setTrackCount(totalInputTrackCount.get());
fallbackListener.setTrackCount(totalInputTrackCount.get());
}
trackCountsToReport.decrementAndGet();
tracksToAdd.addAndGet(trackCount);
}
@Override
......@@ -449,21 +450,38 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
@AssetLoader.SupportedOutputTypes int supportedOutputTypes,
long streamStartPositionUs,
long streamOffsetUs) {
@C.TrackType
int trackType = getProcessedTrackType(firstAssetLoaderInputFormat.sampleMimeType);
AddedTrackInfo trackInfo =
new AddedTrackInfo(
firstAssetLoaderInputFormat,
supportedOutputTypes,
streamStartPositionUs,
streamOffsetUs);
addedTrackInfoByTrackType.put(trackType, trackInfo);
addedTrackInfoByTrackType.put(
getProcessedTrackType(firstAssetLoaderInputFormat.sampleMimeType), trackInfo);
if (trackType == C.TRACK_TYPE_AUDIO) {
outputHasAudio.set(true);
} else {
outputHasVideo.set(true);
}
if (trackCountsToReport.get() == 0 && tracksToAdd.get() == 1) {
int outputTrackCount = (outputHasAudio.get() ? 1 : 0) + (outputHasVideo.get() ? 1 : 0);
muxerWrapper.setTrackCount(outputTrackCount);
fallbackListener.setTrackCount(outputTrackCount);
}
tracksToAdd.decrementAndGet();
return trackInfo.shouldTranscode;
}
@Nullable
@Override
public SampleConsumer onOutputFormat(Format assetLoaderOutputFormat) throws ExportException {
if (trackCountsToReport.get() > 0 || tracksToAdd.get() > 0) {
return null;
}
@C.TrackType int trackType = getProcessedTrackType(assetLoaderOutputFormat.sampleMimeType);
AddedTrackInfo trackInfo = checkStateNotNull(addedTrackInfoByTrackType.get(trackType));
SamplePipeline samplePipeline = getSamplePipeline(assetLoaderOutputFormat, trackInfo);
......
format 0:
sampleMimeType = audio/mp4a-latm
channelCount = 1
sampleRate = 44100
pcmEncoding = 2
format 1:
id = 1
sampleMimeType = video/avc
codecs = avc1.640034
......@@ -14,356 +9,361 @@ format 1:
initializationData:
data = length 30, hash F6F3D010
data = length 10, hash 7A0D0F2B
format 1:
sampleMimeType = audio/mp4a-latm
channelCount = 1
sampleRate = 44100
pcmEncoding = 2
sample:
trackIndex = 1
dataHashCode = -252482306
size = 36477
isKeyFrame = true
presentationTimeUs = 0
sample:
trackIndex = 1
dataHashCode = 67864034
size = 5341
isKeyFrame = false
presentationTimeUs = 67000
sample:
trackIndex = 1
dataHashCode = 897273234
size = 596
isKeyFrame = false
presentationTimeUs = 33000
sample:
trackIndex = 1
dataHashCode = -1549870586
size = 7704
isKeyFrame = false
presentationTimeUs = 200000
sample:
trackIndex = 1
dataHashCode = 672384813
size = 989
isKeyFrame = false
presentationTimeUs = 133000
sample:
trackIndex = 1
dataHashCode = -988996493
size = 721
isKeyFrame = false
presentationTimeUs = 100000
sample:
trackIndex = 1
dataHashCode = 1711151377
size = 519
isKeyFrame = false
presentationTimeUs = 167000
sample:
trackIndex = 1
dataHashCode = -506806036
size = 6160
isKeyFrame = false
presentationTimeUs = 333000
sample:
trackIndex = 1
dataHashCode = 1902167649
size = 953
isKeyFrame = false
presentationTimeUs = 267000
sample:
trackIndex = 1
dataHashCode = 2054873212
size = 620
isKeyFrame = false
presentationTimeUs = 233000
sample:
trackIndex = 0
dataHashCode = 555688582
size = 416
isKeyFrame = true
presentationTimeUs = 0
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 2000837254
size = 418
isKeyFrame = true
presentationTimeUs = 4717
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1593942879
size = 418
isKeyFrame = true
presentationTimeUs = 9456
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 587837542
size = 418
isKeyFrame = true
presentationTimeUs = 14196
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1836423877
size = 418
isKeyFrame = true
presentationTimeUs = 18935
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 874705099
size = 418
isKeyFrame = true
presentationTimeUs = 23674
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -269206181
size = 418
isKeyFrame = true
presentationTimeUs = 28413
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -58682425
size = 418
isKeyFrame = true
presentationTimeUs = 33152
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -859796970
size = 418
isKeyFrame = true
presentationTimeUs = 37892
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 711911523
size = 418
isKeyFrame = true
presentationTimeUs = 42631
sample:
trackIndex = 0
dataHashCode = -252482306
size = 36477
isKeyFrame = true
presentationTimeUs = 0
sample:
trackIndex = 0
dataHashCode = 67864034
size = 5341
isKeyFrame = false
presentationTimeUs = 67000
sample:
trackIndex = 0
dataHashCode = 897273234
size = 596
isKeyFrame = false
presentationTimeUs = 33000
sample:
trackIndex = 0
dataHashCode = -1549870586
size = 7704
isKeyFrame = false
presentationTimeUs = 200000
sample:
trackIndex = 0
dataHashCode = 672384813
size = 989
isKeyFrame = false
presentationTimeUs = 133000
sample:
trackIndex = 0
dataHashCode = -988996493
size = 721
isKeyFrame = false
presentationTimeUs = 100000
sample:
trackIndex = 0
dataHashCode = 1711151377
size = 519
isKeyFrame = false
presentationTimeUs = 167000
sample:
trackIndex = 0
dataHashCode = -506806036
size = 6160
isKeyFrame = false
presentationTimeUs = 333000
sample:
trackIndex = 0
dataHashCode = 1902167649
size = 953
isKeyFrame = false
presentationTimeUs = 267000
sample:
trackIndex = 0
dataHashCode = 2054873212
size = 620
isKeyFrame = false
presentationTimeUs = 233000
sample:
trackIndex = 1
dataHashCode = -694513071
size = 418
isKeyFrame = true
presentationTimeUs = 47370
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1124371059
size = 418
isKeyFrame = true
presentationTimeUs = 52109
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 297166745
size = 418
isKeyFrame = true
presentationTimeUs = 56849
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -937110638
size = 418
isKeyFrame = true
presentationTimeUs = 61588
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1050158990
size = 418
isKeyFrame = true
presentationTimeUs = 66327
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1109510229
size = 418
isKeyFrame = true
presentationTimeUs = 71066
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1297086772
size = 418
isKeyFrame = true
presentationTimeUs = 75805
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1739939803
size = 418
isKeyFrame = true
presentationTimeUs = 80545
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1149727930
size = 418
isKeyFrame = true
presentationTimeUs = 85284
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1627652713
size = 418
isKeyFrame = true
presentationTimeUs = 90023
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1556608231
size = 405
isKeyFrame = false
presentationTimeUs = 300000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1648978019
size = 4852
isKeyFrame = false
presentationTimeUs = 433000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -484808327
size = 547
isKeyFrame = false
presentationTimeUs = 400000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -20706048
size = 570
isKeyFrame = false
presentationTimeUs = 367000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 2085064574
size = 5525
isKeyFrame = false
presentationTimeUs = 567000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -637074022
size = 1082
isKeyFrame = false
presentationTimeUs = 500000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1824027029
size = 807
isKeyFrame = false
presentationTimeUs = 467000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1701945306
size = 744
isKeyFrame = false
presentationTimeUs = 533000
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -551926260
size = 418
isKeyFrame = true
presentationTimeUs = 94762
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 45987178
size = 418
isKeyFrame = true
presentationTimeUs = 99502
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -903675808
size = 418
isKeyFrame = true
presentationTimeUs = 104241
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -755916991
size = 418
isKeyFrame = true
presentationTimeUs = 108980
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1355207303
size = 418
isKeyFrame = true
presentationTimeUs = 113719
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -975703389
size = 418
isKeyFrame = true
presentationTimeUs = 118459
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1933194670
size = 418
isKeyFrame = true
presentationTimeUs = 123198
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -565778989
size = 418
isKeyFrame = true
presentationTimeUs = 127937
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1454083383
size = 418
isKeyFrame = true
presentationTimeUs = 132676
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -952425536
size = 4732
isKeyFrame = false
presentationTimeUs = 700000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1978031576
size = 1004
isKeyFrame = false
presentationTimeUs = 633000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -2128215508
size = 794
isKeyFrame = false
presentationTimeUs = 600000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -259850011
size = 645
isKeyFrame = false
presentationTimeUs = 667000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1920983928
size = 2684
isKeyFrame = false
presentationTimeUs = 833000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1100642337
size = 787
isKeyFrame = false
presentationTimeUs = 767000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1544917830
size = 649
isKeyFrame = false
presentationTimeUs = 733000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -116205995
size = 509
isKeyFrame = false
presentationTimeUs = 800000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 696343585
size = 1226
isKeyFrame = false
presentationTimeUs = 967000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -644371190
size = 898
isKeyFrame = false
presentationTimeUs = 900000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1606273467
size = 476
isKeyFrame = false
presentationTimeUs = 867000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -571265861
size = 486
isKeyFrame = false
......
format 0:
sampleMimeType = audio/mp4a-latm
channelCount = 2
sampleRate = 12000
pcmEncoding = 2
format 1:
id = 2
sampleMimeType = video/avc
codecs = avc1.64000D
......@@ -15,332 +10,337 @@ format 1:
initializationData:
data = length 33, hash D3FB879D
data = length 10, hash 7A0D0F2B
format 1:
sampleMimeType = audio/mp4a-latm
channelCount = 2
sampleRate = 12000
pcmEncoding = 2
sample:
trackIndex = 1
dataHashCode = -212376212
size = 20
isKeyFrame = true
presentationTimeUs = 0
sample:
trackIndex = 1
dataHashCode = -1948569090
size = 72
isKeyFrame = true
presentationTimeUs = 417
sample:
trackIndex = 1
dataHashCode = -1316750072
size = 84
isKeyFrame = true
presentationTimeUs = 1917
sample:
trackIndex = 1
dataHashCode = 1016428949
size = 88
isKeyFrame = true
presentationTimeUs = 3667
sample:
trackIndex = 1
dataHashCode = -1127325245
size = 96
isKeyFrame = true
presentationTimeUs = 5500
sample:
trackIndex = 1
dataHashCode = 1148147726
size = 92
isKeyFrame = true
presentationTimeUs = 7500
sample:
trackIndex = 0
dataHashCode = 1949079733
size = 5446
isKeyFrame = true
presentationTimeUs = 0
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1397194508
size = 125
isKeyFrame = false
presentationTimeUs = 14000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1147159698
size = 147
isKeyFrame = false
presentationTimeUs = 47333
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 524634358
size = 149
isKeyFrame = false
presentationTimeUs = 80667
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 2031178347
size = 149
isKeyFrame = false
presentationTimeUs = 114000
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -625462168
size = 169
isKeyFrame = false
presentationTimeUs = 147333
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -973299745
size = 126
isKeyFrame = false
presentationTimeUs = 180667
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -788426325
size = 120
isKeyFrame = false
presentationTimeUs = 228042
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 2009515523
size = 126
isKeyFrame = false
presentationTimeUs = 244708
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -874600600
size = 1180
isKeyFrame = false
presentationTimeUs = 334083
sample:
trackIndex = 0
dataHashCode = -212376212
size = 20
isKeyFrame = true
presentationTimeUs = 0
sample:
trackIndex = 0
dataHashCode = -1948569090
size = 72
isKeyFrame = true
presentationTimeUs = 417
sample:
trackIndex = 0
dataHashCode = -1316750072
size = 84
isKeyFrame = true
presentationTimeUs = 1917
sample:
trackIndex = 0
dataHashCode = 1016428949
size = 88
isKeyFrame = true
presentationTimeUs = 3667
sample:
trackIndex = 0
dataHashCode = -1127325245
size = 96
isKeyFrame = true
presentationTimeUs = 5500
sample:
trackIndex = 0
dataHashCode = 1148147726
size = 92
isKeyFrame = true
presentationTimeUs = 7500
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -2125685540
size = 76
isKeyFrame = true
presentationTimeUs = 9417
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 473329679
size = 24
isKeyFrame = true
presentationTimeUs = 11000
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 240990900
size = 176
isKeyFrame = true
presentationTimeUs = 11500
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 777637182
size = 196
isKeyFrame = true
presentationTimeUs = 15167
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1872106264
size = 180
isKeyFrame = true
presentationTimeUs = 19250
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1520711499
size = 140
isKeyFrame = true
presentationTimeUs = 23000
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1580199067
size = 232
isKeyFrame = true
presentationTimeUs = 25917
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 475464086
size = 184
isKeyFrame = true
presentationTimeUs = 30750
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -211754132
size = 172
isKeyFrame = true
presentationTimeUs = 34584
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1236547164
size = 172
isKeyFrame = true
presentationTimeUs = 38167
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -2064216186
size = 188
isKeyFrame = true
presentationTimeUs = 41750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 984869991
size = 216
isKeyFrame = false
presentationTimeUs = 267416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 2106811176
size = 119
isKeyFrame = false
presentationTimeUs = 234083
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1981166365
size = 145
isKeyFrame = false
presentationTimeUs = 300750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1234592714
size = 1274
isKeyFrame = false
presentationTimeUs = 467416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -13135608
size = 190
isKeyFrame = false
presentationTimeUs = 400750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1840621658
size = 107
isKeyFrame = false
presentationTimeUs = 367416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1637734271
size = 125
isKeyFrame = false
presentationTimeUs = 434083
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -682950885
size = 260
isKeyFrame = true
presentationTimeUs = 45667
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1301206627
size = 236
isKeyFrame = true
presentationTimeUs = 51084
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 256580525
size = 236
isKeyFrame = true
presentationTimeUs = 56000
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1086601304
size = 236
isKeyFrame = true
presentationTimeUs = 60917
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -2046131588
size = 224
isKeyFrame = true
presentationTimeUs = 65834
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 1550955865
size = 224
isKeyFrame = true
presentationTimeUs = 70500
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -274800552
size = 220
isKeyFrame = true
presentationTimeUs = 75167
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = 382420909
size = 224
isKeyFrame = true
presentationTimeUs = 79750
sample:
trackIndex = 0
trackIndex = 1
dataHashCode = -1431575865
size = 232
isKeyFrame = true
presentationTimeUs = 84417
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 2112365658
size = 1109
isKeyFrame = false
presentationTimeUs = 600750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -968901399
size = 250
isKeyFrame = false
presentationTimeUs = 534083
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1184738023
size = 124
isKeyFrame = false
presentationTimeUs = 500750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1756300509
size = 134
isKeyFrame = false
presentationTimeUs = 567416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 823429273
size = 1201
isKeyFrame = false
presentationTimeUs = 734083
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 651718599
size = 213
isKeyFrame = false
presentationTimeUs = 667416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 846349953
size = 125
isKeyFrame = false
presentationTimeUs = 634083
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = 1331153462
size = 114
isKeyFrame = false
presentationTimeUs = 700750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -73358172
size = 1010
isKeyFrame = false
presentationTimeUs = 867416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1395269253
size = 209
isKeyFrame = false
presentationTimeUs = 800750
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -1001367604
size = 139
isKeyFrame = false
presentationTimeUs = 767416
sample:
trackIndex = 1
trackIndex = 0
dataHashCode = -122569918
size = 138
isKeyFrame = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment