-
- 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 floatgetFactor()Returns the factor passed to the constructor. longinterpolate(@NonNull() TrackType type, long time)Given the track type (audio or video) and the frame timestamp in microseconds,should return the corrected timestamp. -
-
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 typetime- frame timestamp in microseconds
-
-
-
-