Camera.IPreviewCallback.OnPreviewFrame(Byte[], Camera) 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.
Caution
deprecated
Called as preview frames are displayed.
[Android.Runtime.Register("onPreviewFrame", "([BLandroid/hardware/Camera;)V", "GetOnPreviewFrame_arrayBLandroid_hardware_Camera_Handler:Android.Hardware.Camera/IPreviewCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[System.Obsolete("deprecated")]
public void OnPreviewFrame (byte[]? data, Android.Hardware.Camera? camera);
[<Android.Runtime.Register("onPreviewFrame", "([BLandroid/hardware/Camera;)V", "GetOnPreviewFrame_arrayBLandroid_hardware_Camera_Handler:Android.Hardware.Camera/IPreviewCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<System.Obsolete("deprecated")>]
abstract member OnPreviewFrame : byte[] * Android.Hardware.Camera -> unit
Parameters
- data
- Byte[]
the contents of the preview frame in the format defined
by android.graphics.ImageFormat
, which can be queried
with android.hardware.Camera.Parameters#getPreviewFormat()
.
If android.hardware.Camera.Parameters#setPreviewFormat(int)
is never called, the default will be the YCbCr_420_SP
(NV21) format.
- camera
- Camera
the Camera service object.
- Attributes
Remarks
Called as preview frames are displayed. This callback is invoked on the event thread #open(int)
was called from.
If using the android.graphics.ImageFormat#YV12
format, refer to the equations in Camera.Parameters#setPreviewFormat
for the arrangement of the pixel data in the preview callback buffers.
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.