public class SurfaceEglRenderer extends EglRenderer implements android.view.SurfaceHolder.Callback
EglRenderer.ErrorCallback, EglRenderer.FrameListener
name
Constructor and Description |
---|
SurfaceEglRenderer(java.lang.String name)
In order to render something, you must first call init().
|
Modifier and Type | Method and Description |
---|---|
void |
disableFpsReduction() |
void |
init(EglBase.Context sharedContext,
int[] configAttributes,
RendererCommon.GlDrawer drawer)
Same as above with usePresentationTimeStamp set to false.
|
void |
init(EglBase.Context sharedContext,
RendererCommon.RendererEvents rendererEvents,
int[] configAttributes,
RendererCommon.GlDrawer drawer)
Initialize this class, sharing resources with |sharedContext|.
|
void |
onFrame(VideoFrame frame)
Implementations should call frame.retain() if they need to hold a reference to the frame after
this function returns.
|
void |
pauseVideo() |
void |
setFpsReduction(float fps)
Limit render framerate.
|
void |
surfaceChanged(android.view.SurfaceHolder holder,
int format,
int width,
int height) |
void |
surfaceCreated(android.view.SurfaceHolder holder) |
void |
surfaceDestroyed(android.view.SurfaceHolder holder) |
addFrameListener, addFrameListener, addFrameListener, clearImage, clearImage, createEglSurface, createEglSurface, init, printStackTrace, release, releaseEglSurface, removeFrameListener, setErrorCallback, setLayoutAspectRatio, setMirror, setMirrorVertically
public SurfaceEglRenderer(java.lang.String name)
public void init(EglBase.Context sharedContext, RendererCommon.RendererEvents rendererEvents, int[] configAttributes, RendererCommon.GlDrawer drawer)
public void init(EglBase.Context sharedContext, int[] configAttributes, RendererCommon.GlDrawer drawer)
EglRenderer
init
in class EglRenderer
EglRenderer.init(EglBase.Context, int[], RendererCommon.GlDrawer, boolean)
public void setFpsReduction(float fps)
setFpsReduction
in class EglRenderer
fps
- Limit render framerate to this value, or use Float.POSITIVE_INFINITY to disable fps
reduction.public void disableFpsReduction()
disableFpsReduction
in class EglRenderer
public void pauseVideo()
pauseVideo
in class EglRenderer
public void onFrame(VideoFrame frame)
VideoSink
onFrame
in interface VideoSink
onFrame
in class EglRenderer
public void surfaceCreated(android.view.SurfaceHolder holder)
surfaceCreated
in interface android.view.SurfaceHolder.Callback
public void surfaceDestroyed(android.view.SurfaceHolder holder)
surfaceDestroyed
in interface android.view.SurfaceHolder.Callback
public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height)
surfaceChanged
in interface android.view.SurfaceHolder.Callback
6.0.0