public class TextureMovieEncoder
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
static class |
TextureMovieEncoder.EncoderConfig
Encoder configuration.
|
static class |
TextureMovieEncoder.EncoderHandler
Handles encoder state change requests.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MSG_ENCODER_SAVEFRAME |
| Constructor and Description |
|---|
TextureMovieEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
frameAvailable(android.graphics.SurfaceTexture st)
Tells the video recorder that a new frame is available.
|
TextureMovieEncoder.EncoderHandler |
getHandler() |
void |
handleFrameAvailable(float[] transform,
long timestampNanos)
Handles notification of an available frame.
|
boolean |
isRecording()
Returns true if recording has been started.
|
void |
run()
Encoder thread entry point.
|
void |
saveFrame(ScreenShot screenShot)
This checks for the existence of an inputsurface
and if it exists, simply calls the inputWindowSurface saveframe method.
|
void |
setTextureId(int id)
Tells the video recorder what texture name to use.
|
void |
startRecording(TextureMovieEncoder.EncoderConfig config)
Tells the video recorder to start recording.
|
void |
stopRecording()
Tells the video recorder to stop recording.
|
void |
updateSharedContext(android.opengl.EGLContext sharedContext)
Tells the video recorder to refresh its EGL surface.
|
public static final int MSG_ENCODER_SAVEFRAME
public void startRecording(TextureMovieEncoder.EncoderConfig config)
public void stopRecording()
public boolean isRecording()
public void updateSharedContext(android.opengl.EGLContext sharedContext)
public void frameAvailable(android.graphics.SurfaceTexture st)
public void setTextureId(int id)
public void run()
run in interface java.lang.RunnableThread.run()public void saveFrame(ScreenShot screenShot)
screenShot - public void handleFrameAvailable(float[] transform,
long timestampNanos)
transform - The texture transform, from SurfaceTexture.timestampNanos - The frame's timestamp, from SurfaceTexture.public TextureMovieEncoder.EncoderHandler getHandler()