react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

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

Open Angelk90 opened this issue 2 years ago • 38 comments

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 avatar Jan 10 '22 11:01 Angelk90

@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

Angelk90 avatar Jan 10 '22 12:01 Angelk90

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

mrousavy avatar Jan 10 '22 13:01 mrousavy

@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)

Angelk90 avatar Jan 10 '22 15:01 Angelk90

Maybe try disabling video or photo or frameProcessor?

mrousavy avatar Jan 10 '22 15:01 mrousavy

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

Angelk90 avatar Jan 10 '22 15:01 Angelk90

How should I do?

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

mrousavy avatar Jan 10 '22 15:01 mrousavy

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

Angelk90 avatar Jan 10 '22 15:01 Angelk90

@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.

Angelk90 avatar Jan 10 '22 15:01 Angelk90

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

mrousavy avatar Jan 10 '22 16:01 mrousavy

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".

mrousavy avatar Jan 10 '22 16:01 mrousavy

@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 avatar Jan 10 '22 16:01 Angelk90

@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.

Angelk90 avatar Jan 10 '22 16:01 Angelk90

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 avatar Jan 10 '22 16:01 mrousavy

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

mrousavy avatar Jan 10 '22 16:01 mrousavy

@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 avatar Jan 10 '22 16:01 Angelk90

@mrousavy : I pull on the new changes.

  • Icon Hdr on see
  • The goBack is not working

Angelk90 avatar Jan 10 '22 16:01 Angelk90

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

Angelk90 avatar Jan 10 '22 16:01 Angelk90

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

ShaheerArshad-nearpeer avatar Jan 12 '22 07:01 ShaheerArshad-nearpeer

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

Stukz avatar Jan 24 '22 15:01 Stukz

@Stukz : Does the flash work on the g20?

Angelk90 avatar Jan 24 '22 17:01 Angelk90

@Stukz : Does the flash work on the g20?

@Angelk90 it doesn't work

Stukz avatar Jan 24 '22 19:01 Stukz

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

Angelk90 avatar Jan 24 '22 20:01 Angelk90

@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}

Stukz avatar Jan 24 '22 20:01 Stukz

@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?

Angelk90 avatar Jan 24 '22 20:01 Angelk90

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

Stukz avatar Jan 24 '22 20:01 Stukz

@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.

Angelk90 avatar Jan 24 '22 20:01 Angelk90

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 avatar Jan 25 '22 08:01 mrousavy

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

mrousavy avatar Jan 25 '22 08:01 mrousavy

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 avatar Jan 26 '22 14:01 Stukz

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

Stukz avatar Mar 03 '22 14:03 Stukz