Skip to content
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

🐛 The given Camera device could not be found for use-case binding! #727

Closed
3 of 4 tasks
Angelk90 opened this issue Jan 10, 2022 · 42 comments · Fixed by #1466
Closed
3 of 4 tasks

🐛 The given Camera device could not be found for use-case binding! #727

Angelk90 opened this issue Jan 10, 2022 · 42 comments · Fixed by #1466
Labels
🤖 android Issue affects the Android platform 🐛 bug Something isn't working

Comments

@Angelk90
Copy link

Angelk90 commented Jan 10, 2022

What were you trying to do?

I clone the project: https://github.com/mrousavy/react-native-vision-camera

I tried to run the example file, after many problems, I was able to run it on an android physical device.

Reproduceable Code

No response

What happened instead?

Schermata 2022-01-10 alle 12 42 46

image

Main camera appears to be out of order, screen all black.

The secondary camera (the one for video calls for example) seems to be working.

When I try to take a photo with the secondary camera, I get this:

image

You don't even see the HDR icon.

image

Everything seems to go very slow, opening the app.

The photo does not take it, but the video does it record.

@mrousavy : What am I doing wrong?

Relevant log output

No response

Device

motorola one (xt1941-4)

VisionCamera Version

2.11.2

Additional information

@Angelk90 Angelk90 added the 🐛 bug Something isn't working label Jan 10, 2022
@Angelk90
Copy link
Author

@mrousavy :

Tablet Samsung Tab A(2016):

It does not work of the two cameras.

Schermata 2022-01-10 alle 13 26 53

Motorola one fusion+:

Main camera does not work.
Schermata 2022-01-10 alle 13 40 32

@mrousavy
Copy link
Owner

This is indeed very weird, possibly a CameraX bug. Can you share the adb logs?

@mrousavy mrousavy added the 🤖 android Issue affects the Android platform label Jan 10, 2022
@Angelk90
Copy link
Author

@mrousavy : It doesn't work with any of the physical android devices I've tried.

01-10 16:19:05.292  3628  3686 I ReactNativeJS: Re-rendering camera page with active camera. Device: "back (0)" (3840x2160 @ 60fps)
01-10 16:19:05.340  3628  3628 I CameraView: Configuring session...
01-10 16:19:05.341  3628  3628 I CameraView: Configuring session with Camera ID 0 and custom format...
01-10 16:19:05.350  3628  3628 I CameraView: Using custom format - photo: 3840x2160, video: 3840x2160 @ 60 FPS
01-10 16:19:05.351  3628  3628 I CameraView: Setting AE_TARGET_FPS_RANGE to 60-60, and SENSOR_FRAME_DURATION to 0
01-10 16:19:05.352  3628  3628 D Recorder: Video source has transitioned to state: INACTIVE
01-10 16:19:05.355  3628  3628 D DeferrableSurface: surface closed,  useCount=1 closed=true androidx.camera.core.SurfaceRequest$2@51e30e1
01-10 16:19:05.355  3628  3628 D DeferrableSurface: surface closed,  useCount=1 closed=true androidx.camera.core.SurfaceRequest$2@c1c8492
01-10 16:19:05.355  3628  3628 D DeferrableSurface: surface closed,  useCount=1 closed=true androidx.camera.core.impl.ImmediateSurface@b913dbf
01-10 16:19:05.356  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Use cases [androidx.camera.core.Preview-b353fc59-4218-4dfb-8e33-97d4ddb52195142067502, androidx.camera.video.VideoCapture-ae066d4d-c72d-4c51-8e7c-6a4be45ec6d688343247, androidx.camera.core.ImageAnalysis-3cd47eb4-249d-483e-9c11-772505a2ce2232142428] now DETACHED for camera
01-10 16:19:05.356  3628  3628 I CameraView: Adding VideoCapture use-case...
01-10 16:19:05.356  3628  3756 D UseCaseAttachState: All use case: [] for camera: 1
01-10 16:19:05.357  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Resetting Capture Session
01-10 16:19:05.361  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Releasing session in state OPENED
01-10 16:19:05.361  3628  3756 D UseCaseAttachState: Active and attached use case: [] for camera: 1
01-10 16:19:05.363  3628  3628 I CameraView: Tried to add photo use-case (`photo={true}`) but the Camera device only supports a single use-case at a time. Falling back to Snapshot capture.
01-10 16:19:05.363  3628  3628 I CameraView: Adding ImageAnalysis use-case...
01-10 16:19:05.364  3628  3756 D UseCaseAttachState: Active and attached use case: [] for camera: 1
01-10 16:19:05.364  3628  3628 I CameraView: Attaching 2 use-cases...
01-10 16:19:05.365  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Closing camera.
01-10 16:19:05.366  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Transitioning camera internal state: OPENED --> CLOSING
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: Recalculating open cameras:
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: Camera                                       State                 
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: -------------------------------------------------------------------
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: Camera@2acd80c[id=1]                         CLOSING               
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: Camera@39bde0[id=0]                          UNKNOWN               
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: -------------------------------------------------------------------
01-10 16:19:05.367  3628  3756 D CameraStateRegistry: Open count: 1 (Max allowed: 1)
01-10 16:19:05.368  3628  3756 D CameraStateMachine: New public camera state CameraState{type=CLOSING, error=null} from CLOSING and null
01-10 16:19:05.368  3628  3756 D CameraStateMachine: Publishing new public camera state CameraState{type=CLOSING, error=null}
01-10 16:19:05.369  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Resetting Capture Session
01-10 16:19:05.371  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Releasing session in state CLOSING
01-10 16:19:05.373  3628  3756 D CaptureSession: onSessionFinished()
01-10 16:19:05.374  3222  3222 I CameraService: Camera : Shutting down 3628 score 0
01-10 16:19:05.375  3222  3222 W libc    : Unable to set property "camera.mot.is.client.foreground" to "1": error code: 0x18
01-10 16:19:05.376  3460 12630 I QCameraHalWatchdog: Starting Watchdog Thread...
01-10 16:19:05.378  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=8, fileFormat=2, videoCodec=2, videoBitRate=42000000, videoFrameRate=30, videoFrameWidth=3840, videoFrameHeight=2160, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.378  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=6, fileFormat=2, videoCodec=2, videoBitRate=17000000, videoFrameRate=30, videoFrameWidth=1920, videoFrameHeight=1080, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.379  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=5, fileFormat=2, videoCodec=2, videoBitRate=10000000, videoFrameRate=30, videoFrameWidth=1280, videoFrameHeight=720, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.379  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=4, fileFormat=2, videoCodec=2, videoBitRate=6000000, videoFrameRate=30, videoFrameWidth=720, videoFrameHeight=480, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.380  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=8, fileFormat=2, videoCodec=2, videoBitRate=42000000, videoFrameRate=30, videoFrameWidth=3840, videoFrameHeight=2160, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.381  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=6, fileFormat=2, videoCodec=2, videoBitRate=17000000, videoFrameRate=30, videoFrameWidth=1920, videoFrameHeight=1080, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.381  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=5, fileFormat=2, videoCodec=2, videoBitRate=10000000, videoFrameRate=30, videoFrameWidth=1280, videoFrameHeight=720, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.382  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=4, fileFormat=2, videoCodec=2, videoBitRate=6000000, videoFrameRate=30, videoFrameWidth=720, videoFrameHeight=480, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.382  3628  3628 D QualitySelector: supportedQualities = [ConstantQuality{value=8, name=UHD}, ConstantQuality{value=6, name=FHD}, ConstantQuality{value=5, name=HD}, ConstantQuality{value=4, name=SD}]
01-10 16:19:05.382  3628  3628 D QualitySelector: Select quality by fallbackStrategy = RuleStrategy{fallbackQuality=ConstantQuality{value=-1, name=NONE}, fallbackRule=0}
01-10 16:19:05.382  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30004 stream type=4
01-10 16:19:05.382  3628  3628 D VideoCapture: Found selectedQualities [ConstantQuality{value=8, name=UHD}] by QualitySelector{preferredQualities=[ConstantQuality{value=8, name=UHD}], fallbackStrategy=RuleStrategy{fallbackQuality=ConstantQuality{value=-1, name=NONE}, fallbackRule=0}}
01-10 16:19:05.382  3211  4039 I mm-camera: <CPP   >< INFO> 4173: cpp_module_handle_streamoff_event: info: doing stream-off for identity 0x30004
01-10 16:19:05.383  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=8, fileFormat=2, videoCodec=2, videoBitRate=42000000, videoFrameRate=30, videoFrameWidth=3840, videoFrameHeight=2160, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.383  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=6, fileFormat=2, videoCodec=2, videoBitRate=17000000, videoFrameRate=30, videoFrameWidth=1920, videoFrameHeight=1080, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.384  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=5, fileFormat=2, videoCodec=2, videoBitRate=10000000, videoFrameRate=30, videoFrameWidth=1280, videoFrameHeight=720, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.384  3628  3628 D VideoCapabilities: profile = CamcorderProfileProxy{duration=30, quality=4, fileFormat=2, videoCodec=2, videoBitRate=6000000, videoFrameRate=30, videoFrameWidth=720, videoFrameHeight=480, audioCodec=3, audioBitRate=320000, audioSampleRate=48000, audioChannels=2}
01-10 16:19:05.384  3628  3628 D VideoCapture: Set supported resolutions = [3840x2160]
01-10 16:19:05.389  3628  3628 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
01-10 16:19:05.390  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 266670000 BW avg 361112256 BW inst 361112256
01-10 16:19:05.390  3211  4039 I mm-camera: <CPP   >< INFO> 4358: cpp_module_handle_streamoff_event: info: stream-off done for identity 0x30004
01-10 16:19:05.391  3628  3628 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
01-10 16:19:05.393  3628  3628 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
01-10 16:19:05.394  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30004, stream type=4
01-10 16:19:05.394  3628  3628 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
01-10 16:19:05.395  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30002 stream type=1
01-10 16:19:05.395  3211  4039 I mm-camera: <CPP   >< INFO> 4173: cpp_module_handle_streamoff_event: info: doing stream-off for identity 0x30002
01-10 16:19:05.395  3211  4039 I mm-camera: <CPP   >< INFO> 4358: cpp_module_handle_streamoff_event: info: stream-off done for identity 0x30002
01-10 16:19:05.396  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30002, stream type=1
01-10 16:19:05.396  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 266670000 BW avg 298904256 BW inst 298904256
01-10 16:19:05.397  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30003 stream type=5
01-10 16:19:05.398  3211  4039 I mm-camera: <CPP   >< INFO> 4173: cpp_module_handle_streamoff_event: info: doing stream-off for identity 0x30003
01-10 16:19:05.399  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 100000000 BW avg 0 BW inst 0
01-10 16:19:05.399  3211  4039 I mm-camera: <CPP   >< INFO> 4358: cpp_module_handle_streamoff_event: info: stream-off done for identity 0x30003
01-10 16:19:05.403  3211  4039 I mm-camera: <MCT   >< INFO> 223: stop_sof_check_thread: Stopping SOF timeout thread session =3
01-10 16:19:05.403  3211  4079 I mm-camera: <MCT   >< INFO> 149: mct_bus_sof_thread_run: Closing SOF tracker thread
01-10 16:19:05.404  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30003, stream type=5
01-10 16:19:05.405  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30001 stream type=7
01-10 16:19:05.405  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30001, stream type=7
01-10 16:19:05.423  3628  3628 E CameraView: Failed to configure session: No supported surface combination is found for camera device - Id : 0 and Hardware level: 3. May be the specified resolution is too large and not supported. Existing surfaces: [] New configs: [androidx.camera.core.impl.PreviewConfig@2b14f04, androidx.camera.video.impl.VideoCaptureConfig@caa0ced, androidx.camera.core.impl.ImageAnalysisConfig@a5e722]
01-10 16:19:05.423  3628  3628 E CameraView: update() threw: [device/invalid-device] The given Camera device could not be found for use-case binding!
01-10 16:19:05.423  3628  3628 E CameraView: invokeOnError(...):
01-10 16:19:05.424  3628  3628 W System.err: com.mrousavy.camera.InvalidCameraDeviceError: [device/invalid-device] The given Camera device could not be found for use-case binding!
01-10 16:19:05.424  3628  3628 W System.err: 	at com.mrousavy.camera.CameraView.configureSession(CameraView.kt:517)
01-10 16:19:05.424  3628  3628 W System.err: 	at com.mrousavy.camera.CameraView.access$configureSession(CameraView.kt:68)
01-10 16:19:05.424  3628  3628 W System.err: 	at com.mrousavy.camera.CameraView$update$1$1.invokeSuspend(CameraView.kt:325)
01-10 16:19:05.424  3628  3628 W System.err: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
01-10 16:19:05.424  3628  3628 W System.err: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
01-10 16:19:05.424  3628  3628 W System.err: 	at android.os.Handler.handleCallback(Handler.java:883)
01-10 16:19:05.424  3628  3628 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:100)
01-10 16:19:05.424  3628  3628 W System.err: 	at android.os.Looper.loop(Looper.java:241)
01-10 16:19:05.424  3628  3628 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:7617)
01-10 16:19:05.424  3628  3628 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
01-10 16:19:05.424  3628  3628 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
01-10 16:19:05.424  3628  3628 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
01-10 16:19:05.425  3628  3628 W System.err: Caused by: java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0 and Hardware level: 3. May be the specified resolution is too large and not supported. Existing surfaces: [] New configs: [androidx.camera.core.impl.PreviewConfig@2b14f04, androidx.camera.video.impl.VideoCaptureConfig@caa0ced, androidx.camera.core.impl.ImageAnalysisConfig@a5e722]
01-10 16:19:05.425  3628  3628 W System.err: 	at androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:280)
01-10 16:19:05.425  3628  3628 W System.err: 	at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:532)
01-10 16:19:05.425  3628  3628 W System.err: 	at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:360)
01-10 16:19:05.425  3628  3628 W System.err: 	at com.mrousavy.camera.CameraView.configureSession(CameraView.kt:500)
01-10 16:19:05.425  3628  3628 W System.err: 	... 11 more
01-10 16:19:05.430  3628  3686 E ReactNativeJS: { [device/invalid-device: [device/invalid-device] The given Camera device could not be found for use-case binding!]
01-10 16:19:05.430  3628  3686 E ReactNativeJS:   name: 'device/invalid-device',
01-10 16:19:05.430  3628  3686 E ReactNativeJS:   _code: 'device/invalid-device',
01-10 16:19:05.430  3628  3686 E ReactNativeJS:   _message: '[device/invalid-device] The given Camera device could not be found for use-case binding!',
01-10 16:19:05.430  3628  3686 E ReactNativeJS:   _cause: 
01-10 16:19:05.430  3628  3686 E ReactNativeJS:    { stacktrace: 'java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0 and Hardware level: 3. May be the specified resolution is too large and not supported. Existing surfaces: [] New configs: [androidx.camera.core.impl.PreviewConfig@2b14f04, androidx.camera.video.impl.VideoCaptureConfig@caa0ced, androidx.camera.core.impl.ImageAnalysisConfig@a5e722]\n\tat androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:280)\n\tat androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:532)\n\tat androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:360)\n\tat com.mrousavy.camera.CameraView.configureSession(CameraView.kt:500)\n\tat com.mrousavy.camera.CameraView.access$configureSession(CameraView.kt:68)\n\tat com.mrousavy.camera.CameraView$update$1$1.invokeSuspend(CameraView.kt:325)\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)\n\tat android.os.Handler.handleCallback(Handler.java:883)\n\tat android.os.Handler.dispatchMessage(Handler.java:100)\n\tat android.os.Looper.loop(Looper.java:241)\n\tat android.app.ActivityThread.main(ActivityThread.java:7617)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)\n',
01-10 16:19:05.430  3628  3686 E ReactNativeJS:      message: 'No supported surface combination is found for camera device - Id : 0 and Hardware level: 3. May be the specified resolution is too large and not supported. Existing surfaces: [] New configs: [androidx.camera.core.impl.PreviewConfig@2b14f04, androidx.camera.video.impl.VideoCaptureConfig@caa0ced, androidx.camera.core.impl.ImageAnalysisConfig@a5e722]' } }
01-10 16:19:05.433  3628  3628 D StreamStateObserver: Update Preview stream state to IDLE
01-10 16:19:05.466  3628  3686 I ReactNativeJS: Unable to symbolicate stack trace: Network request failed
01-10 16:19:05.467  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-ON on stream 0x30001 stream type=7
01-10 16:19:05.467  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-ON success for stream 0x30001, stream type=7
01-10 16:19:05.469  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-ON on stream 0x30004 stream type=4
01-10 16:19:05.469  3211  4039 I mm-camera: <SENSOR>< INFO> 4263: sensor_get_resolution_info: sensor info: name: s5k4h7, res: 1, max_fps: 120.000000, w: 640, h: 480 op pix clk: 280000000, FLL: 632, LLPCK: 3688, mode: 2, PDAF support: 0
01-10 16:19:05.469  3211  4039 I mm-3a-core: moto_led_calibration_init:502 Enter: cam_id:1 status:0
01-10 16:19:05.469  3211  4039 I mm-3a-core: moto_led_calibration_get_mod_serial_num: sn=0
01-10 16:19:05.469  3211  4039 E mm-3a-core: moto_led_calibration_read_write_led_cal:359 open /persist/camera/ledcal/front failed (No such file or directory)
01-10 16:19:05.469  3211  4039 E mm-3a-core: moto_led_calibration_apply No valid front chromatix pointer,LED calibration not applied, camera id 1
01-10 16:19:05.469  3211  4039 E mm-camera: <STATS_AF ><ERROR> 3393: af_port_handle_sensor_update: Depth_Err: actuator sensitivity: 0.000000 is invalid
01-10 16:19:05.470  3211  4039 I mm-camera: <CPP   >< INFO> 1849: cpp_module_handle_stream_cfg_event: frame_offset=3, input_fps=60.00, identity=0x3000f
01-10 16:19:05.470  3211  4039 I mm-camera: <CPP   >< INFO> 1849: cpp_module_handle_stream_cfg_event: frame_offset=3, input_fps=60.00, identity=0x30002
01-10 16:19:05.470  3211  4039 I mm-camera: <CPP   >< INFO> 1849: cpp_module_handle_stream_cfg_event: frame_offset=3, input_fps=60.00, identity=0x30003
01-10 16:19:05.470  3211  4039 I mm-camera: <CPP   >< INFO> 1849: cpp_module_handle_stream_cfg_event: frame_offset=3, input_fps=60.00, identity=0x30004
01-10 16:19:05.472  3211  4035 I mm-camera: <STATS_AF >< INFO> 1277: af_haf_update_tuning_data: Setting default init pos to far end
01-10 16:19:05.480  3211  4039 I mm-camera: <ISP   >< INFO> 3697: mesh_rolloff40_normalize_table: full 640 480 out 640 480 offset 0 0 scale 1
01-10 16:19:05.484  3211  4036 I mm-camera: <ISP   >< INFO> 90: rs_stats44_stats_config_update: warning: max_support_h_rgn invalid 8
01-10 16:19:05.484  3211  4039 I mm-camera: <CPP   >< INFO> 4082: cpp_module_handle_streamon_event: identity=0x30004, stream-on done
01-10 16:19:05.484  3211  4039 E mm-camera: <SENSOR><ERROR> 1888: sensor_set_aec_init_settings: no valid entries in aec_get
01-10 16:19:05.484  3211  4039 E mm-camera: <SENSOR><ERROR> 4200: module_sensor_set_start_stream_on: Sensor AEC INIT failed!!! - non fatal
01-10 16:19:05.484  3211  4039 I mm-camera: <MCT   >< INFO> 192: start_sof_check_thread: Starting SOF timeout thread session id =3
01-10 16:19:05.485  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 100000000 BW avg 65836800 BW inst 65836800
01-10 16:19:05.485  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-ON success for stream 0x30004, stream type=4
01-10 16:19:05.486  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-ON on stream 0x30002 stream type=1
01-10 16:19:05.487  3211  4036 I mm-camera: <ISP   >< INFO> 90: rs_stats44_stats_config_update: warning: max_support_h_rgn invalid 8
01-10 16:19:05.487  3211  4039 I mm-camera: <CPP   >< INFO> 4082: cpp_module_handle_streamon_event: identity=0x30002, stream-on done
01-10 16:19:05.487  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-ON success for stream 0x30002, stream type=1
01-10 16:19:05.488  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 100000000 BW avg 128044800 BW inst 128044800
01-10 16:19:05.488  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-ON on stream 0x30003 stream type=5
01-10 16:19:05.491  3211  4036 I mm-camera: <ISP   >< INFO> 90: rs_stats44_stats_config_update: warning: max_support_h_rgn invalid 8
01-10 16:19:05.491  3211  4039 I mm-camera: <CPP   >< INFO> 4082: cpp_module_handle_streamon_event: identity=0x30003, stream-on done
01-10 16:19:05.493  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 320000000 BW avg 426949056 BW inst 426949056
01-10 16:19:05.493  3211  4039 I mm-camera: <ISP   >< INFO> 451: be_stats44_trigger_update: warning: Denomitor is zero hnum 0 vnum 0
01-10 16:19:05.497  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-ON success for stream 0x30003, stream type=5
01-10 16:19:05.498  3460 12630 I QCameraHalWatchdog: Stopped Watchdog Thread (121ms)[flush]
01-10 16:19:05.499  3222  3222 I Camera3-Device: disconnectImpl: E
01-10 16:19:05.499  3222  3222 I CameraLatencyHistogram: ProcessCaptureRequest latency histogram (572) samples:
01-10 16:19:05.499  3222  3222 I CameraLatencyHistogram:        40     80    120    160    200    240    280    320    360    inf (max ms)
01-10 16:19:05.499  3222  3222 I CameraLatencyHistogram:      99.83   0.17   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00 (%)
01-10 16:19:05.499  3460 12630 I QCameraHalWatchdog: Starting Watchdog Thread (timeout 3000 msec)...
01-10 16:19:05.499  3460 12630 I QCamera : <HAL><INFO> close_camera_device: 12673: [KPI Perf]: E camera id 1
01-10 16:19:05.501  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30004 stream type=4
01-10 16:19:05.501  3211  4039 I mm-camera: <CPP   >< INFO> 4173: cpp_module_handle_streamoff_event: info: doing stream-off for identity 0x30004
01-10 16:19:05.501  3211  4039 I mm-camera: <CPP   >< INFO> 4358: cpp_module_handle_streamoff_event: info: stream-off done for identity 0x30004
01-10 16:19:05.503  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 266670000 BW avg 361112256 BW inst 361112256
01-10 16:19:05.504  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30004, stream type=4
01-10 16:19:05.505  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30002 stream type=1
01-10 16:19:05.505  3211  4039 I mm-camera: <CPP   >< INFO> 4173: cpp_module_handle_streamoff_event: info: doing stream-off for identity 0x30002
01-10 16:19:05.505  3211  4039 I mm-camera: <CPP   >< INFO> 4358: cpp_module_handle_streamoff_event: info: stream-off done for identity 0x30002
01-10 16:19:05.505  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30002, stream type=1
01-10 16:19:05.505  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30003 stream type=5
01-10 16:19:05.506  3211  4039 I mm-camera: <CPP   >< INFO> 4173: cpp_module_handle_streamoff_event: info: doing stream-off for identity 0x30003
01-10 16:19:05.506  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 266670000 BW avg 298904256 BW inst 298904256
01-10 16:19:05.507  3211  4031 I mm-camera: <CPP   >< INFO> 359: cpp_hardware_set_clock: Set clock 100000000 BW avg 0 BW inst 0
01-10 16:19:05.507  3211  4039 I mm-camera: <CPP   >< INFO> 4358: cpp_module_handle_streamoff_event: info: stream-off done for identity 0x30003
01-10 16:19:05.510  3211  4039 I mm-camera: <MCT   >< INFO> 223: stop_sof_check_thread: Stopping SOF timeout thread session =3
01-10 16:19:05.510  3211  4179 I mm-camera: <MCT   >< INFO> 149: mct_bus_sof_thread_run: Closing SOF tracker thread
01-10 16:19:05.510  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30003, stream type=5
01-10 16:19:05.511  3211  4039 I mm-camera: <MCT   >< INFO> 5748: mct_pipeline_process_set:  STREAM-OFF on stream 0x30001 stream type=7
01-10 16:19:05.511  3211  4039 I mm-camera: <MCT   >< INFO> 5763: mct_pipeline_process_set:  STREAM-OFF success for stream 0x30001, stream type=7
01-10 16:19:05.514  3211  4039 I mm-camera: <MCT   >< INFO> 5828: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x30002 and stream type=1
01-10 16:19:05.514  3211  4039 I mm-camera: <ISP   >< INFO> 961: isp_port_check_caps_unreserve: ide 30002 port 0xf1bc7680
01-10 16:19:05.515  3211  4039 I mm-camera: <MCT   >< INFO> 5839: mct_pipeline_process_set: Stream 0x30002 and stream type=1, successfully deleted
01-10 16:19:05.515  3211  4039 I mm-camera: <MCT   >< INFO> 5828: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x30003 and stream type=5
01-10 16:19:05.515  3211  4039 I mm-camera: <ISP   >< INFO> 961: isp_port_check_caps_unreserve: ide 30003 port 0xf1bc7680
01-10 16:19:05.516  3211  4039 I mm-camera: <MCT   >< INFO> 5839: mct_pipeline_process_set: Stream 0x30003 and stream type=5, successfully deleted
01-10 16:19:05.517  3211  4039 I mm-camera: <MCT   >< INFO> 5828: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x30004 and stream type=4
01-10 16:19:05.517  3211  4039 I mm-camera: <ISP   >< INFO> 961: isp_port_check_caps_unreserve: ide 30004 port 0xf1bc7680
01-10 16:19:05.517  3211  4039 I mm-camera: <MCT   >< INFO> 5839: mct_pipeline_process_set: Stream 0x30004 and stream type=4, successfully deleted
01-10 16:19:05.517  3211  4039 I mm-camera: <MCT   >< INFO> 5828: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x30001 and stream type=7
01-10 16:19:05.517  3211  4039 I mm-camera: <MCT   >< INFO> 5839: mct_pipeline_process_set: Stream 0x30001 and stream type=7, successfully deleted
01-10 16:19:05.518  3211  3362 E mm-camera: <IMGLIB><ERROR> 303: AllocateBuffers: Invalid dimensions 0x0
01-10 16:19:05.518  3211  3362 E mm-camera: <IMGLIB><ERROR> 203: img_algo_preload: Preload: Failed to allocate buffer, rc -4
01-10 16:19:05.518  3211  4039 I mm-camera: <ISP   >< INFO> 6721: isp_util_print_meta_stream_info: Deallocate resources
01-10 16:19:05.518  3211  3362 E mm-camera: <IMGLIB><ERROR> 119: module_imgbase_client_preload_exec: IMG_CORE_PRELOAD failed -4
01-10 16:19:05.521  3211  4039 I mm-camera: <ISP   >< INFO> 2534: isp_resource_allocate: INFO: ISP resource acquired: session 3 num_isp 1
01-10 16:19:05.521  3211  4039 I mm-camera: <ISP   >< INFO> 2536: isp_resource_allocate: INFO: ISP resource acquired: hw_id 1
01-10 16:19:05.521  3211  4039 I mm-camera: <ISP   >< INFO> 6571: isp_util_decide_stream_mapping: stream_port_map num streams 0
01-10 16:19:05.522  3211  4039 E mm-camera: <MCT   ><ERROR> 1468: mct_pipeline_decide_hw_wakeup: Couldn't find meta stream
01-10 16:19:05.523  3460 12630 I QCamera : <HAL><INFO> closeCamera: 1071: [KPI Perf]: E PROFILE_CLOSE_CAMERA camera id 1
01-10 16:19:05.523  3211  3211 I mm-camera: <MCT   >< INFO> 225: mct_controller_destroy: Initiating destroy sequence for session = 3
01-10 16:19:05.524  3211  3211 I mm-camera: <MCT   >< INFO> 243: mct_controller_destroy: serv_thread closed
01-10 16:19:05.524  3211  3211 I mm-camera: <MCT   >< INFO> 258: mct_controller_destroy: bus_handler thread closed
01-10 16:19:05.524  3211  3211 I mm-camera: <MCT   >< INFO> 6569: mct_pipeline_stop_session: Initiating stop_session on session 3
01-10 16:19:05.524  3211  3211 I mm-camera: <MCT   >< INFO> 5828: mct_pipeline_process_set: Issuing DEL_STREAM on stream 0x3000f and stream type=10
01-10 16:19:05.524  3211  3211 I mm-camera: <ISP   >< INFO> 961: isp_port_check_caps_unreserve: ide 3000f port 0xf1bc7680
01-10 16:19:05.525  3211  3211 D MotISP_VSTAB: destroyed
01-10 16:19:05.527  3211  3211 I mm-camera: <MCT   >< INFO> 5839: mct_pipeline_process_set: Stream 0x3000f and stream type=10, successfully deleted
01-10 16:19:05.527  3211  4183 I mm-camera: <MCT   >< INFO> 6303: mct_pipeline_stop_session_thread: Stop module name: iface - E
01-10 16:19:05.527  3211  4182 I mm-camera: <MCT   >< INFO> 6303: mct_pipeline_stop_session_thread: Stop module name: sensor - E
01-10 16:19:05.527  3211  4182 I mm-camera: <MCT   >< INFO> 6311: mct_pipeline_stop_session_thread: Stop module name: sensor - X
01-10 16:19:05.528  3211  4184 I mm-camera: <MCT   >< INFO> 6303: mct_pipeline_stop_session_thread: Stop module name: isp - E
01-10 16:19:05.528  3211  4184 I mm-camera: <ISP   >< INFO> 491: isp_module_stop_session: session id 3
01-10 16:19:05.528  3211  4184 I mm-camera: <ISP   >< INFO> 532: isp_module_stop_session: warning: ISP resource is not freed on time!
01-10 16:19:05.528  3211  4183 I mm-camera: <MCT   >< INFO> 6311: mct_pipeline_stop_session_thread: Stop module name: iface - X
01-10 16:19:05.528  3211  4186 I mm-camera: <MCT   >< INFO> 6303: mct_pipeline_stop_session_thread: Stop module name: pproc - E
01-10 16:19:05.529  3211  4185 I mm-camera: <MCT   >< INFO> 6303: mct_pipeline_stop_session_thread: Stop module name: stats - E
01-10 16:19:05.529  3211  3211 I mm-camera: <MCT   >< INFO> 6591: mct_pipeline_stop_session: Modules left: 5
01-10 16:19:05.529  3211  3211 I mm-camera: <MCT   >< INFO> 6591: mct_pipeline_stop_session: Modules left: 4
01-10 16:19:05.529  3211  4187 I mm-camera: <MCT   >< INFO> 6303: mct_pipeline_stop_session_thread: Stop module name: imglib - E
01-10 16:19:05.531  3211  4186 E quadracfa_dummy: inside dummy remosaic_deinit 1
01-10 16:19:05.531  3211  4186 I mm-camera: <MCT   >< INFO> 6311: mct_pipeline_stop_session_thread: Stop module name: pproc - X
01-10 16:19:05.531  3211  3211 I mm-camera: <MCT   >< INFO> 6591: mct_pipeline_stop_session: Modules left: 3
01-10 16:19:05.531  3211  4187 I mm-camera: <MCT   >< INFO> 6311: mct_pipeline_stop_session_thread: Stop module name: imglib - X
01-10 16:19:05.531  3211  3211 I mm-camera: <MCT   >< INFO> 6591: mct_pipeline_stop_session: Modules left: 2
01-10 16:19:05.532  3211  4185 I mm-camera: <MCT   >< INFO> 6311: mct_pipeline_stop_session_thread: Stop module name: stats - X
01-10 16:19:05.532  3211  3211 I mm-camera: <MCT   >< INFO> 6591: mct_pipeline_stop_session: Modules left: 1
01-10 16:19:05.534  3211  4184 I mm-camera: <MCT   >< INFO> 6311: mct_pipeline_stop_session_thread: Stop module name: isp - X
01-10 16:19:05.534  3211  3211 I mm-camera: <MCT   >< INFO> 6591: mct_pipeline_stop_session: Modules left: 0
01-10 16:19:05.534  3211  3211 I mm-camera: <MCT   >< INFO> 6601: mct_pipeline_stop_session: Stopped session 3 successfully
01-10 16:19:05.534  3211  3211 I mm-camera: <MCT   >< INFO> 6886: mct_pipeline_destroy: E: session:3
01-10 16:19:05.534  3211  3211 I mm-camera: <MCT   >< INFO> 6964: mct_pipeline_destroy: X: Pipeline destroyed successfully session =3
01-10 16:19:05.534  3211  3211 I mm-camera: <MCT   >< INFO> 292: mct_controller_destroy: X Successfully closed mct_controller session 3
01-10 16:19:05.535  3141  3169 I SDM     : ResourceImpl::SetMaxBandwidthMode: new bandwidth mode=0
01-10 16:19:05.535  3222  3222 I CameraProviderManager: Camera device [email protected]/legacy/1 torch status is now AVAILABLE_OFF
01-10 16:19:05.535  3222  3222 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=1, newStatus=1
01-10 16:19:05.535  3460 12630 I QCamera : <HAL><INFO> closeCamera: 1117: [KPI Perf]: X PROFILE_CLOSE_CAMERA camera id 1, rc: 0
01-10 16:19:05.536  3460 12630 I QCamera : <HAL><INFO> close_camera_device: 12675: [KPI Perf]: X
01-10 16:19:05.536  3460 12630 I QCameraHalWatchdog: Stopped Watchdog Thread (37ms)[close_camera_device]
01-10 16:19:05.538  3222  3222 I CameraLatencyHistogram: Stream 0 dequeueBuffer latency histogram (572) samples:
01-10 16:19:05.538  3222  3222 I CameraLatencyHistogram:         5     10     15     20     25     30     35     40     45    inf (max ms)
01-10 16:19:05.538  3222  3222 I CameraLatencyHistogram:      100.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00 (%)
01-10 16:19:05.541  3222  3222 I CameraLatencyHistogram: Stream 1 dequeueBuffer latency histogram (572) samples:
01-10 16:19:05.541  3222  3222 I CameraLatencyHistogram:         5     10     15     20     25     30     35     40     45    inf (max ms)
01-10 16:19:05.541  3222  3222 I CameraLatencyHistogram:      99.30   0.70   0.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00 (%)
01-10 16:19:05.541  3331  3993 W GraphicBufferSource: released unpopulated slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
01-10 16:19:05.542  3222  3222 I Camera3-Device: disconnectImpl: X
01-10 16:19:05.543  3222  3222 D CameraService: disconnect: unlinkToDeath
01-10 16:19:05.546  3222  3222 I CameraService: disconnect: Disconnected client for camera 1 for PID 3628
01-10 16:19:05.548  3628  3756 D UseCaseAttachState: Active and attached use case: [] for camera: 1
01-10 16:19:05.549  3628  3756 D DeferrableSurface: use count-1,  useCount=0 closed=true androidx.camera.core.SurfaceRequest$2@51e30e1
01-10 16:19:05.549  3628  3756 D DeferrableSurface: Surface no longer in use[total_surfaces=3, used_surfaces=2](androidx.camera.core.SurfaceRequest$2@51e30e1}
01-10 16:19:05.549  3628  3756 D DeferrableSurface: Surface terminated[total_surfaces=2, used_surfaces=2](androidx.camera.core.SurfaceRequest$2@51e30e1}
01-10 16:19:05.550  3628  3756 D DeferrableSurface: use count-1,  useCount=0 closed=true androidx.camera.core.impl.ImmediateSurface@b913dbf
01-10 16:19:05.550  3628  3756 D DeferrableSurface: Surface no longer in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@b913dbf}
01-10 16:19:05.550  3628  3756 D DeferrableSurface: Surface terminated[total_surfaces=1, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@b913dbf}
01-10 16:19:05.550  3628  3756 D DeferrableSurface: use count-1,  useCount=0 closed=true androidx.camera.core.SurfaceRequest$2@c1c8492
01-10 16:19:05.550  3628  3756 D DeferrableSurface: Surface no longer in use[total_surfaces=1, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@c1c8492}
01-10 16:19:05.550  3628  3756 D DeferrableSurface: Surface terminated[total_surfaces=0, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@c1c8492}
01-10 16:19:05.551  3628  3628 D SurfaceViewImpl: Safe to release surface.
01-10 16:19:05.551  3628  4012 D Recorder: Surface closed: 18985970, Current surface: 18985970
01-10 16:19:05.551  3628  4012 D Recorder: Transitioning Recorder internal state: IDLING --> INITIALIZING
01-10 16:19:05.551  3628  4012 D Recorder: Transitioning audio state: INITIALIZING --> INITIALIZING
01-10 16:19:05.552  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} CameraDevice.onClosed()
01-10 16:19:05.553  3628  3756 D Camera2CameraImpl: {Camera@2acd80c[id=1]} Transitioning camera internal state: CLOSING --> INITIALIZED
01-10 16:19:05.553  3628  4012 I MediaCodec: (0x72059b5000) release
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: Recalculating open cameras:
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: Camera                                       State                 
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: -------------------------------------------------------------------
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: Camera@2acd80c[id=1]                         CLOSED                
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: Camera@39bde0[id=0]                          UNKNOWN               
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: -------------------------------------------------------------------
01-10 16:19:05.556  3628  3756 D CameraStateRegistry: Open count: 0 (Max allowed: 1)
01-10 16:19:05.557  3628  3756 D CameraStateMachine: New public camera state CameraState{type=CLOSED, error=null} from CLOSED and null
01-10 16:19:05.557  3628  3756 D CameraStateMachine: Publishing new public camera state CameraState{type=CLOSED, error=null}
01-10 16:19:05.561  3331  3993 I OMX-VENC: Component Deinit
01-10 16:19:05.562  3331  3993 I OMX-VENC: Video encode perflock released
01-10 16:19:05.568  3628  4012 D VideoEncoder: Transitioning encoder internal state: CONFIGURED --> RELEASED
01-10 16:19:05.977  3308  4189 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0)
01-10 16:19:08.002  3308  4191 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0)

@mrousavy
Copy link
Owner

Maybe try disabling video or photo or frameProcessor?

@Angelk90
Copy link
Author

@mrousavy : How should I do?
Even the flash does not fire if I press it.

@mrousavy
Copy link
Owner

How should I do?

What do you mean? Disable video or photo or frameProcessor. Just don't pass them to the <Camera> component

@Angelk90
Copy link
Author

@mrousavy : I understand, commenting on frameProcessor the main camera seems to work.

@Angelk90
Copy link
Author

Angelk90 commented Jan 10, 2022

@mrousavy : There are still some things that don't work:

  • The flash does not fire
  • When I try to enable Hdr, it tells me: The given Camera device could not be found for use-case binding!
  • When I take a photo, he shows me the photo, if I click on the x (top left) it gets stuck it does not return to the camera, same thing if I save the photo first.

@mrousavy
Copy link
Owner

Does the flash not fire when taking a photo or when recording (or both)?

@mrousavy
Copy link
Owner

HDR is a bit weird - it works when the device supports it, but when the device doesn't support it it is somehow still being reported as "supported".

@Angelk90
Copy link
Author

@mrousavy : Both cases for the flash.
You don't even see the HDR icon.

On android there seems to be a lot of problems.

What android device have you tested on?

@Angelk90
Copy link
Author

@mrousavy : It also happens that with the main camera the videos are not recorded.
If I record a video with the secondary camera they are recorded.

@mrousavy
Copy link
Owner

You don't even see the HDR icon.

It's an icon that's missing. In an example app. I have even fixed it right now.

On android there seems to be a lot of problems.

Thanks, I actually enabled forking on this repository so you can send me PRs fixing those problems anytime :)

What android device have you tested on?

Huawei P10

It also happens that with the main camera the videos are not recorded.

What is the main camera, and what is the second camera?

@mrousavy
Copy link
Owner

Also, flash works for me. On my Huawei P10. Both for photo and video capture.

@Angelk90
Copy link
Author

@mrousavy : Main camera the one you use to take pictures normally (those behind the device)
Secondary room for selfies (those on the device screen).

@Angelk90
Copy link
Author

@mrousavy :
I pull on the new changes.

  • Icon Hdr on see
  • The goBack is not working

@Angelk90
Copy link
Author

@mrousavy : I tried on the Tablet Samsung Tab A (2016), to make the camera work I have to disable the video.

@ShaheerArshad-nearpeer
Copy link

Screenshot 2022-01-12 at 12 15 09 PM

Can any one help me what i am doing wrong ? Im using react native vision camera const devices = useCameraDevices() const device = devices.back

@Stukz
Copy link

Stukz commented Jan 24, 2022

What were you trying to do?
clone the project: https://github.com/mrousavy/react-native-vision-camera

tried to run the example code on emulator (Pixel 2 XL API 29) & got the same error on the back camera

image


also I have the same error on my physical device Motorola Moto G20 on both cameras front & back
image

@Angelk90
Copy link
Author

@Stukz : Does the flash work on the g20?

@Stukz
Copy link

Stukz commented Jan 24, 2022

@Stukz : Does the flash work on the g20?

@Angelk90 it doesn't work

@Angelk90
Copy link
Author

@Stukz : What other devices have you tried on? Both cameras don't work?

@Stukz
Copy link

Stukz commented Jan 24, 2022

@Stukz : What other devices have you tried on? Both cameras don't work?

I only have my g20 as a physical device. yes, both cameras have the same issue.

it's happening with video={true}

@Angelk90
Copy link
Author

@Stukz : I have tested on several Android devices it seems to not work correctly, if you say it does not work on the emulator either it will probably @mrousavy have to be able to test it against a physical device.

Ps
I saw that you are a sponsor what are the advantages?

@Stukz
Copy link

Stukz commented Jan 24, 2022

got it, so it's not a specific device, sad to hear that.

Ps I saw that you are a sponsor what are the advantages?

you can read them on his page. the fact that he's trying to maintain a critical feature like a Camera library on RN it's something to appreciate. I know it's not that much but I hope in the near future to increase my sponsors over the RN OSS maintainers

@Angelk90
Copy link
Author

@Stukz : We hope that this problem on Android will be solved in the future.
From what I understand the problem appears to be camerax, but I don't understand why.

@mrousavy
Copy link
Owner

Hey! So the problem here is the core difference between iOS Cameras (AVFoundation) and Android Cameras (CameraX).

On iOS, the concept is similar to how I expose it in VisionCamera, you have a list of devices, each has a list of formats. With CameraX, all of this is a bit abstracted away and you only have a list of devices, but the concept of "formats" does not really exist.

On Android, some Camera devices do not support photo and video at the same time. I am not sure why this is the case, but on iOS this always works.

Also, apparently on CameraX there is no way to determine whether a camera supports video and photo at the same time before mounting the Camera, which is just dumb. I can only use guesses to find out if a device in the devices list supports video and photo.

I have a contact to Google and will ask him a few questions, maybe I can come up with an alternative API for VisionCamera that solves this issue. Sorry for the complications, but this is a tough one!

@mrousavy
Copy link
Owner

And thank you for the sponsorship @Stukz, means a lot to me! 🙏

@Stukz
Copy link

Stukz commented Jan 26, 2022

Hey Marc thank you for the detailed explanation of what's going on in Android, let me know if you have any progress on it so I can give you some feedback about it

@Stukz
Copy link

Stukz commented Mar 3, 2022

hey @mrousavy hope you are doing well, I'm curious if you have any update about this issue?

@mrousavy
Copy link
Owner

mrousavy commented Mar 4, 2022

Hey Nicolas, I didn't investigate this any further for now since I didn't have the time to do so. I am thinking about a new API that could potentially solve this issue!

@NgocLe1001
Copy link

I have same issue. Any one has solution please :(

@NgocLe1001
Copy link

I removed all related frameRateIncluded then it works. It's fix temporarily

@ozgurbayram
Copy link

I removed all related frameRateIncluded then it works. It's fix temporarily

If you are trying to make it work with 'video' it will not work, I have the same issue. It only works with 'photo' mode

@Angelk90
Copy link
Author

@ozgurbayram, @NgocLe1001 : On five android devices I tested on, it didn't work properly.
Seems like some problem with cameraX, when it says @mrousavy.

@mrousavy
Copy link
Owner

CameraX is really not as good as they make it sound... :/

@Angelk90
Copy link
Author

@mrousavy : So for the moment on android it doesn't work properly, right?

@nimran
Copy link

nimran commented Jun 18, 2022

@mrousavy unable to capture image in Android. I dont see any logs either, it works in iOS when i click,it captures.

@mikamations
Copy link

This is still an issue in 2.15.2. Most Android devices don't work unless video is disabled. Anyone find any better workarounds?

@Angelk90
Copy link
Author

@mikamations : It seems strange that the problem still persists I thought @mrousavy fixed it.

@mrousavy
Copy link
Owner

Hey all! CameraX is just too limiting. It's not based on Camera Device Formats as AVFoundation is, so I need to do a little rewriting for the Android part to make everything work as flexible and powerful as on iOS.

For this part specifically, I need to:

  1. Rewrite the native Android part from CameraX to Camera2
  2. Create a new declarative API ontop of the native iOS and Android parts to make this whole Camera Device + Format selection way easier (describe your target FPS, HDR, resolution, etc and it will pick everything automatically)

However since this is a really big project, I can't really work on this in my free time (I have a company to run). I have created a discussion for this, and want to put it all into VisionCamera V3, if you or your company is interested in this new version and wants to help support/fund the development of that, please reach out to me via Twitter or Email.

Here's the technical discussion: #1376

@mrousavy
Copy link
Owner

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

austinbh1003 pushed a commit to austinbh1003/vision-camera that referenced this issue Jul 11, 2024
See mrousavy/react-native-vision-camera#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy/react-native-vision-camera#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy/react-native-vision-camera#1376
- fixes
mrousavy/react-native-vision-camera#281
- resolves
mrousavy/react-native-vision-camera#211
- resolves
mrousavy/react-native-vision-camera#130
- resolves
mrousavy/react-native-vision-camera#117
- fixes mrousavy/react-native-vision-camera#76
- resolves
mrousavy/react-native-vision-camera#75
- resolves
mrousavy/react-native-vision-camera#562
- resolves
mrousavy/react-native-vision-camera#565
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#287
- resolves
mrousavy/react-native-vision-camera#311
- fixes
mrousavy/react-native-vision-camera#315
- resolves
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#340
- fixes
mrousavy/react-native-vision-camera#354
- resolves
mrousavy/react-native-vision-camera#420
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#452
- fixes
mrousavy/react-native-vision-camera#496
- fixes
mrousavy/react-native-vision-camera#497
- resolves
mrousavy/react-native-vision-camera#499
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#527
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#548
- fixes
mrousavy/react-native-vision-camera#561
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#770


...and then pretty much every Android issue lol

- fixes
mrousavy/react-native-vision-camera#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy/react-native-vision-camera#1671

.. maybe also (not tested):

- fixes
mrousavy/react-native-vision-camera#1698
- fixes
mrousavy/react-native-vision-camera#1687
- fixes
mrousavy/react-native-vision-camera#1685
- fixes
mrousavy/react-native-vision-camera#1681
- fixes
mrousavy/react-native-vision-camera#1650
- fixes
mrousavy/react-native-vision-camera#1646
- fixes
mrousavy/react-native-vision-camera#1635
- fixes
mrousavy/react-native-vision-camera#1631
- fixes
mrousavy/react-native-vision-camera#1621
- fixes
mrousavy/react-native-vision-camera#1615
- fixes
mrousavy/react-native-vision-camera#1612
- fixes
mrousavy/react-native-vision-camera#1605
- fixes
mrousavy/react-native-vision-camera#1599
- fixes
mrousavy/react-native-vision-camera#1585
- fixes
mrousavy/react-native-vision-camera#1581
- fixes
mrousavy/react-native-vision-camera#1569
- fixes
mrousavy/react-native-vision-camera#1568
- fixes
mrousavy/react-native-vision-camera#1565
- fixes
mrousavy/react-native-vision-camera#1561
- fixes
mrousavy/react-native-vision-camera#1558
- fixes
mrousavy/react-native-vision-camera#1554
- fixes
mrousavy/react-native-vision-camera#1551
- fixes
mrousavy/react-native-vision-camera#1547
- fixes
mrousavy/react-native-vision-camera#1543
- fixes
mrousavy/react-native-vision-camera#1538
- fixes
mrousavy/react-native-vision-camera#1536
- fixes
mrousavy/react-native-vision-camera#1534
- fixes
mrousavy/react-native-vision-camera#1528
- fixes
mrousavy/react-native-vision-camera#1520
- fixes
mrousavy/react-native-vision-camera#1498
- fixes
mrousavy/react-native-vision-camera#1489
- fixes
mrousavy/react-native-vision-camera#1477
- fixes
mrousavy/react-native-vision-camera#1474
- fixes
mrousavy/react-native-vision-camera#1463
- fixes
mrousavy/react-native-vision-camera#1462
- fixes
mrousavy/react-native-vision-camera#1449
- fixes
mrousavy/react-native-vision-camera#1443
- fixes
mrousavy/react-native-vision-camera#1437
- fixes
mrousavy/react-native-vision-camera#1431
- fixes
mrousavy/react-native-vision-camera#1429
- fixes
mrousavy/react-native-vision-camera#1427
- fixes
mrousavy/react-native-vision-camera#1423
- fixes
mrousavy/react-native-vision-camera#1416
- fixes
mrousavy/react-native-vision-camera#1407
- fixes
mrousavy/react-native-vision-camera#1403
- fixes
mrousavy/react-native-vision-camera#1402
- fixes
mrousavy/react-native-vision-camera#1398
- fixes
mrousavy/react-native-vision-camera#1396
- fixes
mrousavy/react-native-vision-camera#1395
- fixes
mrousavy/react-native-vision-camera#1379
- fixes
mrousavy/react-native-vision-camera#1377
- fixes
mrousavy/react-native-vision-camera#1374
- fixes
mrousavy/react-native-vision-camera#1373
- fixes
mrousavy/react-native-vision-camera#1365
- fixes
mrousavy/react-native-vision-camera#1356
- fixes
mrousavy/react-native-vision-camera#1353
- fixes
mrousavy/react-native-vision-camera#1352
- fixes
mrousavy/react-native-vision-camera#1351
- fixes
mrousavy/react-native-vision-camera#1343
- fixes
mrousavy/react-native-vision-camera#1340
- fixes
mrousavy/react-native-vision-camera#1334
- fixes
mrousavy/react-native-vision-camera#1330
- fixes
mrousavy/react-native-vision-camera#1322
- fixes
mrousavy/react-native-vision-camera#1296
- fixes
mrousavy/react-native-vision-camera#1283
- fixes
mrousavy/react-native-vision-camera#1260
- fixes
mrousavy/react-native-vision-camera#1253
- fixes
mrousavy/react-native-vision-camera#1251
- fixes
mrousavy/react-native-vision-camera#1245
- fixes
mrousavy/react-native-vision-camera#1238
- fixes
mrousavy/react-native-vision-camera#1227
- fixes
mrousavy/react-native-vision-camera#1226
- fixes
mrousavy/react-native-vision-camera#1225
- fixes
mrousavy/react-native-vision-camera#1222
- fixes
mrousavy/react-native-vision-camera#1211
- fixes
mrousavy/react-native-vision-camera#1208
- fixes
mrousavy/react-native-vision-camera#1193
- fixes
mrousavy/react-native-vision-camera#1191
- fixes
mrousavy/react-native-vision-camera#1184
- fixes
mrousavy/react-native-vision-camera#1164
- fixes
mrousavy/react-native-vision-camera#1143
- fixes
mrousavy/react-native-vision-camera#1128
- fixes
mrousavy/react-native-vision-camera#1122
- fixes
mrousavy/react-native-vision-camera#1120
- fixes
mrousavy/react-native-vision-camera#1110
- fixes
mrousavy/react-native-vision-camera#1097
- fixes
mrousavy/react-native-vision-camera#1081
- fixes
mrousavy/react-native-vision-camera#1080
- fixes
mrousavy/react-native-vision-camera#1064
- fixes
mrousavy/react-native-vision-camera#1053
- fixes
mrousavy/react-native-vision-camera#1047
- fixes
mrousavy/react-native-vision-camera#1044
- fixes
mrousavy/react-native-vision-camera#1032
- fixes
mrousavy/react-native-vision-camera#1026
- fixes
mrousavy/react-native-vision-camera#1023
- fixes
mrousavy/react-native-vision-camera#1015
- fixes
mrousavy/react-native-vision-camera#1012
- fixes
mrousavy/react-native-vision-camera#997
- fixes
mrousavy/react-native-vision-camera#960
- fixes
mrousavy/react-native-vision-camera#959
- fixes
mrousavy/react-native-vision-camera#954
- fixes
mrousavy/react-native-vision-camera#946
- fixes
mrousavy/react-native-vision-camera#945
- fixes
mrousavy/react-native-vision-camera#922
- fixes
mrousavy/react-native-vision-camera#908
- fixes
mrousavy/react-native-vision-camera#907
- fixes
mrousavy/react-native-vision-camera#868
- fixes
mrousavy/react-native-vision-camera#855
- fixes
mrousavy/react-native-vision-camera#834
- fixes
mrousavy/react-native-vision-camera#793
- fixes
mrousavy/react-native-vision-camera#779
- fixes
mrousavy/react-native-vision-camera#746
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#727
- fixes
mrousavy/react-native-vision-camera#671
- fixes
mrousavy/react-native-vision-camera#613
- fixes
mrousavy/react-native-vision-camera#595
- fixes
mrousavy/react-native-vision-camera#588
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#569
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#515
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#354
- fixes
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#315
- fixes
mrousavy/react-native-vision-camera#281
- fixes
mrousavy/react-native-vision-camera#211
- fixes mrousavy/react-native-vision-camera#76
max71126 added a commit to max71126/react-native-vision-camera that referenced this issue Sep 19, 2024
See mrousavy/react-native-vision-camera#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy/react-native-vision-camera#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy/react-native-vision-camera#1376
- fixes
mrousavy/react-native-vision-camera#281
- resolves
mrousavy/react-native-vision-camera#211
- resolves
mrousavy/react-native-vision-camera#130
- resolves
mrousavy/react-native-vision-camera#117
- fixes mrousavy/react-native-vision-camera#76
- resolves
mrousavy/react-native-vision-camera#75
- resolves
mrousavy/react-native-vision-camera#562
- resolves
mrousavy/react-native-vision-camera#565
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#287
- resolves
mrousavy/react-native-vision-camera#311
- fixes
mrousavy/react-native-vision-camera#315
- resolves
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#340
- fixes
mrousavy/react-native-vision-camera#354
- resolves
mrousavy/react-native-vision-camera#420
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#452
- fixes
mrousavy/react-native-vision-camera#496
- fixes
mrousavy/react-native-vision-camera#497
- resolves
mrousavy/react-native-vision-camera#499
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#527
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#548
- fixes
mrousavy/react-native-vision-camera#561
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#770


...and then pretty much every Android issue lol

- fixes
mrousavy/react-native-vision-camera#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy/react-native-vision-camera#1671

.. maybe also (not tested):

- fixes
mrousavy/react-native-vision-camera#1698
- fixes
mrousavy/react-native-vision-camera#1687
- fixes
mrousavy/react-native-vision-camera#1685
- fixes
mrousavy/react-native-vision-camera#1681
- fixes
mrousavy/react-native-vision-camera#1650
- fixes
mrousavy/react-native-vision-camera#1646
- fixes
mrousavy/react-native-vision-camera#1635
- fixes
mrousavy/react-native-vision-camera#1631
- fixes
mrousavy/react-native-vision-camera#1621
- fixes
mrousavy/react-native-vision-camera#1615
- fixes
mrousavy/react-native-vision-camera#1612
- fixes
mrousavy/react-native-vision-camera#1605
- fixes
mrousavy/react-native-vision-camera#1599
- fixes
mrousavy/react-native-vision-camera#1585
- fixes
mrousavy/react-native-vision-camera#1581
- fixes
mrousavy/react-native-vision-camera#1569
- fixes
mrousavy/react-native-vision-camera#1568
- fixes
mrousavy/react-native-vision-camera#1565
- fixes
mrousavy/react-native-vision-camera#1561
- fixes
mrousavy/react-native-vision-camera#1558
- fixes
mrousavy/react-native-vision-camera#1554
- fixes
mrousavy/react-native-vision-camera#1551
- fixes
mrousavy/react-native-vision-camera#1547
- fixes
mrousavy/react-native-vision-camera#1543
- fixes
mrousavy/react-native-vision-camera#1538
- fixes
mrousavy/react-native-vision-camera#1536
- fixes
mrousavy/react-native-vision-camera#1534
- fixes
mrousavy/react-native-vision-camera#1528
- fixes
mrousavy/react-native-vision-camera#1520
- fixes
mrousavy/react-native-vision-camera#1498
- fixes
mrousavy/react-native-vision-camera#1489
- fixes
mrousavy/react-native-vision-camera#1477
- fixes
mrousavy/react-native-vision-camera#1474
- fixes
mrousavy/react-native-vision-camera#1463
- fixes
mrousavy/react-native-vision-camera#1462
- fixes
mrousavy/react-native-vision-camera#1449
- fixes
mrousavy/react-native-vision-camera#1443
- fixes
mrousavy/react-native-vision-camera#1437
- fixes
mrousavy/react-native-vision-camera#1431
- fixes
mrousavy/react-native-vision-camera#1429
- fixes
mrousavy/react-native-vision-camera#1427
- fixes
mrousavy/react-native-vision-camera#1423
- fixes
mrousavy/react-native-vision-camera#1416
- fixes
mrousavy/react-native-vision-camera#1407
- fixes
mrousavy/react-native-vision-camera#1403
- fixes
mrousavy/react-native-vision-camera#1402
- fixes
mrousavy/react-native-vision-camera#1398
- fixes
mrousavy/react-native-vision-camera#1396
- fixes
mrousavy/react-native-vision-camera#1395
- fixes
mrousavy/react-native-vision-camera#1379
- fixes
mrousavy/react-native-vision-camera#1377
- fixes
mrousavy/react-native-vision-camera#1374
- fixes
mrousavy/react-native-vision-camera#1373
- fixes
mrousavy/react-native-vision-camera#1365
- fixes
mrousavy/react-native-vision-camera#1356
- fixes
mrousavy/react-native-vision-camera#1353
- fixes
mrousavy/react-native-vision-camera#1352
- fixes
mrousavy/react-native-vision-camera#1351
- fixes
mrousavy/react-native-vision-camera#1343
- fixes
mrousavy/react-native-vision-camera#1340
- fixes
mrousavy/react-native-vision-camera#1334
- fixes
mrousavy/react-native-vision-camera#1330
- fixes
mrousavy/react-native-vision-camera#1322
- fixes
mrousavy/react-native-vision-camera#1296
- fixes
mrousavy/react-native-vision-camera#1283
- fixes
mrousavy/react-native-vision-camera#1260
- fixes
mrousavy/react-native-vision-camera#1253
- fixes
mrousavy/react-native-vision-camera#1251
- fixes
mrousavy/react-native-vision-camera#1245
- fixes
mrousavy/react-native-vision-camera#1238
- fixes
mrousavy/react-native-vision-camera#1227
- fixes
mrousavy/react-native-vision-camera#1226
- fixes
mrousavy/react-native-vision-camera#1225
- fixes
mrousavy/react-native-vision-camera#1222
- fixes
mrousavy/react-native-vision-camera#1211
- fixes
mrousavy/react-native-vision-camera#1208
- fixes
mrousavy/react-native-vision-camera#1193
- fixes
mrousavy/react-native-vision-camera#1191
- fixes
mrousavy/react-native-vision-camera#1184
- fixes
mrousavy/react-native-vision-camera#1164
- fixes
mrousavy/react-native-vision-camera#1143
- fixes
mrousavy/react-native-vision-camera#1128
- fixes
mrousavy/react-native-vision-camera#1122
- fixes
mrousavy/react-native-vision-camera#1120
- fixes
mrousavy/react-native-vision-camera#1110
- fixes
mrousavy/react-native-vision-camera#1097
- fixes
mrousavy/react-native-vision-camera#1081
- fixes
mrousavy/react-native-vision-camera#1080
- fixes
mrousavy/react-native-vision-camera#1064
- fixes
mrousavy/react-native-vision-camera#1053
- fixes
mrousavy/react-native-vision-camera#1047
- fixes
mrousavy/react-native-vision-camera#1044
- fixes
mrousavy/react-native-vision-camera#1032
- fixes
mrousavy/react-native-vision-camera#1026
- fixes
mrousavy/react-native-vision-camera#1023
- fixes
mrousavy/react-native-vision-camera#1015
- fixes
mrousavy/react-native-vision-camera#1012
- fixes
mrousavy/react-native-vision-camera#997
- fixes
mrousavy/react-native-vision-camera#960
- fixes
mrousavy/react-native-vision-camera#959
- fixes
mrousavy/react-native-vision-camera#954
- fixes
mrousavy/react-native-vision-camera#946
- fixes
mrousavy/react-native-vision-camera#945
- fixes
mrousavy/react-native-vision-camera#922
- fixes
mrousavy/react-native-vision-camera#908
- fixes
mrousavy/react-native-vision-camera#907
- fixes
mrousavy/react-native-vision-camera#868
- fixes
mrousavy/react-native-vision-camera#855
- fixes
mrousavy/react-native-vision-camera#834
- fixes
mrousavy/react-native-vision-camera#793
- fixes
mrousavy/react-native-vision-camera#779
- fixes
mrousavy/react-native-vision-camera#746
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#727
- fixes
mrousavy/react-native-vision-camera#671
- fixes
mrousavy/react-native-vision-camera#613
- fixes
mrousavy/react-native-vision-camera#595
- fixes
mrousavy/react-native-vision-camera#588
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#569
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#515
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#354
- fixes
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#315
- fixes
mrousavy/react-native-vision-camera#281
- fixes
mrousavy/react-native-vision-camera#211
- fixes mrousavy/react-native-vision-camera#76
isaaccolson pushed a commit to isaaccolson/deliveries-mobile that referenced this issue Oct 30, 2024
See mrousavy#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy#1376
- fixes
mrousavy#281
- resolves
mrousavy#211
- resolves
mrousavy#130
- resolves
mrousavy#117
- fixes mrousavy#76
- resolves
mrousavy#75
- resolves
mrousavy#562
- resolves
mrousavy#565
- fixes
mrousavy#570
- fixes
mrousavy#287
- resolves
mrousavy#311
- fixes
mrousavy#315
- resolves
mrousavy#323
- fixes
mrousavy#340
- fixes
mrousavy#354
- resolves
mrousavy#420
- fixes
mrousavy#434
- fixes
mrousavy#452
- fixes
mrousavy#496
- fixes
mrousavy#497
- resolves
mrousavy#499
- fixes
mrousavy#516
- fixes
mrousavy#527
- fixes
mrousavy#542
- fixes
mrousavy#548
- fixes
mrousavy#561
- fixes
mrousavy#740
- fixes
mrousavy#770


...and then pretty much every Android issue lol

- fixes
mrousavy#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy#1671

.. maybe also (not tested):

- fixes
mrousavy#1698
- fixes
mrousavy#1687
- fixes
mrousavy#1685
- fixes
mrousavy#1681
- fixes
mrousavy#1650
- fixes
mrousavy#1646
- fixes
mrousavy#1635
- fixes
mrousavy#1631
- fixes
mrousavy#1621
- fixes
mrousavy#1615
- fixes
mrousavy#1612
- fixes
mrousavy#1605
- fixes
mrousavy#1599
- fixes
mrousavy#1585
- fixes
mrousavy#1581
- fixes
mrousavy#1569
- fixes
mrousavy#1568
- fixes
mrousavy#1565
- fixes
mrousavy#1561
- fixes
mrousavy#1558
- fixes
mrousavy#1554
- fixes
mrousavy#1551
- fixes
mrousavy#1547
- fixes
mrousavy#1543
- fixes
mrousavy#1538
- fixes
mrousavy#1536
- fixes
mrousavy#1534
- fixes
mrousavy#1528
- fixes
mrousavy#1520
- fixes
mrousavy#1498
- fixes
mrousavy#1489
- fixes
mrousavy#1477
- fixes
mrousavy#1474
- fixes
mrousavy#1463
- fixes
mrousavy#1462
- fixes
mrousavy#1449
- fixes
mrousavy#1443
- fixes
mrousavy#1437
- fixes
mrousavy#1431
- fixes
mrousavy#1429
- fixes
mrousavy#1427
- fixes
mrousavy#1423
- fixes
mrousavy#1416
- fixes
mrousavy#1407
- fixes
mrousavy#1403
- fixes
mrousavy#1402
- fixes
mrousavy#1398
- fixes
mrousavy#1396
- fixes
mrousavy#1395
- fixes
mrousavy#1379
- fixes
mrousavy#1377
- fixes
mrousavy#1374
- fixes
mrousavy#1373
- fixes
mrousavy#1365
- fixes
mrousavy#1356
- fixes
mrousavy#1353
- fixes
mrousavy#1352
- fixes
mrousavy#1351
- fixes
mrousavy#1343
- fixes
mrousavy#1340
- fixes
mrousavy#1334
- fixes
mrousavy#1330
- fixes
mrousavy#1322
- fixes
mrousavy#1296
- fixes
mrousavy#1283
- fixes
mrousavy#1260
- fixes
mrousavy#1253
- fixes
mrousavy#1251
- fixes
mrousavy#1245
- fixes
mrousavy#1238
- fixes
mrousavy#1227
- fixes
mrousavy#1226
- fixes
mrousavy#1225
- fixes
mrousavy#1222
- fixes
mrousavy#1211
- fixes
mrousavy#1208
- fixes
mrousavy#1193
- fixes
mrousavy#1191
- fixes
mrousavy#1184
- fixes
mrousavy#1164
- fixes
mrousavy#1143
- fixes
mrousavy#1128
- fixes
mrousavy#1122
- fixes
mrousavy#1120
- fixes
mrousavy#1110
- fixes
mrousavy#1097
- fixes
mrousavy#1081
- fixes
mrousavy#1080
- fixes
mrousavy#1064
- fixes
mrousavy#1053
- fixes
mrousavy#1047
- fixes
mrousavy#1044
- fixes
mrousavy#1032
- fixes
mrousavy#1026
- fixes
mrousavy#1023
- fixes
mrousavy#1015
- fixes
mrousavy#1012
- fixes
mrousavy#997
- fixes
mrousavy#960
- fixes
mrousavy#959
- fixes
mrousavy#954
- fixes
mrousavy#946
- fixes
mrousavy#945
- fixes
mrousavy#922
- fixes
mrousavy#908
- fixes
mrousavy#907
- fixes
mrousavy#868
- fixes
mrousavy#855
- fixes
mrousavy#834
- fixes
mrousavy#793
- fixes
mrousavy#779
- fixes
mrousavy#746
- fixes
mrousavy#740
- fixes
mrousavy#727
- fixes
mrousavy#671
- fixes
mrousavy#613
- fixes
mrousavy#595
- fixes
mrousavy#588
- fixes
mrousavy#570
- fixes
mrousavy#569
- fixes
mrousavy#542
- fixes
mrousavy#516
- fixes
mrousavy#515
- fixes
mrousavy#434
- fixes
mrousavy#354
- fixes
mrousavy#323
- fixes
mrousavy#315
- fixes
mrousavy#281
- fixes
mrousavy#211
- fixes mrousavy#76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Issue affects the Android platform 🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants