EglRenderer
Implements VideoSink by displaying the video stream on an EGL Surface. This class is intended to be used as a helper class for rendering on SurfaceViews and TextureViews.
Inheritors
Types
Link copied to clipboard
interface ErrorCallback
Callback for clients to be notified about errors encountered during rendering.
Link copied to clipboard
interface FrameListener
Functions
Link copied to clipboard
open fun addFrameListener(listener: EglRenderer.FrameListener, scale: Float, drawerParam: RendererCommon.GlDrawer)
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.
Link copied to clipboard
Post a task to clear the surface to a transparent uniform color.
Post a task to clear the surface to a specific color.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun init(@Nullable sharedContext: EglBase.Context, configAttributes: Array<Int>, drawer: RendererCommon.GlDrawer)
Same as above with usePresentationTimeStamp set to false.
open fun init(eglThread: EglThread, drawer: RendererCommon.GlDrawer, usePresentationTimeStamp: Boolean)
open fun init(@Nullable sharedContext: EglBase.Context, configAttributes: Array<Int>, drawer: RendererCommon.GlDrawer, usePresentationTimeStamp: Boolean)
Initialize this class, sharing resources with `sharedContext`.
Link copied to clipboard
Implementations should call frame.retain() if they need to hold a reference to the frame after this function returns.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Release EGL surface.
Link copied to clipboard
Remove any pending callback that was added with addFrameListener.
Link copied to clipboard
Can be set in order to be notified about errors encountered during rendering.
Link copied to clipboard
Limit render framerate.
Link copied to clipboard
Set layout aspect ratio.
Link copied to clipboard
Set if the video stream should be mirrored vertically or not.