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.

class VideoEncoderInputSurface(surface: <ERROR CLASS>)

Constructors

VideoEncoderInputSurface
Link copied to clipboard
fun VideoEncoderInputSurface(surface: <ERROR CLASS>)

Types

Companion
Link copied to clipboard
object Companion

Functions

disable
Link copied to clipboard
fun disable()
enable
Link copied to clipboard

Makes our EGL context and surface current.

fun enable()
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
release
Link copied to clipboard

Discards all resources held by this class, notably the EGL context. Also releases the Surface that was passed to our constructor.

fun release()
setPresentationTime
Link copied to clipboard

Sends the presentation time stamp to EGL. Time is expressed in nanoseconds.

fun setPresentationTime(nanosecs: Long)
swapBuffers
Link copied to clipboard

Calls eglSwapBuffers. Use this to "publish" the current frame.

fun swapBuffers(): Boolean
toString
Link copied to clipboard
open override fun toString(): String