# MultipleInputVideoGraph

# MultipleInputVideoGraph

Artifact:[androidx.media3:media3-effect](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/effect/MultipleInputVideoGraph.java+class:androidx.media3.effect.MultipleInputVideoGraph)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/effect/MultipleInputVideoGraph "View this page in Java")

<br />

```
@UnstableApi
class MultipleInputVideoGraph : VideoGraph
```

<br />

*** ** * ** ***

A[VideoGraph](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph)that handles multiple input streams.

## Summary

|                                                                                                                                                                                                                                                ### Nested types                                                                                                                                                                                                                                                 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[MultipleInputVideoGraph.Factory](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph.Factory)` : `[VideoGraph.Factory](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Factory) A[VideoGraph.Factory](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Factory)for[MultipleInputVideoGraph](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph). |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [flush](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#flush())`()` Flushes the[inputs](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInput(int))of the`VideoGraph`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Surface](https://developer.android.com/reference/android/view/Surface.html)`!`     | [getInputSurface](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#getInputSurface(int))`(inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the input[Surface](https://developer.android.com/reference/android/view/Surface.html)at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getPendingInputFrameCount](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#getPendingInputFrameCount(int))`(inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the number of pending input frames at`inputIndex`that has not been processed yet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [hasProducedFrameWithTimestampZero](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#hasProducedFrameWithTimestampZero())`()` Returns whether the`VideoGraph`has produced a frame with zero presentation timestamp.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [initialize](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#initialize())`()` Initialize the VideoGraph}.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [queueInputBitmap](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#queueInputBitmap(int,android.graphics.Bitmap,androidx.media3.common.util.TimestampIterator))`(` ` inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` inputBitmap: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`!,` ` timestampIterator: `[TimestampIterator](https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampIterator)`!` `)` Queues the input[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [queueInputTexture](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#queueInputTexture(int,int,long))`(` ` inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` textureId: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Queues the input texture at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [redraw](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#redraw())`()` Updates an[available frame](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Listener#onOutputFrameAvailableForRendering(long,boolean))with the modified effects.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [registerInput](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#registerInput(int))`(inputIndex: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Registers a new input to the`VideoGraph`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [registerInputFrame](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#registerInputFrame(int))`(inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Registers a new input frame at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [registerInputStream](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#registerInputStream(int,int,androidx.media3.common.Format,java.util.List<androidx.media3.common.Effect>,long))`(` ` inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` @`[VideoFrameProcessor.InputType](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.InputType)` inputType: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` format: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!,` ` effects: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Effect](https://developer.android.com/reference/kotlin/androidx/media3/common/Effect)`!>!,` ` offsetToAddUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Informs the graph that a new input stream will be queued to the graph input corresponding to`inputIndex`. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [release](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#release())`()` Releases the associated resources.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [renderOutputFrame](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#renderOutputFrame(long))`(renderTimeNs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Renders the output frame from the`VideoGraph`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setCompositionEffects](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#setCompositionEffects(java.util.List<androidx.media3.common.Effect>))`(compositionEffects: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Effect](https://developer.android.com/reference/kotlin/androidx/media3/common/Effect)`!>!)` Sets the Composition-level video effects that are applied after the effects on single[input stream](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInputStream(int,int,androidx.media3.common.Format,java.util.List<androidx.media3.common.Effect>,long)).                                                                                                                                                                                                                                                                                                                                                                                   |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setCompositorSettings](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#setCompositorSettings(androidx.media3.common.VideoCompositorSettings))`(videoCompositorSettings: `[VideoCompositorSettings](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoCompositorSettings)`!)` Sets the[VideoCompositorSettings](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoCompositorSettings).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setOnInputFrameProcessedListener](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#setOnInputFrameProcessedListener(int,androidx.media3.common.OnInputFrameProcessedListener))`(` ` inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` listener: `[OnInputFrameProcessedListener](https://developer.android.com/reference/kotlin/androidx/media3/common/OnInputFrameProcessedListener)`!` `)` Sets the[OnInputFrameProcessedListener](https://developer.android.com/reference/kotlin/androidx/media3/common/OnInputFrameProcessedListener)at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setOnInputSurfaceReadyListener](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#setOnInputSurfaceReadyListener(int,java.lang.Runnable))`(inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, listener: `[Runnable](https://developer.android.com/reference/java/lang/Runnable.html)`!)` Sets a listener that's called when the[input surface](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#getInputSurface(int))is ready to use at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setOutputSurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#setOutputSurfaceInfo(androidx.media3.common.SurfaceInfo))`(outputSurfaceInfo: `[SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo)`?)` Sets the output surface and supporting information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [signalEndOfInput](https://developer.android.com/reference/kotlin/androidx/media3/effect/MultipleInputVideoGraph#signalEndOfInput(int))`(inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Informs that no further inputs should be accepted at`inputIndex`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

## Public functions

### flush

```
fun flush(): Unit
```

Flushes the[inputs](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInput(int))of the`VideoGraph`.  

|                                                  See also                                                  |
|------------------------------------------------------------------------------------------------------------|---|
| [flush](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor#flush()) |   |

### getInputSurface

```
fun getInputSurface(inputIndex: Int): Surface!
```

Returns the input[Surface](https://developer.android.com/reference/android/view/Surface.html)at`inputIndex`.  

### getPendingInputFrameCount

```
fun getPendingInputFrameCount(inputIndex: Int): Int
```

Returns the number of pending input frames at`inputIndex`that has not been processed yet.  

### hasProducedFrameWithTimestampZero

```
fun hasProducedFrameWithTimestampZero(): Boolean
```

Returns whether the`VideoGraph`has produced a frame with zero presentation timestamp.  

### initialize

```
fun initialize(): Unit
```

Initialize the VideoGraph}.

This method must be called before calling other methods.

If the method throws, the caller must call #release.

This method must be called at most once.  

|                                                                           Throws                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [androidx.media3.common.VideoFrameProcessingException](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessingException) |   |

### queueInputBitmap

```
fun queueInputBitmap(
    inputIndex: Int,
    inputBitmap: Bitmap!,
    timestampIterator: TimestampIterator!
): Boolean
```

Queues the input[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)at`inputIndex`.  

|                                                                                               See also                                                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [queueInputBitmap](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor#queueInputBitmap(android.graphics.Bitmap,androidx.media3.common.util.TimestampIterator)) |   |

### queueInputTexture

```
fun queueInputTexture(
    inputIndex: Int,
    textureId: Int,
    presentationTimeUs: Long
): Boolean
```

Queues the input texture at`inputIndex`.  

|                                                                  See also                                                                  |
|--------------------------------------------------------------------------------------------------------------------------------------------|---|
| [queueInputTexture](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor#queueInputTexture(int,long)) |   |

### redraw

```
fun redraw(): Unit
```

Updates an[available frame](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Listener#onOutputFrameAvailableForRendering(long,boolean))with the modified effects.  

### registerInput

```
fun registerInput(inputIndex: @IntRange(from = 0) Int): Unit
```

Registers a new input to the`VideoGraph`.

All inputs must be registered before rendering frames by calling[registerInputFrame](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInputFrame(int)),[queueInputBitmap](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#queueInputBitmap(int,android.graphics.Bitmap,androidx.media3.common.util.TimestampIterator))or[queueInputTexture](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#queueInputTexture(int,int,long)).

If the method throws, the caller must call[release](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#release()).  

|                                                                                           Parameters                                                                                           |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| `inputIndex: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The index of the input which could be used to order the inputs. The index must start from 0. |

|                                                                           Throws                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [androidx.media3.common.VideoFrameProcessingException](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessingException) |   |

### registerInputFrame

```
fun registerInputFrame(inputIndex: Int): Boolean
```

Registers a new input frame at`inputIndex`.  

|                                                               See also                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------|---|
| [registerInputFrame](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor#registerInputFrame()) |   |

### registerInputStream

```
fun registerInputStream(
    inputIndex: Int,
    @VideoFrameProcessor.InputType inputType: Int,
    format: Format!,
    effects: (Mutable)List<Effect!>!,
    offsetToAddUs: Long
): Unit
```

Informs the graph that a new input stream will be queued to the graph input corresponding to`inputIndex`.

After registering the first input stream, this method must only be called for the same index after the last frame of the already-registered input stream has been[registered](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInputFrame(int)), last bitmap[queued](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#queueInputBitmap(int,android.graphics.Bitmap,androidx.media3.common.util.TimestampIterator))or last texture id[queued](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#queueInputTexture(int,int,long)).

This method blocks the calling thread until the previous input stream corresponding to the same`inputIndex`has been fully registered internally.  

|                                                                                                                                                 Parameters                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `inputIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                                                                                                                  | The index of the input for which a new input stream should be registered. This index must start from 0.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `@`[VideoFrameProcessor.InputType](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.InputType)` inputType: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                           | The[InputType](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor.InputType)of the new input stream.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `format: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!`                                                                                                                                                                                                        | The[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)of the new input stream. The[colorInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/Format#colorInfo()), the[width](https://developer.android.com/reference/kotlin/androidx/media3/common/Format#width()), the[height](https://developer.android.com/reference/kotlin/androidx/media3/common/Format#height())and the[pixelWidthHeightRatio](https://developer.android.com/reference/kotlin/androidx/media3/common/Format#pixelWidthHeightRatio())must be set. |
| `effects: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Effect](https://developer.android.com/reference/kotlin/androidx/media3/common/Effect)`!>!` | The list of[effects](https://developer.android.com/reference/kotlin/androidx/media3/common/Effect)to apply to the new input stream.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `offsetToAddUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                                                                                                                                             | The offset that must be added to the frame presentation timestamps, in microseconds. This offset is not part of the input timestamps. It is added to the frame timestamps before processing, and is retained in the output timestamps.                                                                                                                                                                                                                                                                                                                                           |

### release

```
fun release(): Unit
```

Releases the associated resources.

This`VideoGraph`instance must not be used after this method is called.  

### renderOutputFrame

```
fun renderOutputFrame(renderTimeNs: Long): Unit
```

Renders the output frame from the`VideoGraph`.

This method must be called only for frames that have become[available](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Listener#onOutputFrameAvailableForRendering(long,boolean)), calling the method renders the frame that becomes available the earliest but not yet rendered.  

|                                                                See also                                                                |
|----------------------------------------------------------------------------------------------------------------------------------------|---|
| [renderOutputFrame](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor#renderOutputFrame(long)) |   |

### setCompositionEffects

```
fun setCompositionEffects(compositionEffects: (Mutable)List<Effect!>!): Unit
```

Sets the Composition-level video effects that are applied after the effects on single[input stream](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInputStream(int,int,androidx.media3.common.Format,java.util.List<androidx.media3.common.Effect>,long)).

This method should be called before[registerInputStream](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInputStream(int,int,androidx.media3.common.Format,java.util.List<androidx.media3.common.Effect>,long))to set the desired composition level[effects](https://developer.android.com/reference/kotlin/androidx/media3/common/Effect).  

### setCompositorSettings

```
fun setCompositorSettings(videoCompositorSettings: VideoCompositorSettings!): Unit
```

Sets the[VideoCompositorSettings](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoCompositorSettings).

This method should be called before[registerInputStream](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#registerInputStream(int,int,androidx.media3.common.Format,java.util.List<androidx.media3.common.Effect>,long))to set the desired composition level[VideoCompositorSettings](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoCompositorSettings).

Setting a custom[VideoCompositorSettings](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoCompositorSettings)where[supportsMultipleInputs](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Factory#supportsMultipleInputs())returns`false`throws an[IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html).  

### setOnInputFrameProcessedListener

```
fun setOnInputFrameProcessedListener(
    inputIndex: Int,
    listener: OnInputFrameProcessedListener!
): Unit
```

Sets the[OnInputFrameProcessedListener](https://developer.android.com/reference/kotlin/androidx/media3/common/OnInputFrameProcessedListener)at`inputIndex`.  

### setOnInputSurfaceReadyListener

```
fun setOnInputSurfaceReadyListener(inputIndex: Int, listener: Runnable!): Unit
```

Sets a listener that's called when the[input surface](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph#getInputSurface(int))is ready to use at`inputIndex`.  

### setOutputSurfaceInfo

```
fun setOutputSurfaceInfo(outputSurfaceInfo: SurfaceInfo?): Unit
```

Sets the output surface and supporting information.

The new output[SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo)is applied from the next output frame rendered onwards. If the output[SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo)is`null`, the`VideoGraph`will stop rendering pending frames and resume rendering once a non-null[SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo)is set.

If the dimensions given in[SurfaceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo)do not match the[output size after applying the final effect](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoGraph.Listener#onOutputSizeChanged(int,int))the frames are resized before rendering to the surface and letter/pillar-boxing is applied.

The caller is responsible for tracking the lifecycle of the[surface](https://developer.android.com/reference/kotlin/androidx/media3/common/SurfaceInfo#surface())including calling this method with a new surface if it is destroyed. When this method returns, the previous output surface is no longer being used and can safely be released by the caller.  

### signalEndOfInput

```
fun signalEndOfInput(inputIndex: Int): Unit
```

Informs that no further inputs should be accepted at`inputIndex`.  

|                                                             See also                                                             |
|----------------------------------------------------------------------------------------------------------------------------------|---|
| [signalEndOfInput](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor#signalEndOfInput()) |   |