diff --git a/libusbcamera/libusbcamera.iml b/libusbcamera/libusbcamera.iml index 013d57c..6f13e12 100644 --- a/libusbcamera/libusbcamera.iml +++ b/libusbcamera/libusbcamera.iml @@ -67,14 +67,6 @@ - - - - - - - - @@ -83,6 +75,14 @@ + + + + + + + + diff --git a/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java b/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java index c81ea2d..5d2fca1 100644 --- a/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java +++ b/libusbcamera/src/main/java/com/jiangdg/usbcamera/USBCameraManager.java @@ -198,7 +198,7 @@ public class USBCameraManager{ } }); } - + /** * 注册检测USB设备广播接收器 * */ diff --git a/libusbcamera/src/main/java/com/serenegiant/usb/widget/UVCCameraTextureView.java b/libusbcamera/src/main/java/com/serenegiant/usb/widget/UVCCameraTextureView.java index 7813a11..16ab871 100644 --- a/libusbcamera/src/main/java/com/serenegiant/usb/widget/UVCCameraTextureView.java +++ b/libusbcamera/src/main/java/com/serenegiant/usb/widget/UVCCameraTextureView.java @@ -79,7 +79,10 @@ public class UVCCameraTextureView extends AspectRatioTextureView // API >= 14 @Override public void onResume() { if (DEBUG) Log.v(TAG, "onResume:"); - if (mHasSurface) { +// if (mHasSurface) { +// mRenderHandler = RenderHandler.createHandler(mFpsCounter, super.getSurfaceTexture(), getWidth(), getHeight()); +// } + if (mRenderHandler == null) { mRenderHandler = RenderHandler.createHandler(mFpsCounter, super.getSurfaceTexture(), getWidth(), getHeight()); } } @@ -87,10 +90,10 @@ public class UVCCameraTextureView extends AspectRatioTextureView // API >= 14 @Override public void onPause() { if (DEBUG) Log.v(TAG, "onPause:"); - if (mRenderHandler != null) { - mRenderHandler.release(); - mRenderHandler = null; - } +// if (mRenderHandler != null) { +// mRenderHandler.release(); +// mRenderHandler = null; +// } if (mTempBitmap != null) { mTempBitmap.recycle(); mTempBitmap = null;