-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After multiple attempts to open the UVC camera, it fails to reopen. Assistance is requested #694
Comments
package com.bete.cellcounter.ui.view; import static com.myutils.Canstant.HOME_ADMIN_NUM; import android.content.Context; import androidx.annotation.NonNull; import com.bete.cellcounter.R; import java.io.File; import kotlin.jvm.internal.Intrinsics; public class OnlyCameraView extends BaseView implements ICameraStateCallBack {
//// g_camera_setting.setCamera_Contrast(contrast);
// iscallBack = true;
// g_camera_path = "/sdcard/CellCounter/DataTest/src_16774768359881.png";
// cv_view = view.findViewById(R.id.cv_view);
// private void handleSurfaceView(AspectRatioSurfaceView surfaceView) {
// g_camera_path = path;
// activity.checkMainView(0);
// LogUtils.e("camera result is : registerMultiCamera " + mCameraClient);
// LogUtils.e("camera result is : " + device);
// List deviceList = getDeviceList();
// Toast.makeText(mContext, "调用了设备拔出的广播 1111 ! mDeviceId " + mDeviceId + " device " + device.getDeviceId(), Toast.LENGTH_LONG).show();
// }
// if (mDeviceId != device.getDeviceId()) {
// if (mDeviceId != device.getDeviceId()) {
// Surface mySurface;
// if (mCurrentCamera == null) {
//\ LogUtils.e("11111111");
// LogUtils.i("开始打开相机,调用这个方法会让相机重新进行创建 ");
// .setPreviewWidth(640)
// setProgress();
// asp_artv.setBackgroundColor(ContextCompat.getColor(mContext,R.color.red)); |
"The above content represents the implementation approach of my code." |
"Hello, let me provide an overview of our usage pattern. We frequently need to open and close the camera multiple times. However, after repeated openings, we noticed significant heating of the equipment. To address this, we adopted a strategy where we open the camera only for the first instance and subsequently handle openings through the stream object.
During our experiments, we observed that multiple openings and closings of the stream object lead to frequent changes in the USB device numbers under the
/dev/bus/usb/001
directory.Currently, we are facing three issues:
mCurrentCamera
NullPointerException./dev/bus/usb/001
.We would appreciate guidance on how to resolve these issues. Thank you."
The text was updated successfully, but these errors were encountered: