android.hardware.camera2
API for new
applications.@Deprecated public static interface Camera.PreviewCallback
Modifier and Type | Method and Description |
---|---|
void |
onPreviewFrame(byte[] data,
Camera camera)
Deprecated.
Called as preview frames are displayed.
|
void onPreviewFrame(byte[] data, Camera camera)
Camera.open(int)
was called from.
If using the ImageFormat.YV12
format,
refer to the equations in Camera.Parameters.setPreviewFormat(int)
for the arrangement of the pixel data in the preview callback
buffers.
data
- the contents of the preview frame in the format defined
by ImageFormat
, which can be queried
with Camera.Parameters.getPreviewFormat()
.
If Camera.Parameters.setPreviewFormat(int)
is never called, the default will be the YCbCr_420_SP
(NV21) format.camera
- the Camera service object.