Package 

Class SpeedTimeInterpolator

  • All Implemented Interfaces:
    com.otaliastudios.transcoder.time.TimeInterpolator

    
    public class SpeedTimeInterpolator
     implements TimeInterpolator
                        

    A TimeInterpolator that modifies the playback speed by the given float factor. A factor less than 1 will slow down, while a bigger factor will accelerate.

    • Constructor Summary

      Constructors 
      Constructor Description
      SpeedTimeInterpolator(float factor) Creates a new speed interpolator for the given factor.Throws if factor is less than 0 or equal to 0.
    • Method Summary

      Modifier and Type Method Description
      float getFactor() Returns the factor passed to the constructor.
      long interpolate(@NonNull() TrackType type, long time) Given the track type (audio or video) and the frame timestamp in microseconds,should return the corrected timestamp.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpeedTimeInterpolator

        SpeedTimeInterpolator(float factor)
        Creates a new speed interpolator for the given factor.Throws if factor is less than 0 or equal to 0.
        Parameters:
        factor - a factor
    • Method Detail

      • getFactor

         float getFactor()

        Returns the factor passed to the constructor.

      • interpolate

         long interpolate(@NonNull() TrackType type, long time)

        Given the track type (audio or video) and the frame timestamp in microseconds,should return the corrected timestamp.

        Parameters:
        type - track type
        time - frame timestamp in microseconds