ImageReaderSurfaceHolder


@ExperimentalApi
public final class ImageReaderSurfaceHolder implements SurfaceHolder, AutoCloseable


An implementation of SurfaceHolder which is backed by an ImageReader.

Summary

Public constructors

Public methods

void
void
void

Drains the ImageReader so more frames can be queued to the Surface.

Surface
Rect
boolean
Canvas
Canvas
void
void
setFixedSize(int width, int height)
void
setFormat(int format)
void
setKeepScreenOn(boolean screenOn)
void
void
setType(int type)

This method is deprecated.

void

Inherited Constants

From android.view.SurfaceHolder
static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

static final int

This field is deprecated.

Public fields

imageReader

public @Nullable ImageReader imageReader

Public constructors

ImageReaderSurfaceHolder

public ImageReaderSurfaceHolder(Handler handler)

Public methods

addCallback

public void addCallback(SurfaceHolder.Callback callback)

close

public void close()

drainSurface

public void drainSurface()

Drains the ImageReader so more frames can be queued to the Surface.

getSurface

public Surface getSurface()

getSurfaceFrame

public Rect getSurfaceFrame()

isCreating

public boolean isCreating()

lockCanvas

public Canvas lockCanvas()

lockCanvas

public Canvas lockCanvas(Rect dirty)

removeCallback

public void removeCallback(SurfaceHolder.Callback callback)

setFixedSize

public void setFixedSize(int width, int height)

setFormat

public void setFormat(int format)

setKeepScreenOn

public void setKeepScreenOn(boolean screenOn)

setSizeFromLayout

public void setSizeFromLayout()

setType

public void setType(int type)

unlockCanvasAndPost

public void unlockCanvasAndPost(Canvas canvas)