-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Hi! I'm trying out a few things on Temi, code over here: https://github.com/mfxuus/temi-test/tree/michael
One of the things I wanted to do was to capture fames from the camera (say every 5 seconds or so), and send it off to a server to get it processed. I mostly followed the instructions here: https://developer.android.com/codelabs/camerax-getting-started#3, and things are somewhat working, except for the actual capturing part. Specifically, when I press "Take photo", which triggers the takePhoto function (link), I get the following logs from Temi:
2025-02-25 10:00:13.862 3157-3157 CameraOrientationUtil com.example.temitest D getRelativeImageRotation: destRotationDegrees=270, sourceRotationDegrees=90, isOppositeFacing=true, result=180
2025-02-25 10:00:13.862 3157-3157 CameraOrientationUtil com.example.temitest D getRelativeImageRotation: destRotationDegrees=270, sourceRotationDegrees=90, isOppositeFacing=true, result=180
2025-02-25 10:00:13.884 3157-3157 ImageCapture com.example.temitest D Send image capture request [current, pending] = [0, 1]
2025-02-25 10:00:13.890 3157-3157 ImageCapture com.example.temitest D issueTakePicture
2025-02-25 10:00:13.910 3157-3188 Camera2CameraImpl com.example.temitest D {Camera@24abcb4[id=0]} Issue capture request
2025-02-25 10:00:13.910 3157-3188 CaptureSession com.example.temitest D Issuing capture request.
2025-02-25 10:00:13.911 3157-3188 Camera2CaptureRequestBu com.example.temitest D createCaptureRequest
2025-02-25 10:00:13.946 3157-3220 LegacyRequestMapper com.example.temitest W convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
2025-02-25 10:00:13.946 3157-3220 LegacyRequestMapper com.example.temitest W Only received metering rectangles with weight 0.
2025-02-25 10:00:13.946 3157-3220 LegacyRequestMapper com.example.temitest W Only received metering rectangles with weight 0.
2025-02-25 10:00:13.947 3157-3220 LegacyRequestMapper com.example.temitest W convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
2025-02-25 10:00:18.165 3157-3220 RequestThread-0 com.example.temitest E Hit timeout for jpeg callback!
2025-02-25 10:00:18.165 3157-3220 CaptureCollector com.example.temitest W Jpeg buffers dropped for request: 1
2025-02-25 10:00:18.166 3157-3202 CameraDevice-JV-0 com.example.temitest E Lost output buffer reported for frame 1446
2025-02-25 10:00:18.170 3157-3220 LegacyRequestMapper com.example.temitest W convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
2025-02-25 10:00:18.170 3157-3220 LegacyRequestMapper com.example.temitest W Only received metering rectangles with weight 0.
2025-02-25 10:00:18.170 3157-3220 LegacyRequestMapper com.example.temitest W Only received metering rectangles with weight 0.
2025-02-25 10:00:18.172 3157-3220 LegacyRequestMapper com.example.temitest W convertRequestToMetadata - Ignoring android.lens.focusDistance false, only 0.0f is supported
2025-02-25 10:00:20.180 3157-3201 RequestThread-0 com.example.temitest I Received jpeg.
2025-02-25 10:00:20.180 3157-3201 CaptureCollector com.example.temitest W jpegProduced called with no jpeg request on queue!
2025-02-25 10:00:20.181 3157-3201 RequestThread-0 com.example.temitest E Dropping jpeg frame.
Not sure if it matters, but I'm on Temi V2. That said, on an Android 6 simulator, the preview is messy but after I press take photo, I can at least find the taken photo in the device explorer. Any ideas what could be the issue? I would have assumed that grabbing camera frames is a fairly common use case; do we have any working code / example for it? Finally, ideally I would have just send the file off to the server in-memory/without writing to disk, and I tried various setups with OnImageCapturedCallback but it's also resulting in similar errors on Temi (e.g. timeout for jpeg callback, Dropping jpeg frame., ...). On the simulator it's at least returning some encoded data (though I also haven't got it to work perfectly there).
Any pointers would be greatly appreciated!