mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Format with google-java-format
This commit is contained in:
parent
51a9bcca61
commit
0403e5881d
@ -82,10 +82,11 @@ public interface VideoGraph {
|
||||
|
||||
/**
|
||||
* Returns the {@link VideoFrameProcessor} that handles the processing for an input registered via
|
||||
* {@link #registerInput(int)}. If the {@code inputId} is not {@linkplain #registerInput(int)
|
||||
* registered} before, this method will throw an {@link IllegalStateException}.
|
||||
* {@link #registerInput(int)}. If the {@code sequenceIndex} is not {@linkplain
|
||||
* #registerInput(int) registered} before, this method will throw an {@link
|
||||
* IllegalStateException}.
|
||||
*/
|
||||
VideoFrameProcessor getProcessor(int inputId);
|
||||
VideoFrameProcessor getProcessor(int sequenceIndex);
|
||||
|
||||
/**
|
||||
* Sets the output surface and supporting information.
|
||||
|
@ -47,8 +47,6 @@ import androidx.media3.common.VideoFrameProcessor;
|
||||
import androidx.media3.common.VideoGraph;
|
||||
import androidx.media3.common.util.GlUtil;
|
||||
import androidx.media3.common.util.UnstableApi;
|
||||
import androidx.media3.common.util.Util;
|
||||
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
@ -262,9 +260,9 @@ public abstract class MultipleInputVideoGraph implements VideoGraph {
|
||||
}
|
||||
|
||||
@Override
|
||||
public VideoFrameProcessor getProcessor(int inputId) {
|
||||
checkState(Util.contains(preProcessors, inputId));
|
||||
return preProcessors.get(inputId);
|
||||
public VideoFrameProcessor getProcessor(int sequenceIndex) {
|
||||
checkState(contains(preProcessors, sequenceIndex));
|
||||
return preProcessors.get(sequenceIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -162,7 +162,7 @@ public abstract class SingleInputVideoGraph implements VideoGraph {
|
||||
}
|
||||
|
||||
@Override
|
||||
public VideoFrameProcessor getProcessor(int inputId) {
|
||||
public VideoFrameProcessor getProcessor(int sequenceIndex) {
|
||||
return checkStateNotNull(videoFrameProcessor);
|
||||
}
|
||||
|
||||
|
@ -46,11 +46,10 @@ public interface VideoCompositor extends GlTextureProducer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a new input source, and returns a unique {@code inputId} corresponding to this
|
||||
* source, to be used in {@link #queueInputTexture}.
|
||||
* Registers a new input source.
|
||||
*
|
||||
* @param sequenceIndex The sequence index of the input source which is used to determine the
|
||||
* order of the input sources.
|
||||
* order of the input sources. The same index should to be used in {@link #queueInputTexture}.
|
||||
*/
|
||||
void registerInputSource(int sequenceIndex);
|
||||
|
||||
|
@ -550,8 +550,8 @@ public final class CompositingVideoSinkProvider
|
||||
// reduces decoder timeouts, and consider restoring.
|
||||
videoFrameProcessorMaxPendingFrameCount =
|
||||
Util.getMaxPendingFramesCountForMediaCodecDecoders(context);
|
||||
videoGraph.registerInput(0);
|
||||
videoFrameProcessor = videoGraph.getProcessor(0);
|
||||
videoGraph.registerInput(/* sequenceIndex= */ 0);
|
||||
videoFrameProcessor = videoGraph.getProcessor(/* sequenceIndex= */ 0);
|
||||
|
||||
videoEffects = new ArrayList<>();
|
||||
finalBufferPresentationTimeUs = C.TIME_UNSET;
|
||||
|
@ -70,7 +70,7 @@ import java.util.concurrent.Executor;
|
||||
*
|
||||
* <p>If the method throws any {@link Exception}, the caller must call {@link #release}.
|
||||
*
|
||||
* @param sequenceIndex The sequence index of the input, which can aid ordering of the inputs.
|
||||
* @param sequenceIndex The index of the input sequence, which is used to order the inputs.
|
||||
*/
|
||||
GraphInput createInput(int sequenceIndex) throws VideoFrameProcessingException;
|
||||
}
|
||||
|
@ -548,8 +548,8 @@ import org.checkerframework.dataflow.qual.Pure;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VideoFrameProcessor getProcessor(int inputId) {
|
||||
return videoGraph.getProcessor(inputId);
|
||||
public VideoFrameProcessor getProcessor(int sequenceIndex) {
|
||||
return videoGraph.getProcessor(sequenceIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user