MediaCodec can render directly to a Surface, which can be setted by the configure method:
public void configure (MediaFormat format,
Surface surface,
MediaCrypto crypto,
int flags)
I have working code that renders to a SurfaceTexture
. Also, Surface
's documentation says that
A Surface is generally created by or from a consumer of image buffers (such as a SurfaceTexture, MediaRecorder, or Allocation),
But I didn't find any methods in SurfaceTexture
or Surface
that permits conversion between them