addFrameListener

Register a callback to be invoked when a new video frame has been received. This version uses the drawer of the EglRenderer that was passed in init.

Parameters

listener

The callback to be invoked. The callback will be invoked on the render thread. It should be lightweight and must not call removeFrameListener.

scale

The scale of the Bitmap passed to the callback, or 0 if no Bitmap is required.


Register a callback to be invoked when a new video frame has been received.

Parameters

listener

The callback to be invoked. The callback will be invoked on the render thread. It should be lightweight and must not call removeFrameListener.

scale

The scale of the Bitmap passed to the callback, or 0 if no Bitmap is required.

drawer

Custom drawer to use for this frame listener or null to use the default one.


open fun addFrameListener(listener: EglRenderer.FrameListener, scale: Float, @Nullable drawerParam: RendererCommon.GlDrawer, applyFpsReduction: Boolean)

Register a callback to be invoked when a new video frame has been received.

Parameters

listener

The callback to be invoked. The callback will be invoked on the render thread. It should be lightweight and must not call removeFrameListener.

scale

The scale of the Bitmap passed to the callback, or 0 if no Bitmap is required.

drawer

Custom drawer to use for this frame listener or null to use the default one.

applyFpsReduction

This callback will not be called for frames that have been dropped by FPS reduction.