mirror of
https://github.com/androidx/media.git
synced 2025-05-10 17:22:13 +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(
|
public AudioTranscodingSamplePipeline(
|
||||||
Format inputFormat,
|
Format inputFormat,
|
||||||
long streamOffsetUs,
|
|
||||||
long streamStartPositionUs,
|
long streamStartPositionUs,
|
||||||
|
long streamOffsetUs,
|
||||||
TransformationRequest transformationRequest,
|
TransformationRequest transformationRequest,
|
||||||
Codec.DecoderFactory decoderFactory,
|
Codec.DecoderFactory decoderFactory,
|
||||||
Codec.EncoderFactory encoderFactory,
|
Codec.EncoderFactory encoderFactory,
|
||||||
@ -65,8 +65,8 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||||||
throws TransformationException {
|
throws TransformationException {
|
||||||
super(
|
super(
|
||||||
inputFormat,
|
inputFormat,
|
||||||
streamOffsetUs,
|
|
||||||
streamStartPositionUs,
|
streamStartPositionUs,
|
||||||
|
streamOffsetUs,
|
||||||
transformationRequest.flattenForSlowMotion,
|
transformationRequest.flattenForSlowMotion,
|
||||||
muxerWrapper);
|
muxerWrapper);
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
|
|
||||||
/* package */ abstract class BaseSamplePipeline implements SamplePipeline {
|
/* package */ abstract class BaseSamplePipeline implements SamplePipeline {
|
||||||
|
|
||||||
private final long streamOffsetUs;
|
|
||||||
private final long streamStartPositionUs;
|
private final long streamStartPositionUs;
|
||||||
|
private final long streamOffsetUs;
|
||||||
private final MuxerWrapper muxerWrapper;
|
private final MuxerWrapper muxerWrapper;
|
||||||
private final @C.TrackType int trackType;
|
private final @C.TrackType int trackType;
|
||||||
private final @MonotonicNonNull SefSlowMotionFlattener sefVideoSlowMotionFlattener;
|
private final @MonotonicNonNull SefSlowMotionFlattener sefVideoSlowMotionFlattener;
|
||||||
@ -42,12 +42,12 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
|
|
||||||
public BaseSamplePipeline(
|
public BaseSamplePipeline(
|
||||||
Format inputFormat,
|
Format inputFormat,
|
||||||
long streamOffsetUs,
|
|
||||||
long streamStartPositionUs,
|
long streamStartPositionUs,
|
||||||
|
long streamOffsetUs,
|
||||||
boolean flattenForSlowMotion,
|
boolean flattenForSlowMotion,
|
||||||
MuxerWrapper muxerWrapper) {
|
MuxerWrapper muxerWrapper) {
|
||||||
this.streamOffsetUs = streamOffsetUs;
|
|
||||||
this.streamStartPositionUs = streamStartPositionUs;
|
this.streamStartPositionUs = streamStartPositionUs;
|
||||||
|
this.streamOffsetUs = streamOffsetUs;
|
||||||
this.muxerWrapper = muxerWrapper;
|
this.muxerWrapper = muxerWrapper;
|
||||||
trackType = MimeTypes.getTrackType(inputFormat.sampleMimeType);
|
trackType = MimeTypes.getTrackType(inputFormat.sampleMimeType);
|
||||||
sefVideoSlowMotionFlattener =
|
sefVideoSlowMotionFlattener =
|
||||||
|
@ -44,8 +44,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
private final DecoderInputBuffer decoderInputBuffer;
|
private final DecoderInputBuffer decoderInputBuffer;
|
||||||
|
|
||||||
private boolean isTransformationRunning;
|
private boolean isTransformationRunning;
|
||||||
private long streamOffsetUs;
|
|
||||||
private long streamStartPositionUs;
|
private long streamStartPositionUs;
|
||||||
|
private long streamOffsetUs;
|
||||||
private @MonotonicNonNull SamplePipeline samplePipeline;
|
private @MonotonicNonNull SamplePipeline samplePipeline;
|
||||||
|
|
||||||
public ExoPlayerAssetLoaderRenderer(
|
public ExoPlayerAssetLoaderRenderer(
|
||||||
@ -110,8 +110,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStreamChanged(Format[] formats, long startPositionUs, long offsetUs) {
|
protected void onStreamChanged(Format[] formats, long startPositionUs, long offsetUs) {
|
||||||
this.streamOffsetUs = offsetUs;
|
|
||||||
this.streamStartPositionUs = startPositionUs;
|
this.streamStartPositionUs = startPositionUs;
|
||||||
|
this.streamOffsetUs = offsetUs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,15 +30,15 @@ import androidx.media3.decoder.DecoderInputBuffer;
|
|||||||
|
|
||||||
public PassthroughSamplePipeline(
|
public PassthroughSamplePipeline(
|
||||||
Format format,
|
Format format,
|
||||||
long streamOffsetUs,
|
|
||||||
long streamStartPositionUs,
|
long streamStartPositionUs,
|
||||||
|
long streamOffsetUs,
|
||||||
TransformationRequest transformationRequest,
|
TransformationRequest transformationRequest,
|
||||||
MuxerWrapper muxerWrapper,
|
MuxerWrapper muxerWrapper,
|
||||||
FallbackListener fallbackListener) {
|
FallbackListener fallbackListener) {
|
||||||
super(
|
super(
|
||||||
format,
|
format,
|
||||||
streamOffsetUs,
|
|
||||||
streamStartPositionUs,
|
streamStartPositionUs,
|
||||||
|
streamOffsetUs,
|
||||||
transformationRequest.flattenForSlowMotion,
|
transformationRequest.flattenForSlowMotion,
|
||||||
muxerWrapper);
|
muxerWrapper);
|
||||||
this.format = format;
|
this.format = format;
|
||||||
|
@ -160,7 +160,7 @@ import com.google.common.collect.ImmutableList;
|
|||||||
if (MimeTypes.isAudio(inputFormat.sampleMimeType) && shouldTranscodeAudio(inputFormat)) {
|
if (MimeTypes.isAudio(inputFormat.sampleMimeType) && shouldTranscodeAudio(inputFormat)) {
|
||||||
return new AudioTranscodingSamplePipeline(
|
return new AudioTranscodingSamplePipeline(
|
||||||
inputFormat,
|
inputFormat,
|
||||||
streamOffsetUs,
|
streamStartPositionUs,
|
||||||
streamOffsetUs,
|
streamOffsetUs,
|
||||||
transformationRequest,
|
transformationRequest,
|
||||||
decoderFactory,
|
decoderFactory,
|
||||||
@ -172,8 +172,8 @@ import com.google.common.collect.ImmutableList;
|
|||||||
return new VideoTranscodingSamplePipeline(
|
return new VideoTranscodingSamplePipeline(
|
||||||
context,
|
context,
|
||||||
inputFormat,
|
inputFormat,
|
||||||
streamOffsetUs,
|
|
||||||
streamStartPositionUs,
|
streamStartPositionUs,
|
||||||
|
streamOffsetUs,
|
||||||
transformationRequest,
|
transformationRequest,
|
||||||
videoEffects,
|
videoEffects,
|
||||||
frameProcessorFactory,
|
frameProcessorFactory,
|
||||||
@ -186,8 +186,8 @@ import com.google.common.collect.ImmutableList;
|
|||||||
} else {
|
} else {
|
||||||
return new PassthroughSamplePipeline(
|
return new PassthroughSamplePipeline(
|
||||||
inputFormat,
|
inputFormat,
|
||||||
streamOffsetUs,
|
|
||||||
streamStartPositionUs,
|
streamStartPositionUs,
|
||||||
|
streamOffsetUs,
|
||||||
transformationRequest,
|
transformationRequest,
|
||||||
muxerWrapper,
|
muxerWrapper,
|
||||||
fallbackListener);
|
fallbackListener);
|
||||||
|
@ -66,8 +66,8 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||||||
public VideoTranscodingSamplePipeline(
|
public VideoTranscodingSamplePipeline(
|
||||||
Context context,
|
Context context,
|
||||||
Format inputFormat,
|
Format inputFormat,
|
||||||
long streamOffsetUs,
|
|
||||||
long streamStartPositionUs,
|
long streamStartPositionUs,
|
||||||
|
long streamOffsetUs,
|
||||||
TransformationRequest transformationRequest,
|
TransformationRequest transformationRequest,
|
||||||
ImmutableList<Effect> effects,
|
ImmutableList<Effect> effects,
|
||||||
FrameProcessor.Factory frameProcessorFactory,
|
FrameProcessor.Factory frameProcessorFactory,
|
||||||
@ -80,8 +80,8 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||||||
throws TransformationException {
|
throws TransformationException {
|
||||||
super(
|
super(
|
||||||
inputFormat,
|
inputFormat,
|
||||||
streamOffsetUs,
|
|
||||||
streamStartPositionUs,
|
streamStartPositionUs,
|
||||||
|
streamOffsetUs,
|
||||||
transformationRequest.flattenForSlowMotion,
|
transformationRequest.flattenForSlowMotion,
|
||||||
muxerWrapper);
|
muxerWrapper);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user