Class FrameCache

  • All Implemented Interfaces:
    GlEffect, Effect

    @Deprecated
    public final class FrameCache
    extends Object
    implements GlEffect
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Caches the input frames.

    Example usage: cache the processed frames when presenting them on screen, to accommodate for the possible fluctuation in video frame processing time between frames.

    • Field Detail

      • capacity

        public final int capacity
        Deprecated.
        The capacity of the frame cache.
    • Constructor Detail

      • FrameCache

        public FrameCache​(@IntRange(from=1L,to=8L)
                          int capacity)
        Deprecated.
        Creates a new instance.

        The capacity should be chosen carefully. OpenGL could crash unexpectedly if the device is not capable of allocating the requested buffer.

        Currently up to 8 frames can be cached in one FrameCache instance.

        Parameters:
        capacity - The capacity of the frame cache, must be greater than zero.