public interface

Renderer.WakeupListener

 androidx.media3.exoplayer.Renderer.WakeupListener

Overview

Some renderers can signal when 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.

Summary

Methods
public voidonSleep(long wakeupDeadlineMs)

The renderer no longer needs to render until the next wakeup.

public voidonWakeup()

The renderer needs to render some frames.

Methods

public void onSleep(long wakeupDeadlineMs)

The renderer no longer needs to render until the next wakeup.

Must be called from the thread ExoPlayer invokes the renderer from.

Parameters:

wakeupDeadlineMs: Maximum time in milliseconds until Renderer.WakeupListener.onWakeup() will be called.

public void onWakeup()

The renderer needs to render some frames. The client should call Renderer.render(long, long) at its earliest convenience.

Can be called from any thread.