Git Product home page Git Product logo

Comments (5)

mrousavy avatar mrousavy commented on August 23, 2024 1

Thanks for the logs btw. A lot of people simply don't get this, but I just read the logs and I can understand what went wrong.

from react-native-vision-camera.

maintenance-hans avatar maintenance-hans commented on August 23, 2024

Guten Tag, Hans here.

Note

New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time.
To support @mrousavy, please consider 💖 sponsoring him on GitHub 💖.
Sponsored issues will be prioritized.

from react-native-vision-camera.

mrousavy avatar mrousavy commented on August 23, 2024

Hey - I created a PR to potentially fix this: #3066

Can you test if this fixes the issue for you?

from react-native-vision-camera.

RenaudAubert avatar RenaudAubert commented on August 23, 2024

Hi @mrousavy,
Thanks a lot for taking the time to look into this issue.
I apologize for not getting back to you sooner but I just tested with version 4.4.2 and the problem is still occurring.

Here's the log from the camera initialization (the "test" log is a console.log I added ensure I have the minimum zoom set)
The code for the Camera is the same as in my original post

profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=72000000, frameRate=60, width=3840, height=2160, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=33000000, frameRate=60, width=1920, height=1080, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=12000000, frameRate=30, width=1280, height=720, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=6000000, frameRate=30, width=720, height=480, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
Advanced Extensions Implemented 
Advanced Extensions Implemented 
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=48000000, frameRate=30, width=3840, height=2160, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=33000000, frameRate=60, width=1920, height=1080, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=12000000, frameRate=30, width=1280, height=720, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=60, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=96000, sampleRate=48000, channels=1, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=6000000, frameRate=30, width=720, height=480, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]}
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
Advanced Extensions Implemented 
Advanced Extensions Implemented 
'test: ', 0.5304937958717346
Cannot get virtualdevice_native service
Camera Lifecycle changed to CREATED!
Updating CameraSession...
Updating CameraSession...
Updating CameraSession...
configure { ... }: Waiting for lock...
A new configure { ... } call arrived, aborting this one...
CameraView attached to window!
Initializing without READ_DEVICE_CONFIG permission. enabled=false, interval=1, missedFrameThreshold=3, frameTimeThreshold=64, package=com.cropscan
configure { ... }: Waiting for lock...
A new configure { ... } call arrived, aborting this one...
configure { ... }: Waiting for lock...
configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true, orientationChanged=true, locationChanged=true)
Creating new Outputs for Camera #0...
Using FPS Range: null
Creating Preview output...
Creating Photo output...
Photo size: 4624x3472
Successfully created new Outputs for Camera #0!
Binding Camera #0...
Binding 2 use-cases...
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
Resolved dynamic range for use case androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca43955 to no compatible HDR dynamic ranges.
DynamicRange@93012fe{encoding=UNSPECIFIED, bitDepth=0}
->
DynamicRange@b6c4eb9{encoding=SDR, bitDepth=8}
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.processing.SurfaceEdge$SettableSurface@f348d7b}
Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@5f48657}
New surface in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@5f48657}
use count+1, useCount=1 androidx.camera.core.SurfaceRequest$2@5f48657
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
createPipeline(cameraId: 0, streamSpec: StreamSpec{resolution=4624x3472, dynamicRange=DynamicRange@b6c4eb9{encoding=SDR, bitDepth=8}, expectedFrameRateRange=[0, 0], implementationOptions=androidx.camera.camera2.impl.Camera2ImplConfig@86e11b0})
Compat change id reported: 236825255; UID 10318; state: ENABLED
Surface created[total_surfaces=3, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@e615829}
invokeOnInitialized()
Successfully bound Camera #0!
Camera Lifecycle changed to STARTED!
PreviewView Stream State changed to IDLE
{Camera@4d61596[id=0]} Use case androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165 ACTIVE
Active and attached use case: [] for camera: 0
Camera State: CLOSED (has error: false)
Camera Lifecycle changed to RESUMED!
Target Orientation changed DEVICE -> DEVICE!
Starting streaming device and screen orientation updates...
{Camera@4d61596[id=0]} Use case androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556 ACTIVE
Active and attached use case: [] for camera: 0
Start updating location...
{Camera@4d61596[id=0]} Use case androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165 ACTIVE
Active and attached use case: [] for camera: 0
Active and attached use case: [] for camera: 0
configure { ... }: Completed CameraSession Configuration! (State: RESUMED)
{Camera@4d61596[id=0]} Use cases [androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556, androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165] now ATTACHED
All use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
No need to remove a previous mMeteringRepeating, SessionConfig Surfaces: 2, CaptureConfig Surfaces: 1
Active and attached use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
Surface requested by Preview.
Location Provider gps has been disabled.
{Camera@4d61596[id=0]} Resetting Capture Session
{Camera@4d61596[id=0]} Skipping Capture Session state check due to current camera state: INITIALIZED and previous session status: false
{Camera@4d61596[id=0]} Releasing session in state INITIALIZED
{Camera@4d61596[id=0]} Attempting to force open the camera.
tryOpenCamera(Camera@4d61596[id=0]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS
Surface created.
Surface changed. Size: 1920x1080
Recalculating open cameras:
Camera                                       State                 
-------------------------------------------------------------------
Camera@4d61596[id=0]                         OPENING               
Camera@9e970e9[id=1]                         UNKNOWN               
-------------------------------------------------------------------
Open count: 1 (Max allowed: 1)
{Camera@4d61596[id=0]} Opening camera.
{Camera@4d61596[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING
New public camera state CameraState{type=OPENING, error=null} from OPENING and null
Publishing new public camera state CameraState{type=OPENING, error=null}
All use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
Preview transformation info updated. TransformationInfo{getCropRect=Rect(0, 0 - 1920, 1080), getRotationDegrees=90, getTargetRotation=0, hasCameraTransform=true, getSensorToBufferTransform=Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}, isMirroring=false}
Transformation info set: TransformationInfo{getCropRect=Rect(0, 0 - 1920, 1080), getRotationDegrees=90, getTargetRotation=0, hasCameraTransform=true, getSensorToBufferTransform=Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}, isMirroring=false} 1920x1080 false
getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
Surface set on Preview.
Camera State: OPENING (has error: false)
'test: ', 0.5304937958717346
Preview orientation changed! PORTRAIT
invokeOnPreviewOrientationChanged(PORTRAIT)
Output orientation changed! PORTRAIT
invokeOnOutputOrientationChanged(PORTRAIT)
Camera #0 is now unavailable.
{Camera@4d61596[id=0]} Use case androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556 ACTIVE
Active and attached use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
{Camera@4d61596[id=0]} Use case androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165 ACTIVE
Active and attached use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
{Camera@4d61596[id=0]} CameraDevice.onOpened()
{Camera@4d61596[id=0]} Transitioning camera internal state: OPENING --> OPENED
Recalculating open cameras:
Camera                                       State                 
-------------------------------------------------------------------
Camera@4d61596[id=0]                         OPEN                  
Camera@9e970e9[id=1]                         UNKNOWN               
-------------------------------------------------------------------
Open count: 1 (Max allowed: 1)
New public camera state CameraState{type=OPEN, error=null} from OPEN and null
Publishing new public camera state CameraState{type=OPEN, error=null}
Camera State: OPEN (has error: false)
invokeOnStarted()
All use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
Active and attached use case: [androidx.camera.core.ImageCapture-1880673d-90b0-4500-a767-04cce8c13ff3104543165, androidx.camera.core.Preview-19eb6392-4f43-4325-b6b6-01e99ca4395565441556] for camera: 0
[androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@d966127] getSurface done with results: [Surface(name=null)/@0xdce655b, Surface(name=null)/@0xb29c7e6]
Opening capture session.
[androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@d966127] start openCaptureSession
use count+1, useCount=2 androidx.camera.core.SurfaceRequest$2@5f48657
New surface in use[total_surfaces=3, used_surfaces=2](androidx.camera.core.impl.ImmediateSurface@e615829}
use count+1, useCount=1 androidx.camera.core.impl.ImmediateSurface@e615829
[androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@d966127] Session onConfigured()
Attempting to send capture request onConfigured
Issuing request for session.
createCaptureRequest
CameraCaptureSession.onConfigured() mState=OPENED
CameraCaptureSession.onReady() OPENED
Update Preview stream state to STREAMING
PreviewView Stream State changed to STREAMING
invokeOnPreviewStarted()
view not autofillable - not passing ime action check
view not autofillable - not passing ime action check
tagSocket(214) with statsTag=0xffffffff, statsUid=-1
invokeOnAverageFpsChanged(0.0)
tagSocket(218) with statsTag=0xffffffff, statsUid=-1

from react-native-vision-camera.

mrousavy avatar mrousavy commented on August 23, 2024

Hmm, okay then we need to reopen.

from react-native-vision-camera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.