CamerAwesome icon indicating copy to clipboard operation
CamerAwesome copied to clipboard

MultiCamera : In Android 10 and 11, PictureController takePicture does not return on device with multi camera

Open anamauad opened this issue 4 years ago • 12 comments

Steps to Reproduce

  1. On an android 10 or 11 mobile phone, open the example app, using camerawesome 0.1.2+1, or greater
  2. Open the camera to take a picture, fullscreen, rear camera
  3. Press the button to take a picture

Expected results

The picture is taken and the picture can be viewed on the screen

Actual results

The picture is not taken.

While debugging the code, it waits the following code to return: await _pictureController.takePicture(filePath);

It was working as it should when the mobile device was using Android 9. But it stopped working when it was updated to Android 10.

About your device

Brand Model OS Working Rear Cameras
Xiamoi Redmi 9 Android 11 NO >1
LG K 61 Android 10 NO 2
LG K 61 Android 9 YES 2
Samsung Galaxy A20 Android 10 YES 1

anamauad avatar Jan 06 '21 19:01 anamauad

Log

Launching lib\main.dart on LM Q630 in debug mode...
Note: c:\tools\flutter\.pub-cache\hosted\pub.dartlang.org\camerawesome-0.1.2+1\android\src\main\java\com\apparence\camerawesome\CameraSession.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:52229/Lck1zp6NA6k=/ws
I/GED     (10599): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 3, oppidx_max 3, oppidx_min 0
D/com.apparence.camerawesome.CamerawesomePlugin(10599): _handleCheckPermissions:
I/CameraManagerGlobal(10599): Connecting to camera service
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
I/chatty  (10599): uid=10027(com.example.flutter_camera_awesome) identical 2 lines
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): [soar.cts] ignore the status update of camera: 3
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): [soar.cts] ignore the status update of camera: 4
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): [soar.cts] ignore the status update of camera: 5
E/CameraManagerGlobal(10599): packageList = com.lge.camera,com.lge.servicemenu
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] mtk_physical_camera : 5
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] mtk_hide_aux_camera : 1
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
E/CameraManagerGlobal(10599):  idCount = 3
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
I/chatty  (10599): uid=10027(com.example.flutter_camera_awesome) Binder:10599_3 identical 1 line
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): ignore the torch status update of camera: 3
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): ignore the torch status update of camera: 4
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): ignore the torch status update of camera: 5
I/SensorManager(10599): registerListenerImpl() [Sensor: ACCELEROMETER, Rate: 200000, SensorEventListener: android.view.OrientationEventListener$SensorEventListenerImpl@66a4031] by android.view.OrientationEventListener.enable():93
I/SensorManager(10599): registerListenerImpl() [Sensor: LIGHT, Rate: 66667, SensorEventListener: com.apparence.camerawesome.sensors.BasicLuminosityNotifier$1@1b27316] by com.apparence.camerawesome.sensors.BasicLuminosityNotifier.init():27
I/BufferQueue(10599): [unnamed-10599-0](this:0x73e0c65800,id:0,api:0,p:-1,c:-1) BufferQueue core=(10599:com.example.flutter_camera_awesome)
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [unnamed-10599-0](this:0x73e0c65800,id:0,api:0,p:-1,c:10599) connect(C): consumer=(10599:com.example.flutter_camera_awesome) controlledByApp=true
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [unnamed-10599-0](this:0x73e0c65800,id:0,api:0,p:-1,c:10599) setConsumerName: unnamed-10599-0
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [ImageReader-4000x3000f100m2-10599-0](this:0x73e0c65800,id:0,api:0,p:-1,c:10599) setConsumerName: ImageReader-4000x3000f100m2-10599-0
I/BufferQueueConsumer(10599): [ImageReader-4000x3000f100m2-10599-0](this:0x73e0c65800,id:0,api:0,p:-1,c:10599) setDefaultBufferSize: width=4000 height=3000
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): ignore the torch status update of camera: 3
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): ignore the torch status update of camera: 4
I/CameraManagerGlobal(10599): [LGE][getCameraIdList] using mtk property, ro.boot.product.lge.physical.camera
W/CameraManagerGlobal(10599): ignore the torch status update of camera: 5
I/BufferQueue(10599): [unnamed-10599-1](this:0x738298e000,id:1,api:0,p:-1,c:-1) BufferQueue core=(10599:com.example.flutter_camera_awesome)
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [unnamed-10599-1](this:0x738298e000,id:1,api:0,p:-1,c:10599) connect(C): consumer=(10599:com.example.flutter_camera_awesome) controlledByApp=true
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [unnamed-10599-1](this:0x738298e000,id:1,api:0,p:-1,c:10599) setConsumerName: unnamed-10599-1
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [ImageReader-4000x3000f100m2-10599-1](this:0x738298e000,id:1,api:0,p:-1,c:10599) setConsumerName: ImageReader-4000x3000f100m2-10599-1
I/BufferQueueConsumer(10599): [ImageReader-4000x3000f100m2-10599-1](this:0x738298e000,id:1,api:0,p:-1,c:10599) setDefaultBufferSize: width=4000 height=3000
I/BufferQueue(10599): [unnamed-10599-2](this:0x738298f800,id:2,api:0,p:-1,c:-1) BufferQueue core=(10599:com.example.flutter_camera_awesome)
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [unnamed-10599-2](this:0x738298f800,id:2,api:0,p:-1,c:10599) connect(C): consumer=(10599:com.example.flutter_camera_awesome) controlledByApp=true
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [unnamed-10599-2](this:0x738298f800,id:2,api:0,p:-1,c:10599) setConsumerName: unnamed-10599-2
E/libc    (10599): Access denied finding property "vendor.debug.bq.dump"
I/BufferQueueConsumer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:0,p:-1,c:10599) setConsumerName: SurfaceTexture-0-10599-0
I/BufferQueueConsumer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:0,p:-1,c:10599) setDefaultBufferSize: width=1920 height=1080
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) connect(P): api=4 producer=(1013:???) producerControlledByApp=true
I/BufferQueueProducer(10599): [ImageReader-4000x3000f100m2-10599-1](this:0x738298e000,id:1,api:4,p:1013,c:10599) connect(P): api=4 producer=(1013:???) producerControlledByApp=false
W/Gralloc3(10599): allocator 3.x is not supported
E/ion     (10599): ioctl c0044901 failed with code -1: Invalid argument
E/IMGSRV  (10599): :0: IsTextureConsistent: IMGEGLImage is not consistent
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=15.62 dur=1024.13 max=71.53 min=54.52
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.96 dur=1002.65 max=72.09 min=62.61
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.94 dur=1004.04 max=69.41 min=62.37
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_UP
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: slot 1 is dropped, handle=0x73e0b10c00
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=15.01 dur=1065.94 max=72.09 min=53.20
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.95 dur=1003.06 max=72.31 min=61.72
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_UP
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=15.09 dur=1060.23 max=69.68 min=63.02
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.92 dur=1005.59 max=70.58 min=63.55

Clicked on the shutter button

I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_UP
W/_camera_awesom(10599): Accessing hidden method Lsun/misc/Unsafe;->getUnsafe()Lsun/misc/Unsafe; (greylist,core-platform-api, linking, allowed)
W/_camera_awesom(10599): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/_camera_awesom(10599): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
W/_camera_awesom(10599): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: slot 0 is dropped, handle=0x73e0b10a80
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: slot 2 is dropped, handle=0x73e0b10d80
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: slot 4 is dropped, handle=0x73e0b11080
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.95 dur=1003.56 max=73.02 min=56.93
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.99 dur=1000.35 max=70.63 min=62.31
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.98 dur=1001.37 max=72.43 min=62.01
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.98 dur=1001.20 max=68.93 min=62.83
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=14.96 dur=1002.43 max=69.45 min=64.26
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_DOWN
I/ViewRootImpl(10599): ViewRoot's Touch Event : ACTION_UP
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: fps=15.09 dur=1060.20 max=71.78 min=60.91
I/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) queueBuffer: slot 4 is dropped, handle=0x73e0b11080
D/BufferQueueProducer(10599): [SurfaceTexture-0-10599-0](this:0x738298f800,id:2,api:4,p:1013,c:10599) cancelBuffer: slot 5

anamauad avatar Jan 07 '21 00:01 anamauad

Hello, thank you reporting this. I'll try to reproduce this quickly.

g-apparence avatar Jan 07 '21 13:01 g-apparence

Hi @g-apparence

I am also using camera_awesome: ^0.2.1+2 plugin. But I can't take a photo nor record a video on Android 10 x86_64 emulator when I try to take a photo it's giving these errors:

 Session 0: Exception while stopping repeating: 
E/CameraCaptureSession( 3858): android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
E/CameraCaptureSession( 3858):  at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2521)
E/CameraCaptureSession( 3858):  at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1128)
E/CameraCaptureSession( 3858):  at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:526)
E/CameraCaptureSession( 3858):  at com.apparence.camerawesome.CameraPreview.dispose(CameraPreview.java:160)
E/CameraCaptureSession( 3858):  at com.apparence.camerawesome.CameraStateManager.onError(CameraStateManager.java:154)
E/CameraCaptureSession( 3858):  at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.notifyError(CameraDeviceImpl.java:2010)
E/CameraCaptureSession( 3858):  at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.lambda$Sm85frAzwGZVMAK-NE_gwckYXVQ(Unknown Source:0)
E/CameraCaptureSession( 3858):  at android.hardware.camera2.impl.-$$Lambda$CameraDeviceImpl$CameraDeviceCallbacks$Sm85frAzwGZVMAK-NE_gwckYXVQ.accept(Unknown Source:8)
E/CameraCaptureSession( 3858):  at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:271)
E/CameraCaptureSession( 3858):  at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:195)
E/CameraCaptureSession( 3858):  at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:86)
E/CameraCaptureSession( 3858):  at android.os.Handler.handleCallback(Handler.java:883)
E/CameraCaptureSession( 3858):  at android.os.Handler.dispatchMessage(Handler.java:100)
E/CameraCaptureSession( 3858):  at android.os.Looper.loop(Looper.java:214)
E/CameraCaptureSession( 3858):  at android.app.ActivityThread.main(ActivityThread.java:7356)
E/CameraCaptureSession( 3858):  at java.lang.reflect.Method.invoke(Native Method)
E/CameraCaptureSession( 3858):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/CameraCaptureSession( 3858):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
D/AndroidRuntime( 3858): Shutting down VM
E/AndroidRuntime( 3858): FATAL EXCEPTION: main
E/AndroidRuntime( 3858): Process: com.example.Eveyel, PID: 3858
E/AndroidRuntime( 3858): java.lang.IllegalArgumentException: supportsCameraApi:1927: Unknown camera ID 0
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:791)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:327)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:363)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:588)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:516)
E/AndroidRuntime( 3858):        at com.apparence.camerawesome.CameraStateManager.startCamera(CameraStateManager.java:70)
E/AndroidRuntime( 3858):        at com.apparence.camerawesome.CameraStateManager.onError(CameraStateManager.java:155)
E/AndroidRuntime( 3858):        at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.notifyError(CameraDeviceImpl.java:2010)
E/AndroidRuntime( 3858):        at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.lambda$Sm85frAzwGZVMAK-NE_gwckYXVQ(Unknown Source:0)
E/AndroidRuntime( 3858):        at android.hardware.camera2.impl.-$$Lambda$CameraDeviceImpl$CameraDeviceCallbacks$Sm85frAzwGZVMAK-NE_gwckYXVQ.accept(Unknown Source:8)
E/AndroidRuntime( 3858):        at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:271)
E/AndroidRuntime( 3858):        at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:195)
E/AndroidRuntime( 3858):        at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:86)
E/AndroidRuntime( 3858):        at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime( 3858):        at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime( 3858):        at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime( 3858):        at android.app.ActivityThread.main(ActivityThread.java:7356)
E/AndroidRuntime( 3858):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3858):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/AndroidRuntime( 3858):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/AndroidRuntime( 3858): Caused by: android.os.ServiceSpecificException: supportsCameraApi:1927: Unknown camera ID 0 (code 3)
E/AndroidRuntime( 3858):        at android.os.Parcel.createException(Parcel.java:2085)
E/AndroidRuntime( 3858):        at android.os.Parcel.readException(Parcel.java:2039)
E/AndroidRuntime( 3858):        at android.os.Parcel.readException(Parcel.java:1987)
E/AndroidRuntime( 3858):        at android.hardware.ICameraService$Stub$Proxy.supportsCameraApi(ICameraService.java:800)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.supportsCameraApiLocked(CameraManager.java:844)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.supportsCamera2ApiLocked(CameraManager.java:820)
E/AndroidRuntime( 3858):        at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:303)
E/AndroidRuntime( 3858):        ... 18 more
I/Process ( 3858): Sending signal. PID: 3858 SIG: 9
Lost connection to device.

But if run the app on lower Android version it is running successfully.

But one more thing, I am also facing these errors while using official camera plugin

android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error

If these errors on my emulator or flutter side what do you suggest?

SaloxiddinTursunaliev avatar Feb 05 '21 05:02 SaloxiddinTursunaliev

I will try on an emulator (I'm only testing on real device for better behavior). This seems more related to Android new version that maybe broke the camera emulation. Unknown camera ID 0 Found no error related for now. Will make a try, but right now I got no answer. Tryed on older emulators (Android 8 I think). This worked.

g-apparence avatar Feb 05 '21 16:02 g-apparence

I've made an experiment removing the camera_awesome and using the camera lib. Their example code allows someone to switch the rear cameras.

The same LG K61 Android 10 mobile device listed 2 rear cameras.

I could get a picture taken with the second camera only, not the first one.

Using the first available rear camera, the picture is not taken but it returns a timeout result, while camera_awesome does not return anything, it hangs.

anamauad avatar Feb 05 '21 16:02 anamauad

Oh so maybe that's more on the fact that it has 2 rear cameras. Going to do some research on this. Thank you for investigating this!

g-apparence avatar Feb 05 '21 16:02 g-apparence

Okay, after some digging it seems that multi camera devices has to open logical camera and then related physical device. So this makes sense that camerawesome do nothing as we don't open any physical camera (which was not required with other devices).

https://developer.android.com/training/camera2/multi-camera https://source.android.com/devices/camera/multi-camera

I'll try to get a multi camera device to try fixing it.

g-apparence avatar Feb 05 '21 22:02 g-apparence

@g-apparence This seems to be pretty important as many newer devices will have multiple cameras. I'd love to help resolve this since I have a multi-camera device. Would you mind sharing any thoughts/guidance on what needs to be implemented or fixed to get this working? Happy to dive in.

j0nscalet avatar Feb 18 '21 05:02 j0nscalet

Hi Jon, You are right, I started some research and started detection of multi deviceCamera.

I'd be happy to get some help, thank you! => I created a branch called feature/multi_camera.

  • For now you now just have a function to detect and list the Cameras inside a multiCamera. (you can find this in CameraSetup.java). The list of cameras is in the CameraCharacteristicsModel that we use across all camerAwesome to get different characteristics. (CameraCharacteristicsModel => multiCamera attribute).

How is structured camerAwesome:

  • You have CameraPicture.java that is responsible to handle taking pictures
  • You have CameraPreview.java that is responsible to handle previews
  • CameraSession.java is responsible for syncing previews and pictures as they are more connected than we could think. (taking a picture requires restarting preview...)
  • CameraStateManager handles the start/stop operations on the camera

What needs next: I think we needs to handle the multi camera in CameraStateManager to start all other camera if you started a multiCamera. CameraStateManager don't have CameraCharacteristicsModel for now. This is a mistake and we should create cameraStateManager with it.

The question is do we have to start all camera in a multi Camera or the ability to choose which one to start. I think it's more like this but the Idea behind cameraAwesome is to make it simple. The plugin should work without specifying a list of complex camera id by default. Maybe the ability to choose which sensors inside the multiCamera can be interesting.

Here is the state. Hope I helped you understand the current state. Don't hesitate to ask :) .

g-apparence avatar Feb 18 '21 08:02 g-apparence

@g-apparence Things have gotten pretty busy again. I ended up getting the functionality I needed out the flutter camera plugin. So I probably won't have time to dive in. Sorry mate!

j0nscalet avatar Mar 03 '21 03:03 j0nscalet

@j0nscalet No problem 👍

g-apparence avatar Mar 03 '21 14:03 g-apparence

@g-apparence Things have gotten pretty busy again. I ended up getting the functionality I needed out the flutter camera plugin. So I probably won't have time to dive in. Sorry mate!

Hi, did you managed to load other physical cameras etc. ultrawide camera with the camera plugin?

urossm avatar Nov 23 '21 23:11 urossm

Closed, please reopen if this bug occurs on latest stable v1.0.0 👍

istornz avatar Jan 10 '23 14:01 istornz