public class SpeedTimeInterpolator extends java.lang.Object implements TimeInterpolator
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 and Description |
|---|
SpeedTimeInterpolator(float factor)
Creates a new speed interpolator for the given factor.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getFactor()
Returns the factor passed to the constructor.
|
long |
interpolate(TrackType type,
long time)
Given the track type (audio or video) and the frame timestamp in microseconds,
should return the corrected timestamp.
|
public SpeedTimeInterpolator(float factor)
factor - a factorpublic float getFactor()
public long interpolate(@NonNull
TrackType type,
long time)
TimeInterpolatorinterpolate in interface TimeInterpolatortype - track typetime - frame timestamp in microseconds