Commit acfea392 by kimvde Committed by microkatz

Fix bug where streamOffsetUs is passed instead of streamPositionUs

Also make order of streamStartPositionUs and streamOffsetUs consistent

PiperOrigin-RevId: 487511633
parent 4949fbe5
......@@ -55,8 +55,8 @@ import org.checkerframework.dataflow.qual.Pure;
public AudioTranscodingSamplePipeline(
Format inputFormat,
long streamOffsetUs,
long streamStartPositionUs,
long streamOffsetUs,
TransformationRequest transformationRequest,
Codec.DecoderFactory decoderFactory,
Codec.EncoderFactory encoderFactory,
......@@ -65,8 +65,8 @@ import org.checkerframework.dataflow.qual.Pure;
throws TransformationException {
super(
inputFormat,
streamOffsetUs,
streamStartPositionUs,
streamOffsetUs,
transformationRequest.flattenForSlowMotion,
muxerWrapper);
......
......@@ -30,8 +30,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
/* package */ abstract class BaseSamplePipeline implements SamplePipeline {
private final long streamOffsetUs;
private final long streamStartPositionUs;
private final long streamOffsetUs;
private final MuxerWrapper muxerWrapper;
private final @C.TrackType int trackType;
private final @MonotonicNonNull SefSlowMotionFlattener sefVideoSlowMotionFlattener;
......@@ -42,12 +42,12 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
public BaseSamplePipeline(
Format inputFormat,
long streamOffsetUs,
long streamStartPositionUs,
long streamOffsetUs,
boolean flattenForSlowMotion,
MuxerWrapper muxerWrapper) {
this.streamOffsetUs = streamOffsetUs;
this.streamStartPositionUs = streamStartPositionUs;
this.streamOffsetUs = streamOffsetUs;
this.muxerWrapper = muxerWrapper;
trackType = MimeTypes.getTrackType(inputFormat.sampleMimeType);
sefVideoSlowMotionFlattener =
......
......@@ -44,8 +44,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private final DecoderInputBuffer decoderInputBuffer;
private boolean isTransformationRunning;
private long streamOffsetUs;
private long streamStartPositionUs;
private long streamOffsetUs;
private @MonotonicNonNull SamplePipeline samplePipeline;
public ExoPlayerAssetLoaderRenderer(
......@@ -110,8 +110,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
@Override
protected void onStreamChanged(Format[] formats, long startPositionUs, long offsetUs) {
this.streamOffsetUs = offsetUs;
this.streamStartPositionUs = startPositionUs;
this.streamOffsetUs = offsetUs;
}
@Override
......
......@@ -30,15 +30,15 @@ import com.google.android.exoplayer2.decoder.DecoderInputBuffer;
public PassthroughSamplePipeline(
Format format,
long streamOffsetUs,
long streamStartPositionUs,
long streamOffsetUs,
TransformationRequest transformationRequest,
MuxerWrapper muxerWrapper,
FallbackListener fallbackListener) {
super(
format,
streamOffsetUs,
streamStartPositionUs,
streamOffsetUs,
transformationRequest.flattenForSlowMotion,
muxerWrapper);
this.format = format;
......
......@@ -160,7 +160,7 @@ import com.google.common.collect.ImmutableList;
if (MimeTypes.isAudio(inputFormat.sampleMimeType) && shouldTranscodeAudio(inputFormat)) {
return new AudioTranscodingSamplePipeline(
inputFormat,
streamOffsetUs,
streamStartPositionUs,
streamOffsetUs,
transformationRequest,
decoderFactory,
......@@ -172,8 +172,8 @@ import com.google.common.collect.ImmutableList;
return new VideoTranscodingSamplePipeline(
context,
inputFormat,
streamOffsetUs,
streamStartPositionUs,
streamOffsetUs,
transformationRequest,
videoEffects,
frameProcessorFactory,
......@@ -186,8 +186,8 @@ import com.google.common.collect.ImmutableList;
} else {
return new PassthroughSamplePipeline(
inputFormat,
streamOffsetUs,
streamStartPositionUs,
streamOffsetUs,
transformationRequest,
muxerWrapper,
fallbackListener);
......
......@@ -66,8 +66,8 @@ import org.checkerframework.dataflow.qual.Pure;
public VideoTranscodingSamplePipeline(
Context context,
Format inputFormat,
long streamOffsetUs,
long streamStartPositionUs,
long streamOffsetUs,
TransformationRequest transformationRequest,
ImmutableList<Effect> effects,
FrameProcessor.Factory frameProcessorFactory,
......@@ -80,8 +80,8 @@ import org.checkerframework.dataflow.qual.Pure;
throws TransformationException {
super(
inputFormat,
streamOffsetUs,
streamStartPositionUs,
streamOffsetUs,
transformationRequest.flattenForSlowMotion,
muxerWrapper);
......
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