Sdílet prostřednictvím


ImageReader.Surface Property

Definition

Get a Surface that can be used to produce Image Images for this ImageReader.

public virtual Android.Views.Surface? Surface { [Android.Runtime.Register("getSurface", "()Landroid/view/Surface;", "GetGetSurfaceHandler")] get; }
[<get: Android.Runtime.Register("getSurface", "()Landroid/view/Surface;", "GetGetSurfaceHandler")>]
member this.Surface : Android.Views.Surface

Property Value

A Surface to use for a drawing target for various APIs.

Attributes

Remarks

Get a Surface that can be used to produce Image Images for this ImageReader.

Until valid image data is rendered into this Surface, the #acquireNextImage method will return null. Only one source can be producing data into this Surface at the same time, although the same Surface can be reused with a different API once the first source is disconnected from the Surface.

Please note that holding on to the Surface object returned by this method is not enough to keep its parent ImageReader from being reclaimed. In that sense, a Surface acts like a java.lang.ref.WeakReference weak reference to the ImageReader that provides it.

Java documentation for android.media.ImageReader.getSurface().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to