mirror of
https://github.com/androidx/media.git
synced 2025-05-10 09:12:16 +08:00
Fix bug where streamOffsetUs is passed instead of streamPositionUs
Also make order of streamStartPositionUs and streamOffsetUs consistent PiperOrigin-RevId: 487511633
This commit is contained in:
parent
33bea391d4
commit
c9fe52bf67
@ -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 androidx.media3.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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user