Skip to content

Commit 0403e58

Browse files
committed
Format with google-java-format
1 parent 51a9bcc commit 0403e58

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

libraries/common/src/main/java/androidx/media3/common/VideoGraph.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ interface Listener {
8282

8383
/**
8484
* Returns the {@link VideoFrameProcessor} that handles the processing for an input registered via
85-
* {@link #registerInput(int)}. If the {@code inputId} is not {@linkplain #registerInput(int)
86-
* registered} before, this method will throw an {@link IllegalStateException}.
85+
* {@link #registerInput(int)}. If the {@code sequenceIndex} is not {@linkplain
86+
* #registerInput(int) registered} before, this method will throw an {@link
87+
* IllegalStateException}.
8788
*/
88-
VideoFrameProcessor getProcessor(int inputId);
89+
VideoFrameProcessor getProcessor(int sequenceIndex);
8990

9091
/**
9192
* Sets the output surface and supporting information.

libraries/effect/src/main/java/androidx/media3/effect/MultipleInputVideoGraph.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
import androidx.media3.common.VideoGraph;
4848
import androidx.media3.common.util.GlUtil;
4949
import androidx.media3.common.util.UnstableApi;
50-
import androidx.media3.common.util.Util;
51-
5250
import com.google.common.util.concurrent.MoreExecutors;
5351
import java.util.ArrayDeque;
5452
import java.util.ArrayList;
@@ -262,9 +260,9 @@ public void onEnded() {
262260
}
263261

264262
@Override
265-
public VideoFrameProcessor getProcessor(int inputId) {
266-
checkState(Util.contains(preProcessors, inputId));
267-
return preProcessors.get(inputId);
263+
public VideoFrameProcessor getProcessor(int sequenceIndex) {
264+
checkState(contains(preProcessors, sequenceIndex));
265+
return preProcessors.get(sequenceIndex);
268266
}
269267

270268
@Override

libraries/effect/src/main/java/androidx/media3/effect/SingleInputVideoGraph.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void onEnded() {
162162
}
163163

164164
@Override
165-
public VideoFrameProcessor getProcessor(int inputId) {
165+
public VideoFrameProcessor getProcessor(int sequenceIndex) {
166166
return checkStateNotNull(videoFrameProcessor);
167167
}
168168

libraries/effect/src/main/java/androidx/media3/effect/VideoCompositor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ interface Listener {
4646
}
4747

4848
/**
49-
* Registers a new input source, and returns a unique {@code inputId} corresponding to this
50-
* source, to be used in {@link #queueInputTexture}.
49+
* Registers a new input source.
5150
*
5251
* @param sequenceIndex The sequence index of the input source which is used to determine the
53-
* order of the input sources.
52+
* order of the input sources. The same index should to be used in {@link #queueInputTexture}.
5453
*/
5554
void registerInputSource(int sequenceIndex);
5655

libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/CompositingVideoSinkProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,8 @@ public VideoSinkImpl(Context context) {
550550
// reduces decoder timeouts, and consider restoring.
551551
videoFrameProcessorMaxPendingFrameCount =
552552
Util.getMaxPendingFramesCountForMediaCodecDecoders(context);
553-
videoGraph.registerInput(0);
554-
videoFrameProcessor = videoGraph.getProcessor(0);
553+
videoGraph.registerInput(/* sequenceIndex= */ 0);
554+
videoFrameProcessor = videoGraph.getProcessor(/* sequenceIndex= */ 0);
555555

556556
videoEffects = new ArrayList<>();
557557
finalBufferPresentationTimeUs = C.TIME_UNSET;

libraries/transformer/src/main/java/androidx/media3/transformer/TransformerVideoGraph.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ TransformerVideoGraph create(
7070
*
7171
*

If the method throws any {@link Exception}, the caller must call {@link #release}.

7272
*
73-
* @param sequenceIndex The sequence index of the input, which can aid ordering of the inputs.
73+
* @param sequenceIndex The index of the input sequence, which is used to order the inputs.
7474
*/
7575
GraphInput createInput(int sequenceIndex) throws VideoFrameProcessingException;
7676
}

libraries/transformer/src/main/java/androidx/media3/transformer/VideoSampleExporter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ public void registerInput(int sequenceIndex) throws VideoFrameProcessingExceptio
548548
}
549549

550550
@Override
551-
public VideoFrameProcessor getProcessor(int inputId) {
552-
return videoGraph.getProcessor(inputId);
551+
public VideoFrameProcessor getProcessor(int sequenceIndex) {
552+
return videoGraph.getProcessor(sequenceIndex);
553553
}
554554

555555
@Override

0 commit comments

Comments
 (0)