File tree Expand file tree Collapse file tree 7 files changed +16
-17
lines changed
common/src/main/java/androidx/media3/common
effect/src/main/java/androidx/media3/effect
exoplayer/src/main/java/androidx/media3/exoplayer/video
transformer/src/main/java/androidx/media3/transformer Expand file tree Collapse file tree 7 files changed +16
-17
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 2727import static androidx .media3 .effect .DebugTraceUtil .logEvent ;
2828import static java .util .concurrent .TimeUnit .MILLISECONDS ;
2929
30+
3031import android .content .Context ;
3132import android .opengl .EGLContext ;
3233import android .opengl .EGLDisplay ;
4647import androidx .media3 .common .VideoGraph ;
4748import androidx .media3 .common .util .GlUtil ;
4849import androidx .media3 .common .util .UnstableApi ;
49- import androidx .media3 .common .util .Util ;
50-
5150import com .google .common .util .concurrent .MoreExecutors ;
5251import java .util .ArrayDeque ;
5352import 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments