Search code examples
androidandroid-camera2

In Android Camera2API is explicit connection between CaptureRequest and Image?


Currently every connection between request-results and image should be done programatically by the developer(probably with the queue). Sometimes this may be problematic, e.g. preview-precapture-burst sequence may overlaps, so during development you should pay attention to such situations. The problem may be solve, when Image would has a reference to the requests/result/tag. Is this connection hidden deeply in HAL? Is this connection safe to create?


Solution

  • Thanks to this post: How to use zero shutter lag in Android Camera API 2? there is pretty simple implementation which I need, and is placed in official android repository in Camera2 app: https://android.googlesource.com/platform/packages/apps/Camera2/+/9c94ab3/src/com/android/camera/one/v2/ImageCaptureManager.java#53

    --edit-- I've got official answer from Android Developera - "The CaptureResult and Image are linked by the timestamp both have. Matching timestamps come from the same frame."