Skip to content

Commit 8e76256

Browse files
committed
Format with google-java-format
1 parent 5fea852 commit 8e76256

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import static androidx.media3.effect.DebugTraceUtil.logEvent;
2828
import static java.util.concurrent.TimeUnit.MILLISECONDS;
2929

30+
3031
import android.content.Context;
3132
import android.opengl.EGLContext;
3233
import android.opengl.EGLDisplay;
@@ -46,8 +47,6 @@
4647
import androidx.media3.common.VideoGraph;
4748
import androidx.media3.common.util.GlUtil;
4849
import androidx.media3.common.util.UnstableApi;
49-
import androidx.media3.common.util.Util;
50-
5150
import com.google.common.util.concurrent.MoreExecutors;
5251
import java.util.ArrayDeque;
5352
import java.util.ArrayList;
@@ -260,9 +259,9 @@ public void onEnded() {
260259
}
261260

262261
@Override
263-
public VideoFrameProcessor getProcessor(int inputId) {
264-
checkState(Util.contains(preProcessors, inputId));
265-
return preProcessors.get(inputId);
262+
+ public VideoFrameProcessor getProcessor(int sequenceIndex) {
263+
+ checkState(contains(preProcessors, sequenceIndex));
264+
+ return preProcessors.get(sequenceIndex);
266265
}
267266

268267
@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
@@ -528,8 +528,8 @@ public VideoSinkImpl(
528528
// reduces decoder timeouts, and consider restoring.
529529
videoFrameProcessorMaxPendingFrameCount =
530530
Util.getMaxPendingFramesCountForMediaCodecDecoders(context);
531-
videoGraph.registerInput(0);
532-
videoFrameProcessor = videoGraph.getProcessor(0);
531+
videoGraph.registerInput(/* sequenceIndex= */ 0);
532+
videoFrameProcessor = videoGraph.getProcessor(/* sequenceIndex= */ 0);
533533

534534
videoEffects = new ArrayList<>();
535535
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
* <p>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
@@ -540,8 +540,8 @@ public void registerInput(int sequenceIndex) throws VideoFrameProcessingExceptio
540540
}
541541

542542
@Override
543-
public VideoFrameProcessor getProcessor(int inputId) {
544-
return videoGraph.getProcessor(inputId);
543+
public VideoFrameProcessor getProcessor(int sequenceIndex) {
544+
return videoGraph.getProcessor(sequenceIndex);
545545
}
546546

547547
@Override

0 commit comments

Comments
 (0)