Class TimestampWrapper

  • All Implemented Interfaces:
    GlEffect, Effect

    public class TimestampWrapper
    extends Object
    implements GlEffect
    Deprecated. 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.
    Applies a GlEffect from startTimeUs to endTimeUs, and no change on all other timestamps.
    • Field Detail

      • glEffect

        public final GlEffect glEffect
      • startTimeUs

        public final long startTimeUs
      • endTimeUs

        public final long endTimeUs
    • Constructor Detail

      • TimestampWrapper

        public TimestampWrapper​(GlEffect glEffect,
                                long startTimeUs,
                                long endTimeUs)
        Creates a new instance.
        glEffect - The GlEffect to apply, from startTimeUs to endTimeUs. This instance must not change the output dimensions.
        startTimeUs - The time to begin applying glEffect on. Must be non-negative.
        endTimeUs - The time to stop applying {code glEffect} on. Must be non-negative.
    • Method Detail

      • isNoOp

        public boolean isNoOp​(int inputWidth,
                              int inputHeight)
        Description copied from interface: GlEffect
        Returns whether a GlEffect applies no change at every timestamp.

        This can be used as a hint to skip this instance.

        Specified by:
        isNoOp in interface GlEffect
        inputWidth - The input frame width, in pixels.
        inputHeight - The input frame height, in pixels.