public static interface Renderer.WakeupListener
Renderer.render(long, long)
should be called.
That allows the player to sleep until the next wakeup, instead of calling Renderer.render(long, long)
in a tight loop. The aim of this interrupt based scheduling is to save
power.
Modifier and Type | Method | Description |
---|---|---|
void |
onSleep(long wakeupDeadlineMs) |
The renderer no longer needs to render until the next wakeup.
|
void |
onWakeup() |
The renderer needs to render some frames.
|
void onSleep(long wakeupDeadlineMs)
Must be called from the thread ExoPlayer invokes the renderer from.
wakeupDeadlineMs
- Maximum time in milliseconds until onWakeup()
will be
called.void onWakeup()
Renderer.render(long, long)
at its earliest convenience.
Can be called from any thread.