VideoFrameProcessorTestRunner.SurfaceBitmapReader


public final class VideoFrameProcessorTestRunner.SurfaceBitmapReader implements VideoFrameProcessorTestRunner.BitmapReader


Reads from a Surface. Only supports SDR input.

Summary

Public fields

final boolean

Public constructors

SurfaceBitmapReader(boolean releaseOutputSurface)

Creates an instance.

Public methods

Bitmap

Returns the output Bitmap.

@Nullable Surface
getSurface(
    int width,
    int height,
    boolean useHighPrecisionColorComponents
)

Returns the VideoFrameProcessor output Surface, if one is needed.

Public fields

releaseOutputSurface

public final boolean releaseOutputSurface

Public constructors

SurfaceBitmapReader

public SurfaceBitmapReader(boolean releaseOutputSurface)

Creates an instance.

Parameters
boolean releaseOutputSurface

Whether the VideoFrameProcessor output Surface must be released at calls to getSurface.

Public methods

getBitmap

public Bitmap getBitmap()

Returns the output Bitmap.

getSurface

public @Nullable Surface getSurface(
    int width,
    int height,
    boolean useHighPrecisionColorComponents
)

Returns the VideoFrameProcessor output Surface, if one is needed.