AndroidSurfaceVideoRenderer
The renderer as a caller builds it: pictures are drawn into surface from this renderer's own thread.
surface is stored and never released here. Close this renderer before releasing or replacing it.
Parameters
converts a frame to tightly packed RGBA, one byte per component, no row padding.
Builds a renderer before its display Surface exists.
Attach this renderer before opening media so its paired MediaCodec factory participates in decoder selection, then forward every Surface lifecycle change through setSurface. Software frames still use convert as a fallback. onOverlay should draw into a separate view above the Surface because MediaCodec owns the video Surface while the direct path is active.
toneMapped answers whether convert rolls a frame's HDR off to SDR, because only the converter knows. The renderer then reports RendererEvent.ToneMapEngaged. The default answers false, for a converter that never tone maps.
onVideoGeometry hears the stored size, the turn and the crop of the pictures MediaCodec writes straight into the Surface. Nothing draws those pictures, so the view that owns the Surface is what hides the cropped edges (#497).