mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
6.72k stars 1k forks source link

🐛 Android Back Camera Zoom Breaks in 4.0.4 #2884

Closed elirichey closed 1 week ago

elirichey commented 2 weeks ago

What's happening?

If using the back camera, the video preview freezes. If recording, the frame freezes and recording stops. Front camera works fine.

Reproduceable Code

<Camera
            ref={cameraRef}
            style={cameraStyle}
            device={device}
            isActive={isFocused}
            onInitialized={onInitialized}
            onError={onError}
            enableZoomGesture={true}
            photo={config.photo}
            video={config.video}
            audio={config.video}
            enableLocation={locationPermission}
            videoStabilizationMode={videoStabilizationMode}
            format={format}
            orientation={'portrait'}
            frameProcessor={frameProcessor}
          />

Relevant log output

[ERROR  ] chifeature2anchorsync.cpp:2536 UpdateSnapshotCropRegion() FRO-URO:796_MCXSuperFG:AnchorSync_0 Crop type RDI PSM crop (0 0 4080 3060) HAL Crop (0 0 4080 3060) Precrop (0 0 4080 3060) activeMask L 2 P 0 master 0
[ERROR  ] chifeature2anchorsync.cpp:2501 UpdateSnapshotCropRegion() Incorrect FD crop (0 0 640 480) Dim 640x480
[ERROR  ] chifeature2anchorsync.cpp:2536 UpdateSnapshotCropRegion() FRO-URO:796_MCXSuperFG:AnchorSync_0 Crop type FD PSM crop (0 0 640 480) HAL Crop (0 0 4080 3060) Precrop (0 0 4080 3060) activeMask L 2 P 0 mas[SS_ERR ]: [CHI         ]: chxextensionmodule.cpp: CheckGPSCoordinate: 24377: [EXIF_DBG] GetTag ANDROID_JPEG_GPS_COORDINATES Failed. frame(795)ter 0
MinkIPC_QRTR_Service: client with node 1 port 4ca6 went down

Camera Device

{
  "formats": [],
  "sensorOrientation": "landscape-left",
  "hardwareLevel": "full",
  "maxZoom": 10,
  "minZoom": 0.6000000238418579,
  "maxExposure": 20,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera",
    "ultra-wide-angle-camera",
    "wide-angle-camera",
    "telephoto-camera",
    "telephoto-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": false,
  "isMultiCam": true,
  "minFocusDistance": 0,
  "minExposure": -20,
  "name": "0 (BACK) androidx.camera.camera2",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",
  "id": "0"
}

Device

Galaxy S23 Ultra

VisionCamera Version

4.0.4

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

mrousavy commented 2 weeks ago
  1. Not enough logs. I have no idea where you got those logs from, but they are not adb logcat logs, and also that's just 4 lines.
  2. I don't really get what the problem is - what does "If using the back camera, the video preview freezes. If recording, the frame freezes and recording stops." mean?
mrousavy commented 1 week ago

Closing as there was no reply - we can reopen once you provide more details. 👍