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
|
* 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)
|
* {@link #registerInput(int)}. If the {@code sequenceIndex} is not {@linkplain
|
||||||
* registered} before, this method will throw an {@link IllegalStateException}.
|
* #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.
|
* 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.VideoGraph;
|
||||||
import androidx.media3.common.util.GlUtil;
|
import androidx.media3.common.util.GlUtil;
|
||||||
import androidx.media3.common.util.UnstableApi;
|
import androidx.media3.common.util.UnstableApi;
|
||||||
import androidx.media3.common.util.Util;
|
|
||||||
|
|
||||||
import com.google.common.util.concurrent.MoreExecutors;
|
import com.google.common.util.concurrent.MoreExecutors;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -262,9 +260,9 @@ public abstract class MultipleInputVideoGraph implements VideoGraph {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VideoFrameProcessor getProcessor(int inputId) {
|
public VideoFrameProcessor getProcessor(int sequenceIndex) {
|
||||||
checkState(Util.contains(preProcessors, inputId));
|
checkState(contains(preProcessors, sequenceIndex));
|
||||||
return preProcessors.get(inputId);
|
return preProcessors.get(sequenceIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -162,7 +162,7 @@ public abstract class SingleInputVideoGraph implements VideoGraph {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VideoFrameProcessor getProcessor(int inputId) {
|
public VideoFrameProcessor getProcessor(int sequenceIndex) {
|
||||||
return checkStateNotNull(videoFrameProcessor);
|
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
|
* Registers a new input source.
|
||||||
* source, to be used in {@link #queueInputTexture}.
|
|
||||||
*
|
*
|
||||||
* @param sequenceIndex The sequence index of the input source which is used to determine the
|
* @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);
|
void registerInputSource(int sequenceIndex);
|
||||||
|
|
||||||
|
@ -550,8 +550,8 @@ public final class CompositingVideoSinkProvider
|
|||||||
// reduces decoder timeouts, and consider restoring.
|
// reduces decoder timeouts, and consider restoring.
|
||||||
videoFrameProcessorMaxPendingFrameCount =
|
videoFrameProcessorMaxPendingFrameCount =
|
||||||
Util.getMaxPendingFramesCountForMediaCodecDecoders(context);
|
Util.getMaxPendingFramesCountForMediaCodecDecoders(context);
|
||||||
videoGraph.registerInput(0);
|
videoGraph.registerInput(/* sequenceIndex= */ 0);
|
||||||
videoFrameProcessor = videoGraph.getProcessor(0);
|
videoFrameProcessor = videoGraph.getProcessor(/* sequenceIndex= */ 0);
|
||||||
|
|
||||||
videoEffects = new ArrayList<>();
|
videoEffects = new ArrayList<>();
|
||||||
finalBufferPresentationTimeUs = C.TIME_UNSET;
|
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}.
|
* <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;
|
GraphInput createInput(int sequenceIndex) throws VideoFrameProcessingException;
|
||||||
}
|
}
|
||||||
|
@ -548,8 +548,8 @@ import org.checkerframework.dataflow.qual.Pure;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VideoFrameProcessor getProcessor(int inputId) {
|
public VideoFrameProcessor getProcessor(int sequenceIndex) {
|
||||||
return videoGraph.getProcessor(inputId);
|
return videoGraph.getProcessor(sequenceIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user