class VideoEncoderInputSurface
Holds state associated with a Surface used for MediaCodec encoder input.
The constructor takes a Surface obtained from MediaCodec.createInputSurface(), and uses that to create an EGL window surface. Calls to eglSwapBuffers() cause a frame of data to be sent to the video encoder.
This object owns the Surface -- releasing this will release the Surface too.
static class Companion |
VideoEncoderInputSurface(surface: NonExistentClass)
Holds state associated with a Surface used for MediaCodec encoder input. |
fun disable(): void |
|
fun enable(): void
Makes our EGL context and surface current. |
|
fun release(): void
Discards all resources held by this class, notably the EGL context. Also releases the Surface that was passed to our constructor. |
|
fun setPresentationTime(nanosecs: long): void
Sends the presentation time stamp to EGL. Time is expressed in nanoseconds. |
|
fun swapBuffers(): boolean
Calls eglSwapBuffers. Use this to "publish" the current frame. |
Companion |