public final class VideoFrameReleaseTimeHelper extends Object
| Constructor and Description |
|---|
VideoFrameReleaseTimeHelper()
Constructs an instance that smoothes frame release but does not snap release to the default
display's vsync signal.
|
VideoFrameReleaseTimeHelper(Context context)
Constructs an instance that smoothes frame release and snaps release to the default display's
vsync signal.
|
| Modifier and Type | Method and Description |
|---|---|
long |
adjustReleaseTime(long framePresentationTimeUs,
long unadjustedReleaseTimeNs)
Called to make a fine-grained adjustment to a frame release time.
|
void |
disable()
Disables the helper.
|
void |
enable()
Enables the helper.
|
protected void |
onSynced() |
public VideoFrameReleaseTimeHelper()
public VideoFrameReleaseTimeHelper(Context context)
context - A context from which information about the default display can be retrieved.public void enable()
public void disable()
public long adjustReleaseTime(long framePresentationTimeUs,
long unadjustedReleaseTimeNs)
framePresentationTimeUs - The frame's media presentation time, in microseconds.unadjustedReleaseTimeNs - The frame's unadjusted release time, in nanoseconds and in
the same time base as System.nanoTime().System.nanoTime().protected void onSynced()