Trying to access camera through ndk app

318 views
Skip to first unread message

vivek

unread,
Apr 10, 2020, 11:24:54 AM4/10/20
to android-ndk
Im a newbie to android NDK, when i am trying to access camera through NDK application im unable to access camera.


01-03 00:24:04.151  6444  6444 D CamNdk  : : Obtained list of available cameras - Total: 1
01-03 00:24:04.181   985  1506 I CameraService: CameraService::connect call (PID -1 "", camera ID 0) for HAL version default and Camera API version 2
01-03 00:24:04.191   985  1506 E CameraService: No packages for calling UID
01-03 00:24:04.192   985  1506 I Camera2ClientBase: Camera 0: Opened. Client:  (PID 6444, UID 0)
01-03 00:24:04.192   985  1506 I CameraDeviceClient: CameraDeviceClient 0: Opened
01-03 00:24:04.209   620   620 W prov...@2.4-se: type=1400 audit(0.0:611): avc: denied { read } for name="u:object_r:default_prop:s0" dev="tmpfs" ino=21122 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0
01-03 00:24:04.204   985  1506 I CameraProviderManager: Camera device device@3.3/legacy/0 torch status is now NOT_AVAILABLE
01-03 00:24:04.205   985  1506 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
01-03 00:24:04.205   985  1506 E CameraService: onTorchStatusChangedLocked: cannot get torch status of camera 0: No such file or directory (-2)
01-03 00:24:04.209   650   694 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
01-03 00:24:04.214   620   620 E libc    : Access denied finding property "ro.camera.req.fmq.size"
01-03 00:24:04.217   620   620 E libc    : Access denied finding property "ro.camera.res.fmq.size"
01-03 00:24:04.225  6444  6444 D CamNdk  : : Camera Open Success: 0
01-03 00:24:04.225  6444  6444 D CamNdk  :  AIMAGE_FORMAT_RAW16 4208 3120
01-03 00:24:04.226  6444  6444 D CamNdk  :  AIMAGE_FORMAT_RAW16 4208 2352
01-03 00:24:04.226  6444  6444 D CamNdk  : Create image Reader succes
01-03 00:24:04.226  6444  6444 D CamNdk  : Adding SessionOutputContainer Success
01-03 00:24:04.227  6444  6444 D CamNdk  : Add target for Capture Request Success
01-03 00:24:04.233   620   620 E CHIUSECASE: chxadvancedcamerausecase.cpp:2250 PipelineCreated() MULTIFRAME AdvancedCameraUsecase pipelineId: 0
01-03 00:24:04.252   620   620 E CamX    : [ERROR][CORE   ] camxnode.cpp:4574 CreateBufferManagers() invalid type streamConfig
01-03 00:24:04.314   620   620 E CamX    : [ERROR][HAL    ] camxmetadatapool.cpp:1373 GetMetadataByTag() Invalid Slot to get a metadata from
01-03 00:24:04.319   985  1506 D Camera3-Device: Set real time priority for request queue thread (tid 6450)
01-03 00:24:04.319  6444  6444 D CamNdk  : Create Capture Session Success
01-03 00:24:04.321  6444  6444 D CamNdk  : : Repeating Request - Total: 0
01-03 00:24:04.322  6444  6447 D CamNdk  : on_session_active
01-03 00:24:04.331   985  6450 E Camera3-OutputStream: getBufferLockedCommon: Stream 0: Can't dequeue next output buffer: Broken pipe (-32)
01-03 00:24:04.331   985  6450 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
qcs605:/data/local # 01-03 00:24:04.381   985  1506 I Camera3-Device: disconnect: E
01-03 00:24:04.466   985  1506 I CameraProviderManager: Camera device device@3.3/legacy/0 torch status is now AVAILABLE_OFF
01-03 00:24:04.466   985  1506 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
01-03 00:24:04.466   985  1506 E CameraService: onTorchStatusChangedLocked: cannot get torch status of camera 0: No such file or directory (-2)
01-03 00:24:04.467   985  1506 W Camera3-OutputStream: disconnectLocked: While disconnecting stream 0 from native window, the native window died from under us
01-03 00:24:04.467   985  1506 I CameraLatencyHistogram: Stream 0 dequeueBuffer latency histogram (1) samples:
01-03 00:24:04.467   985  1506 I CameraLatencyHistogram:         5     10     15     20     25     30     35     40     45    inf (max ms)
01-03 00:24:04.467   985  1506 I CameraLatencyHistogram:      0.00   0.00   100.00   0.00   0.00   0.00   0.00   0.00   0.00   0.00 (%)
01-03 00:24:04.467   985  1506 I Camera3-Device: disconnect: X
01-03 00:24:04.467   985  1506 I Camera3-Device: disconnect: E
01-03 00:24:04.471   985  1506 I CameraService: disconnect: Disconnected client for camera 0 for PID 6444
01-03 00:24:04.472   985  1506 I Camera2ClientBase: Closed Camera 0. Client was:  (PID 6444, UID 0)
01-03 00:24:04.472   985  1506 E CameraService: binderDied: Java client's binder died, removing it from the list of active clients


Untitled Document

Glenn Kasten

unread,
Apr 10, 2020, 11:32:28 AM4/10/20
to android-ndk
Do you have a *small* code fragment showing the relevant camera NDK API calls, and the relationship between those API calls and the logcat messages below?
For example, include a *small* bit of code that has extra Logs in it so we can see when the logs below happen relative to your code.
Reply all
Reply to author
Forward
0 new messages