Commit 5ae60f2b by hschlueter Committed by tonihei

Split VideoSamplePipeline from TransformerTranscodingVideoRenderer.

The `VideoSamplePipeline` handles all steps from decoding to
re-encoding that where previously in
`TransformerTranscodingVideoRenderer`. The renderer is now only
responsible for reading the format, reading input, passing it to the
pipeline and passing the pipeline's output to the muxer.

When no transformations are needed, decoding and re-encoding is
skipped using the `PassthroughPipeline`.

PiperOrigin-RevId: 408619407
parent f633e76c
...@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.transformer; ...@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.transformer;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Assertions.checkState; import static com.google.android.exoplayer2.util.Assertions.checkState;
import static com.google.android.exoplayer2.util.Assertions.checkStateNotNull;
import static java.lang.Math.min; import static java.lang.Math.min;
import android.media.MediaCodec.BufferInfo; import android.media.MediaCodec.BufferInfo;
...@@ -157,9 +158,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -157,9 +158,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
@Override @Override
public void releaseOutputBuffer() { public void releaseOutputBuffer() {
if (encoder != null) { checkStateNotNull(encoder).releaseOutputBuffer();
encoder.releaseOutputBuffer();
}
} }
/** /**
......
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