# ACameraCaptureFailure

Struct to describe a capture failure.

## Summary

| ### Public attributes ||
|---|---|
| `https://developer.android.com/ndk/reference/struct/a-camera-capture-failure#struct_a_camera_capture_failure_1a623625a965f611af49a830355722052a` | `int64_t` The frame number associated with this failed capture. |
| `https://developer.android.com/ndk/reference/struct/a-camera-capture-failure#struct_a_camera_capture_failure_1a1c11c85d88c5d864498db54a7205385c` | `int` Determine why the request was dropped, whether due to an error or to a user action. |
| `https://developer.android.com/ndk/reference/struct/a-camera-capture-failure#struct_a_camera_capture_failure_1a0e4f89e9a324e6c92eb702c06cac14ec` | `int` The sequence ID for this failed capture that was returned by the [ACameraCaptureSession_capture](https://developer.android.com/ndk/reference/group/camera#group___camera_1ga6099baf4316e44db1d5f133cdf02c838) or [ACameraCaptureSession_setRepeatingRequest](https://developer.android.com/ndk/reference/group/camera#group___camera_1ga07aa2f8bb53c7c0d88c59c33848bb2d6). |
| `https://developer.android.com/ndk/reference/struct/a-camera-capture-failure#struct_a_camera_capture_failure_1a3bc5fdd751c20aacae215d4573cfde92` | `bool` Determine if the image was captured from the camera. |

## Public attributes

### frameNumber

Declared in `camera/NdkCameraCaptureSession.h`

```scdoc
int64_t ACameraCaptureFailure::frameNumber
```
The frame number associated with this failed capture.

Whenever a request has been processed, regardless of failed capture or success, it gets a unique frame number assigned to its future result/failed capture.

This value monotonically increments, starting with 0, for every new result or failure; and the scope is the lifetime of the [ACameraDevice](https://developer.android.com/ndk/reference/group/camera#group___camera_1ga871f69c48314f6194b8ee6b8c4952862).

### reason

Declared in `camera/NdkCameraCaptureSession.h`

```text
int ACameraCaptureFailure::reason
```
Determine why the request was dropped, whether due to an error or to a user action.


**See also:**
[CAPTURE_FAILURE_REASON_ERROR](https://developer.android.com/ndk/reference/group/camera#group___camera_1gga29d44341ce767c5dfc737d622fc97ba1a3fcd937d8b3cb3d52eb60e13d546838a)
**See also:**
[CAPTURE_FAILURE_REASON_FLUSHED](https://developer.android.com/ndk/reference/group/camera#group___camera_1gga29d44341ce767c5dfc737d622fc97ba1a30c56bc245f6ca2982be28fb23cdbef3)

### sequenceId

Declared in `camera/NdkCameraCaptureSession.h`

```text
int ACameraCaptureFailure::sequenceId
```
The sequence ID for this failed capture that was returned by the [ACameraCaptureSession_capture](https://developer.android.com/ndk/reference/group/camera#group___camera_1ga6099baf4316e44db1d5f133cdf02c838) or [ACameraCaptureSession_setRepeatingRequest](https://developer.android.com/ndk/reference/group/camera#group___camera_1ga07aa2f8bb53c7c0d88c59c33848bb2d6).

The sequence ID is a unique monotonically increasing value starting from 0, incremented every time a new group of requests is submitted to the ACameraDevice.

### wasImageCaptured

Declared in `camera/NdkCameraCaptureSession.h`

```text
bool ACameraCaptureFailure::wasImageCaptured
```
Determine if the image was captured from the camera.

If the image was not captured, no image buffers will be available. If the image was captured, then image buffers may be available.