public static interface Camera.PreviewCallback
| android.hardware.Camera.PreviewCallback |
该接口在API级别21中已被弃用。
我们建议将新的android.hardware.camera2 API用于新应用程序。
回调界面用于在预览框架显示时提供预览框架的副本。
也可以看看:
公共方法(Public methods) |
|
|---|---|
abstract void |
onPreviewFrame(byte[] data, Camera camera) 在预览框被显示时调用。 |
void onPreviewFrame (byte[] data,
Camera camera)
在预览框被显示时调用。 此回调在事件线程open(int)被调用时调用。
如果使用 YV12格式,请参阅 YV12中的等式, setPreviewFormat(int)预览回调缓冲区中像素数据的排列方式。
| 参数(Parameters) | |
|---|---|
data |
byte: the contents of the preview frame in the format defined by ImageFormat, which can be queried with getPreviewFormat(). If setPreviewFormat(int) is never called, the default will be the YCbCr_420_SP (NV21) format. |
camera |
Camera: the Camera service object. |