Files
MoGoEagleEye/libraries/map-usbcamera/src/main/java/com/mogo/usbcamera/USBCameraHelper.java
donghongyu 353e8492b9 [Change]
修改速度取值,更新行车记录仪代码。
DEMO必须依附于预览获取YUV数据,不符合需求,这里先接入直播,后续需要按照源码抽离直接通过USB获取YUV的服务

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
2022-02-24 17:47:33 +08:00

40 lines
778 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.mogo.usbcamera;
import com.serenegiant.usb.USBMonitor;
/**
* @author donghongyu
* USB摄像头方案获取权限、获取YUV数据
*/
public class USBCameraHelper {
private static USBCameraHelper mCameraHelper;
/**
* USB Manager
*/
private USBMonitor mUSBMonitor;
private USBCameraHelper() {
}
public static USBCameraHelper getInstance() {
if (mCameraHelper == null) {
mCameraHelper = new USBCameraHelper();
}
return mCameraHelper;
}
public void registerUSB() {
if (mUSBMonitor != null) {
mUSBMonitor.register();
}
}
public void unregisterUSB() {
if (mUSBMonitor != null) {
mUSBMonitor.unregister();
}
}
}