Make OverlayEffect
take a List
Otherwise, it cannot be used with Kotlin `listOf()`. PiperOrigin-RevId: 682255423
This commit is contained in:
parent
7b08bedf2c
commit
b5680e8a65
@ -19,6 +19,7 @@ import android.content.Context;
|
|||||||
import androidx.media3.common.VideoFrameProcessingException;
|
import androidx.media3.common.VideoFrameProcessingException;
|
||||||
import androidx.media3.common.util.UnstableApi;
|
import androidx.media3.common.util.UnstableApi;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies a list of {@link TextureOverlay}s to a frame in FIFO order (the last overlay in the list
|
* Applies a list of {@link TextureOverlay}s to a frame in FIFO order (the last overlay in the list
|
||||||
@ -36,10 +37,12 @@ public final class OverlayEffect implements GlEffect {
|
|||||||
/**
|
/**
|
||||||
* Creates a new instance for the given list of {@link TextureOverlay}s.
|
* Creates a new instance for the given list of {@link TextureOverlay}s.
|
||||||
*
|
*
|
||||||
* @param textureOverlays The {@link TextureOverlay}s to be blended into the frame.
|
* @param textureOverlays The {@link TextureOverlay}s to be blended into the frame. To modify the
|
||||||
|
* list of {@link TextureOverlay TextureOverlays}, one must recreate a new {@code
|
||||||
|
* OverlayEffect} with the updated list.
|
||||||
*/
|
*/
|
||||||
public OverlayEffect(ImmutableList<TextureOverlay> textureOverlays) {
|
public OverlayEffect(List<TextureOverlay> textureOverlays) {
|
||||||
this.overlays = textureOverlays;
|
this.overlays = ImmutableList.copyOf(textureOverlays);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user