CameraCaptureSession.StateCallback.OnSurfacePrepared Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method is called when the buffer pre-allocation for an output Surface is complete.
[Android.Runtime.Register("onSurfacePrepared", "(Landroid/hardware/camera2/CameraCaptureSession;Landroid/view/Surface;)V", "GetOnSurfacePrepared_Landroid_hardware_camera2_CameraCaptureSession_Landroid_view_Surface_Handler", ApiSince=23)]
public virtual void OnSurfacePrepared (Android.Hardware.Camera2.CameraCaptureSession session, Android.Views.Surface surface);
[<Android.Runtime.Register("onSurfacePrepared", "(Landroid/hardware/camera2/CameraCaptureSession;Landroid/view/Surface;)V", "GetOnSurfacePrepared_Landroid_hardware_camera2_CameraCaptureSession_Landroid_view_Surface_Handler", ApiSince=23)>]
abstract member OnSurfacePrepared : Android.Hardware.Camera2.CameraCaptureSession * Android.Views.Surface -> unit
override this.OnSurfacePrepared : Android.Hardware.Camera2.CameraCaptureSession * Android.Views.Surface -> unit
Parameters
- session
- CameraCaptureSession
the session returned by #onConfigured
- surface
- Surface
the Surface that was used with the #prepare
call.
- Attributes
Remarks
This method is called when the buffer pre-allocation for an output Surface is complete.
Buffer pre-allocation for an output Surface is started by the #prepare
call. While allocation is underway, the Surface must not be used as a capture target. Once this callback fires, the output Surface provided can again be used as a target for a capture request.
In case of a error during pre-allocation (such as running out of suitable memory), this callback is still invoked after the error is encountered, though some buffers may not have been successfully pre-allocated.
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.