From 1bd2eb24ee4b3566a2249fbbc8ffa55f75901eca Mon Sep 17 00:00:00 2001
From: jiangdongguo <765067602@qq.com>
Date: Sat, 11 Nov 2017 21:39:10 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BE=E7=BD=AE=E4=B8=8D?=
=?UTF-8?q?=E5=90=8CCameraViewInterface=EF=BC=8C=E9=87=8D=E5=90=AFCamera?=
=?UTF-8?q?=E5=A4=B1=E8=B4=A5Bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../usbcamera/view/USBCameraActivity.java | 4 +++-
.../main/res/layout/activity_usbcamera.xml | 7 +++++++
.../jiangdg/usbcamera/USBCameraManager.java | 21 ++-----------------
3 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/app/src/main/java/com/jiangdg/usbcamera/view/USBCameraActivity.java b/app/src/main/java/com/jiangdg/usbcamera/view/USBCameraActivity.java
index ca809a4..9ea4ceb 100644
--- a/app/src/main/java/com/jiangdg/usbcamera/view/USBCameraActivity.java
+++ b/app/src/main/java/com/jiangdg/usbcamera/view/USBCameraActivity.java
@@ -42,6 +42,8 @@ import butterknife.OnClick;
public class USBCameraActivity extends AppCompatActivity implements CameraDialog.CameraDialogParent{
@BindView(R.id.camera_view)
public View mTextureView;
+ @BindView(R.id.camera_view2)
+ public View mTextureView2;
@BindView(R.id.btn_capture_pic)
public Button mBtnCapture;
@BindView(R.id.btn_rec_video)
@@ -140,7 +142,7 @@ public class USBCameraActivity extends AppCompatActivity implements CameraDialog
case R.id.btn_restart_camera:
if(mUSBManager == null)
return;
- mUSBManager.restartUSBCamera(mUVCCameraView,new USBCameraManager.OnPreviewListener() {
+ mUSBManager.restartUSBCamera((CameraViewInterface) mTextureView2,new USBCameraManager.OnPreviewListener() {
@Override
public void onPreviewResult(boolean isSuccess) {
if(isSuccess) {
diff --git a/app/src/main/res/layout/activity_usbcamera.xml b/app/src/main/res/layout/activity_usbcamera.xml
index a737bc6..16c2ab1 100644
--- a/app/src/main/res/layout/activity_usbcamera.xml
+++ b/app/src/main/res/layout/activity_usbcamera.xml
@@ -14,6 +14,13 @@
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"/>
+
+