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.
VideoEncoderInputSurface(surface: <ERROR CLASS>)
Holds state associated with a Surface used for MediaCodec encoder input. |
fun disable(): Unit |
|
fun enable(): Unit
Makes our EGL context and surface current. |
|
fun release(): Unit
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): Unit
Sends the presentation time stamp to EGL. Time is expressed in nanoseconds. |
|
fun swapBuffers(): Boolean
Calls eglSwapBuffers. Use this to "publish" the current frame. |
infix fun <A> A.andRecycle(b: <ERROR CLASS>): <ERROR CLASS> infix fun <A> A.andRecycle(b: Recyclable): <ERROR CLASS> |
|
fun <T> T.loopAsLongNotNull(block: (it: T) -> T?): T |