一开始以为是光照暗的时候开灯,后来把感光器挡住,微信扫一扫依然不会提示开灯,所以猜想:应该是与被扫描对象的亮暗程度进行判断是否开灯。
此功能已实现,核心原理如下:
解码预览帧对象,包括宽高
@param data The YUV preview frame.
* @param width The width of the preview frame.
* @param height The height of the preview frame.
decode((byte[]) message.obj, message.arg1, message.arg2);
具体解码过程:
/**
* Decode the data within the viewfinder rectangle, and time how long it took. For efficiency,
* reuse the same reader objects from one decode to the next.
*
* @param data The YUV preview frame.
* @param width The width of the preview fram