public class CodecInputSurface
extends java.lang.Object
implements android.graphics.SurfaceTexture.OnFrameAvailableListener
Constructor and Description |
---|
CodecInputSurface(android.view.Surface surface)
Creates a CodecInputSurface from a Surface.
|
Modifier and Type | Method and Description |
---|---|
void |
awaitNewImage() |
void |
changeFragmentShader(java.lang.String fragmentShader) |
void |
createRender() |
void |
drawImage() |
android.view.Surface |
getSurface() |
android.graphics.SurfaceTexture |
getSurfaceTexture() |
void |
makeCurrent()
Makes our EGL context and surface current.
|
void |
onFrameAvailable(android.graphics.SurfaceTexture st) |
void |
release()
Discards all resources held by this class, notably the EGL context.
|
void |
setPresentationTime(long nsecs)
Sends the presentation time stamp to EGL.
|
boolean |
swapBuffers()
Calls eglSwapBuffers.
|
public CodecInputSurface(android.view.Surface surface)
public void createRender()
public android.graphics.SurfaceTexture getSurfaceTexture()
public void changeFragmentShader(java.lang.String fragmentShader)
public void awaitNewImage()
public void drawImage()
public void onFrameAvailable(android.graphics.SurfaceTexture st)
onFrameAvailable
in interface android.graphics.SurfaceTexture.OnFrameAvailableListener
public android.view.Surface getSurface()
public void release()
public void makeCurrent()
public boolean swapBuffers()
public void setPresentationTime(long nsecs)